package core import ( "time" "gorm.io/gorm" ) type Base struct { CreatedAt time.Time `json:"createdAt" gorm:"type:timestamptz"` UpdatedAt string `json:"updatedAt" gorm:"type:timestamptz"` DeteledAt gorm.DeletedAt `json:"deletedAt,omitempty"` } type Main struct { Id uint `json:"id" gorm:"primaryKey"` // depends on the system architecture Base } type TinyMain struct { Id uint8 `json:"id" gorm:"primaryKey"` Base } type SmallMain struct { Id uint16 `json:"id" gorm:"primaryKey"` Base } // Mainly for transaction type BigMain struct { Id uint64 `json:"id" gorm:"primaryKey"` Base }