package models // EmployeeLevelLog 员工等级变更日志表 type EmployeeLevelLog struct { ID int64 `json:"id" gorm:"primarykey;comment:日志ID"` EmpId int64 `json:"emp_id" gorm:"not null;default:0;index;comment:员工ID"` OperationType int8 `json:"operation_type" gorm:"not null;default:1;comment:操作类型(1:开通,2:升级,3:续费)"` OldLevel int8 `json:"old_level" gorm:"not null;default:0;comment:原等级"` NewLevel int8 `json:"new_level" gorm:"not null;default:0;comment:新等级"` OldMaxNum int64 `json:"old_max_num" gorm:"not null;default:0;comment:原子账号数量上限"` NewMaxNum int64 `json:"new_max_num" gorm:"not null;default:0;comment:新子账号数量上限"` OldExpireTime int64 `json:"old_expire_time" gorm:"not null;default:0;comment:原到期时间"` NewExpireTime int64 `json:"new_expire_time" gorm:"not null;default:0;comment:新到期时间"` Price int64 `json:"price" gorm:"not null;default:0;comment:价格(单位:分)"` PayTime int64 `json:"pay_time" gorm:"not null;default:0;comment:支付时间"` OperatorID int64 `json:"operator_id" gorm:"not null;default:0;comment:操作人ID"` OperatorName string `json:"operator_name" gorm:"size:50;not null;default:'';comment:操作人姓名"` Remark string `json:"remark" gorm:"size:255;not null;default:'';comment:备注"` CreatedAt int64 `json:"created_at" gorm:"not null;default:0;index;comment:创建时间戳"` IsDel int8 `json:"is_del" gorm:"type:tinyint(1);not null;default:0;comment:逻辑删除标记(0:未删除,1:已删除)"` } func (EmployeeLevelLog) TableName() string { return "employees_level_log" } func (EmployeeLevelLog) TableOptions() string { return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='员工等级变更日志表'" }