fix(tenant): 收紧双站运营提号与录单边界
This commit is contained in:
@@ -5,7 +5,8 @@ import "time"
|
||||
// PickupShop 线下提号店铺配置模型。
|
||||
type PickupShop struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"size:100;not null;uniqueIndex" json:"name"`
|
||||
TenantID uint64 `gorm:"not null;default:0;uniqueIndex:uk_pickup_shops_tenant_name,priority:1;index:idx_pickup_shops_tenant_status" json:"tenant_id"`
|
||||
Name string `gorm:"size:100;not null;uniqueIndex:uk_pickup_shops_tenant_name,priority:2" json:"name"`
|
||||
Platform string `gorm:"size:32;not null;default:''" json:"platform"`
|
||||
Status string `gorm:"size:20;not null;default:'active';index" json:"status"`
|
||||
SortOrder int `gorm:"not null;default:0" json:"sort_order"`
|
||||
@@ -21,7 +22,8 @@ func (PickupShop) TableName() string {
|
||||
// PickupShopMapping 线下提号店铺历史映射/别名模型。
|
||||
type PickupShopMapping struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
SourceName string `gorm:"size:100;not null;uniqueIndex" json:"source_name"`
|
||||
TenantID uint64 `gorm:"not null;default:0;uniqueIndex:uk_pickup_shop_mappings_tenant_source,priority:1" json:"tenant_id"`
|
||||
SourceName string `gorm:"size:100;not null;uniqueIndex:uk_pickup_shop_mappings_tenant_source,priority:2" json:"source_name"`
|
||||
TargetShopID uint64 `gorm:"not null;default:0" json:"target_shop_id"`
|
||||
TargetShopName string `gorm:"size:100;not null;index" json:"target_shop_name"`
|
||||
MappedCount int64 `gorm:"not null;default:0" json:"mapped_count"`
|
||||
@@ -33,4 +35,3 @@ type PickupShopMapping struct {
|
||||
func (PickupShopMapping) TableName() string {
|
||||
return "pickup_shop_mappings"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user