2025-02-26 22:28:19 +08:00
|
|
|
package database
|
|
|
|
|
|
2025-03-02 04:36:17 +08:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
)
|
2025-02-26 22:28:19 +08:00
|
|
|
|
2025-03-01 20:00:54 +08:00
|
|
|
type Category struct {
|
2025-03-02 04:36:17 +08:00
|
|
|
ID string `gorm:"primaryKey" json:"id"`
|
|
|
|
|
Name string `gorm:"not null;unique" json:"name"`
|
|
|
|
|
Code string `gorm:"not null" json:"code"`
|
|
|
|
|
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
|
|
|
|
|
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
|
2025-03-05 21:21:44 +08:00
|
|
|
DeletedAt time.Time `gorm:"default:null" json:"deleted_at"`
|
2025-03-02 04:36:17 +08:00
|
|
|
}
|