Files
platforms/backend/api/internal/models/user_service_relation.go

16 lines
1.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package models
import "git.apinb.com/bsm-sdk/core/database"
// UserServiceRelation 对应 user_service_relation保存用户服务归属快照。
type UserServiceRelation struct {
Entity // 公共实体字段
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 业务字段
}
func init() { database.AppendMigrate(&UserServiceRelation{}) }
func (table *UserServiceRelation) TableName() string { return "user_service_relation" }