12 lines
368 B
Go
12 lines
368 B
Go
package database
|
|
|
|
import "time"
|
|
|
|
type Category struct {
|
|
ID string `gorm:"primaryKey;not null" json:"id"`
|
|
Code string `gorm:"not null" json:"code"`
|
|
Name string `gorm:"not null" json:"name"`
|
|
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
|
|
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
|
|
}
|