Files
lone-services/services/water/internal/dao/users.go
T
gjs 7d74f01eaa
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 0s
CI / bff (push) Successful in 1s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / record (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / user (push) Successful in 0s
CI / task (push) Successful in 1s
CI / water (push) Successful in 31s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
fix apis
2026-11-02 16:51:31 +08:00

27 lines
1.4 KiB
Go

package dao
import (
"lone-services/pkg/utils"
)
type UsersCreate struct {
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"`
UserId int64 `gorm:"column:user_id;type:int;default:NULL" json:"user_id"` // 用户ID
HostCode string `gorm:"column:host_code;type:varchar(255);default:NULL" json:"host_code"` // 设备号
Status int32 `gorm:"column:status;type:tinyint(1);not null;default:3" json:"status"` // 状态:1为正常,2为禁用,3为申请
}
type UsersInfo struct {
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"`
UserId int64 `gorm:"column:user_id;type:int;default:NULL" json:"user_id"` // 用户ID
UserName string `gorm:"-" json:"user_name"` // 用户名
HostCode string `gorm:"column:host_code;type:varchar(255);default:NULL" json:"host_code"` // 设备号
Status int32 `gorm:"column:status;type:tinyint(1);not null;default:3" json:"status"` // 状态:1为正常,2为禁用,3为申请
UpdateTime utils.CustomTime `json:"update_time" gorm:"update_time"`
CarteTime utils.CustomTime `json:"carte_time" gorm:"carte_time"`
}
type UsersStatus struct {
Status int32 `gorm:"column:status;type:tinyint(1);not null;default:3" json:"status"` // 状态:1为正常,2为禁用,3为申请
}