chore(init): 初始化解忧商行项目并完成 Phase 0 基座
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// CSManualEntry 客服手动录单记录。
|
||||
// 客服在后台手动登记一个编号(如 202610120013),该编号与其登录账号绑定,
|
||||
// 记录平台、操作人、登记时间等,供后续查询与按客服统计今日录单量。
|
||||
// platform / operator 存名称快照:后台删掉选项也不影响历史记录展示。
|
||||
type CSManualEntry struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
EntryNo string `gorm:"size:64;not null;uniqueIndex" json:"entry_no"`
|
||||
Platform string `gorm:"size:64;not null;default:'';index" json:"platform"`
|
||||
Operator string `gorm:"size:64;not null;default:'';index" json:"operator"`
|
||||
AdminID uint64 `gorm:"not null;index" json:"admin_id"`
|
||||
AdminName string `gorm:"size:64;not null;default:''" json:"admin_name"`
|
||||
AdminUsername string `gorm:"size:64;not null;default:''" json:"admin_username"`
|
||||
Remark string `gorm:"size:255;not null;default:''" json:"remark"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (CSManualEntry) TableName() string {
|
||||
return "cs_manual_entries"
|
||||
}
|
||||
|
||||
// CSManualEntryOption 客服手动录单的可选项配置(平台 / 操作人)。
|
||||
// 仅作为录单表单的下拉数据源,记录里保存的是名称快照。
|
||||
type CSManualEntryOption struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
Type string `gorm:"size:16;not null;uniqueIndex:uk_cs_manual_entry_options_type_name,priority:1" json:"type"`
|
||||
Name string `gorm:"size:64;not null;uniqueIndex:uk_cs_manual_entry_options_type_name,priority:2" json:"name"`
|
||||
SortOrder int `gorm:"not null;default:0" json:"sort_order"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (CSManualEntryOption) TableName() string {
|
||||
return "cs_manual_entry_options"
|
||||
}
|
||||
Reference in New Issue
Block a user