Initial commit: 商品售卖网站

This commit is contained in:
2026-04-13 07:20:09 +08:00
commit c6154273f2
865 changed files with 26573 additions and 0 deletions
+32
View File
@@ -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"
)