23 lines
587 B
Go
Raw Permalink Normal View History

2025-03-01 21:20:51 +08:00
package categorydomain
2025-03-05 23:55:41 +08:00
import (
"time"
)
2025-03-01 21:20:51 +08:00
type Category struct {
ID string `json:"id" gorm:"primaryKey"`
Name string `json:"name"`
Code string `json:"code"`
Description *string `json:"description"`
Sequence *int `json:"sequence"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
2025-03-01 21:20:51 +08:00
}
type CategoryReq struct {
Name string `json:"name" validate:"required"`
Code string `json:"code" validate:"required"`
Description *string `json:"description"`
Sequence *int `json:"sequence"`
2025-03-01 21:20:51 +08:00
}