fix(tenant): 收紧双站运营提号与录单边界
This commit is contained in:
@@ -15,15 +15,16 @@ const (
|
||||
// platform / operator 存名称快照:后台删掉选项也不影响历史记录展示。
|
||||
type CSManualEntry struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
EntryNo string `gorm:"size:64;not null;uniqueIndex:uk_cs_manual_entries_entry_no_group,priority:1" json:"entry_no"`
|
||||
EntryGroup string `gorm:"size:16;not null;default:'collect';uniqueIndex:uk_cs_manual_entries_entry_no_group,priority:2;index" json:"entry_group"`
|
||||
TenantID uint64 `gorm:"not null;default:0;uniqueIndex:uk_cs_manual_entries_tenant_entry_group,priority:1;index:idx_cs_manual_entries_tenant_admin_created" json:"tenant_id"`
|
||||
EntryNo string `gorm:"size:64;not null;uniqueIndex:uk_cs_manual_entries_tenant_entry_group,priority:2" json:"entry_no"`
|
||||
EntryGroup string `gorm:"size:16;not null;default:'collect';uniqueIndex:uk_cs_manual_entries_tenant_entry_group,priority:3;index" json:"entry_group"`
|
||||
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"`
|
||||
AdminID uint64 `gorm:"not null;index;index:idx_cs_manual_entries_tenant_admin_created,priority:2" 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"`
|
||||
CreatedAt time.Time `gorm:"index:idx_cs_manual_entries_tenant_admin_created,priority:3" json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
@@ -36,10 +37,11 @@ func (CSManualEntry) TableName() string {
|
||||
// 操作人选项可通过 group_tag 标记所属组别(收号/出号),录单时用于自动带出组别。
|
||||
type CSManualEntryOption struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
Type string `gorm:"size:32;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"`
|
||||
TenantID uint64 `gorm:"not null;default:0;uniqueIndex:uk_cs_manual_entry_options_tenant_type_name,priority:1;index:idx_cs_manual_entry_options_tenant_type_sort,priority:1" json:"tenant_id"`
|
||||
Type string `gorm:"size:32;not null;uniqueIndex:uk_cs_manual_entry_options_tenant_type_name,priority:2;index:idx_cs_manual_entry_options_tenant_type_sort,priority:2" json:"type"`
|
||||
Name string `gorm:"size:64;not null;uniqueIndex:uk_cs_manual_entry_options_tenant_type_name,priority:3" json:"name"`
|
||||
GroupTag string `gorm:"size:16;not null;default:''" json:"group_tag"`
|
||||
SortOrder int `gorm:"not null;default:0" json:"sort_order"`
|
||||
SortOrder int `gorm:"not null;default:0;index:idx_cs_manual_entry_options_tenant_type_sort,priority:3" json:"sort_order"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user