package models import "gorm.io/datatypes" // SplitAccountConfig 分账配置表 type SplitAccountConfig struct { ID int64 `json:"id" gorm:"primarykey;comment:主键ID"` RuleName string `json:"rule_name" gorm:"size:200;not null;default:'';comment:分账规则配置名称"` RuleValue datatypes.JSON `json:"rule_value" gorm:"type:json;comment:分账规则配置(JSON格式)"` Status int8 `json:"status" gorm:"type:tinyint(1);default:1;comment:状态:0-禁用,1-启用"` Description string `json:"description" gorm:"size:500;comment:配置描述"` CreatedBy string `json:"created_by" gorm:"size:100;comment:创建人"` UpdatedBy string `json:"updated_by" gorm:"size:100;comment:更新人"` CreatedAt int64 `json:"created_at" gorm:"type:bigint;default:0;comment:创建时间戳(秒)"` UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;default:0;comment:更新时间戳(秒)"` DeletedAt int64 `json:"deleted_at" gorm:"type:bigint;default:0;comment:删除时间戳(秒)"` } func (SplitAccountConfig) TableName() string { return "split_account_config" } func (SplitAccountConfig) TableOptions() string { return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分账配置表'" }