2026-07-27 00:18:42 +08:00
|
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
|
|
import "git.apinb.com/bsm-sdk/core/database"
|
|
|
|
|
|
|
|
|
|
|
|
// UserServiceRelation 对应 user_service_relation,保存用户服务归属快照。
|
|
|
|
|
|
type UserServiceRelation struct {
|
2026-07-27 12:02:08 +08:00
|
|
|
|
Entity // 公共实体字段
|
2026-07-29 14:25:38 +08:00
|
|
|
|
UserAccountID uint64 `gorm:"column:user_account_id;not null;index;uniqueIndex:idx_active_user_service,where:status <> 3" json:"user_account_id"` // 用户账户自增主键
|
|
|
|
|
|
GasBasicID uint64 `gorm:"column:gas_basic_id;not null;default:0;index" json:"gas_basic_id"` // gas_basic_id 业务字段
|
|
|
|
|
|
DeliveryBasicID uint64 `gorm:"column:delivery_basic_id;not null;default:0;index" json:"delivery_basic_id"` // delivery_basic_id 业务字段
|
|
|
|
|
|
StaffAccountID uint64 `gorm:"column:staff_account_id;not null;default:0;index" json:"staff_account_id"` // staff_account_id 业务字段
|
2026-07-27 00:18:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() { database.AppendMigrate(&UserServiceRelation{}) }
|
|
|
|
|
|
func (table *UserServiceRelation) TableName() string { return "user_service_relation" }
|