30 lines
2.3 KiB
Go
30 lines
2.3 KiB
Go
package dao
|
|
|
|
import (
|
|
"lone-services/pkg/utils"
|
|
)
|
|
|
|
const CodeName = "bind:code:"
|
|
|
|
type CodeBindInfo struct {
|
|
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"` // ID
|
|
UserId int64 `gorm:"column:user_id;type:int;default:0" json:"user_id"` // 用户ID
|
|
Step int32 `gorm:"column:step;type:tinyint;default:1" json:"step"` // 步骤
|
|
Bluetooth string `gorm:"column:bluetooth;type:char(30);not null;default:''" json:"bluetooth"` // 蓝牙
|
|
Cmos string `gorm:"column:cmos;type:char(30);not null;default:''" json:"cmos"` // 芯片
|
|
Status int32 `gorm:"column:status;type:tinyint(1);default:1" json:"status"` // 装态。1为正常,2为删除
|
|
Type int32 `gorm:"column:type;type:tinyint(1);default:1" json:"type"` // 类型,1为园屏,2为卵型屏
|
|
CreateTime utils.CustomTime `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"create_time"` // 添加时间
|
|
UpdateTime utils.CustomTime `gorm:"column:update_time;type:datetime;default:CURRENT_TIMESTAMP;onUpdate:CURRENT_TIMESTAMP" json:"update_time"` // 更新时间
|
|
}
|
|
|
|
type CodeBindCreate struct {
|
|
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"` // ID
|
|
UserId int64 `gorm:"column:user_id;type:int;default:0" json:"user_id"` // 用户ID
|
|
Step int32 `gorm:"column:step;type:tinyint;default:1" json:"step"` // 步骤
|
|
Bluetooth string `gorm:"column:bluetooth;type:char(30);not null;default:''" json:"bluetooth"` // 蓝牙
|
|
Cmos string `gorm:"column:cmos;type:char(30);not null;default:''" json:"cmos"` // 芯片
|
|
Status int32 `gorm:"column:status;type:tinyint(1);default:1" json:"status"` // 装态。1为正常,2为删除
|
|
Type int32 `gorm:"column:type;type:tinyint(1);default:1" json:"type"` // 类型,1为园屏,2为卵型屏
|
|
}
|