Files
bl/modules/base/model/base_sys_user.go
昔念 a29a8ddec2
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
feat(service): 宠物添加功能增加销售计数参数并优化价格更新逻辑

- 修改PetAdd方法签名,增加salecount参数用于追踪宠物销售次数
- 在多个控制器中统一调用PetAdd方法时传入0作为初始销售次数
- 临时禁用寒流枪活动中的宠物发放功能
- 优化UPdatePrice方法,添加错误处理和价格范围验证逻辑
- 调整宠物购买逻辑,使用免费金币系统并计算递增购买
2026-03-11 12:19:13 +08:00

45 lines
1.7 KiB
Go
Raw 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 model
import (
"blazing/cool"
)
const TableNameBaseSysUser = "base_sys_user"
// BaseSysUser mapped from table <base_sys_user>
type BaseSysUser struct {
*cool.Model
DepartmentID uint `gorm:"column:departmentId;type:bigint;index" json:"departmentId"` // 部门ID
Username string `gorm:"column:username;type:varchar(100);not null;Index" json:"username"` // 用户名
Password string `gorm:"column:password;type:varchar(255);" json:"password"` // 密码
PasswordV *int32 `gorm:"column:passwordV;type:int;not null;default:1" json:"passwordV"` // 密码版本, 作用是改完密码让原来的token失效
HeadImg *string `gorm:"column:headImg;type:varchar(255)" json:"headImg"` // 头像
Email *string `gorm:"column:email;type:varchar(255)" json:"email"` // 邮箱
Status *int32 `gorm:"column:status;not null;default:1" json:"status"` // 状态 0:禁用 1启用
GoldBean int64 `gorm:"column:goldbean;type:bigint;default:0" json:"goldbean"`
FreeGold int64 `gorm:"column:free_gold;type:bigint;default:0" json:"free_gold"` //集市金豆
Remark *string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
//Debug int32 `gorm:"column:debug;type:int;not null;default:0" json:"debug"` // 是否可以进入2服 测试服
Maxts uint32 `gorm:"column:max_ts;type:int;not null;default:0" json:"max_ts"` //最后生成的时间记录表
}
// TableName BaseSysUser's table name
func (*BaseSysUser) TableName() string {
return TableNameBaseSysUser
}
// NewBaseSysUser 创建一个新的BaseSysUser
func NewBaseSysUser() *BaseSysUser {
return &BaseSysUser{
Model: cool.NewModel(),
}
}
// init 创建表
func init() {
cool.CreateTable(&BaseSysUser{})
}