Initial commit: 商品售卖网站
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type SystemSetting struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Key string `gorm:"uniqueIndex;size:100;not null" json:"key"`
|
||||
Value string `gorm:"type:text" json:"value"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (SystemSetting) TableName() string {
|
||||
return "system_settings"
|
||||
}
|
||||
|
||||
type SupplierAuthorization struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
SupplierID uint `gorm:"index;not null" json:"supplier_id"`
|
||||
Type string `gorm:"size:20;not null" json:"type"`
|
||||
RefID uint `gorm:"not null" json:"ref_id"`
|
||||
}
|
||||
|
||||
func (SupplierAuthorization) TableName() string {
|
||||
return "supplier_authorizations"
|
||||
}
|
||||
|
||||
const (
|
||||
AuthTypeCategory = "category"
|
||||
AuthTypeProduct = "product"
|
||||
)
|
||||
Reference in New Issue
Block a user