43 lines
3.4 KiB
Go
43 lines
3.4 KiB
Go
package dao
|
|
|
|
import (
|
|
"lone-services/pkg/utils"
|
|
)
|
|
|
|
type BindCreate struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
HostCode string `gorm:"column:host_code;type:varchar(64);comment:主机编号;NOT NULL" json:"host_code"`
|
|
HostNickname string `gorm:"column:host_nickname;type:varchar(128);comment:主机昵称;NOT NULL" json:"host_nickname"`
|
|
UserId int64 `gorm:"column:user_id;type:int(11);comment:用户ID;NOT NULL" json:"user_id"`
|
|
UserNickname string `gorm:"column:user_nickname;type:varchar(128);comment:用户昵称;NOT NULL" json:"user_nickname"`
|
|
Type int32 `json:"type" gorm:"type"` // 类型。1为圆屏,2为卵型屏,3为皮肤分析仪,4为经皮湿水仪,5为AI化妆盒,6为软水机,7为制氧机
|
|
Image string `gorm:"column:image;type:varchar(128);comment:图片地址;NOT NULL" json:"image"`
|
|
IsSpeciality int32 `gorm:"column:is_speciality;type:tinyint(1);default:0;comment:1是专业版;NOT NULL" json:"is_speciality"`
|
|
Status int32 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为禁用" json:"status"`
|
|
BindTime utils.CustomTime `gorm:"column:bind_time;type:datetime;comment:绑定时间" json:"bind_time"`
|
|
}
|
|
|
|
type BindInfo struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
HostCode string `gorm:"column:host_code;type:varchar(64);comment:主机编号;NOT NULL" json:"host_code"`
|
|
HostNickname string `gorm:"column:host_nickname;type:varchar(128);comment:主机昵称;NOT NULL" json:"host_nickname"`
|
|
UserId int64 `gorm:"column:user_id;type:int(11);comment:用户ID;NOT NULL" json:"user_id"`
|
|
UserNickname string `gorm:"column:user_nickname;type:varchar(128);comment:用户昵称;NOT NULL" json:"user_nickname"`
|
|
Image string `gorm:"column:image;type:varchar(128);comment:图片地址;NOT NULL" json:"image"`
|
|
Type int32 `json:"type" gorm:"type"` // 类型。1为圆屏,2为卵型屏,3为皮肤分析仪,4为经皮湿水仪,5为AI化妆盒,6为软水机,7为制氧机
|
|
IsSpeciality int32 `gorm:"column:is_speciality;type:tinyint(1);default:0;comment:1是专业版;NOT NULL" json:"is_speciality"`
|
|
ExpiryTime string `gorm:"column:expiry_time;type:char(11);comment:过期时间" json:"expiry_time"`
|
|
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为禁用" json:"status"`
|
|
BindTime utils.CustomTime `gorm:"column:bind_time;type:datetime;comment:绑定时间" json:"bind_time"`
|
|
UpdatedTime utils.CustomTime `gorm:"column:updated_time;type:timestamp;default:CURRENT_TIMESTAMP;NOT NULL" json:"updated_time"`
|
|
}
|
|
|
|
type BindExpiry struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
HostCode string `gorm:"column:host_code;type:varchar(64);comment:主机编号;NOT NULL" json:"host_code"`
|
|
ExpiryTime string `gorm:"column:expiry_time;type:char(11);comment:过期时间" json:"expiry_time"`
|
|
Reason string `gorm:"column:reason;type:varchar(255);comment:理由" json:"reason"`
|
|
AdminId int64 `gorm:"column:admin_id;type:int(11)" json:"admin_id"`
|
|
AdminName string `gorm:"column:admin_name;type:varchar(255)" json:"admin_name"`
|
|
}
|