新增处理

This commit is contained in:
2024-12-24 14:07:17 +08:00
parent 6e4b37776b
commit 2a2e15c3d0
5 changed files with 36 additions and 121 deletions

View File

@@ -7,17 +7,14 @@ import (
)
type Device struct {
Id int `gorm:"column:id;primaryKey" json:"id"`
//DriverId string `gorm:"column:driver_id;comment:设备ID;type:varchar(255)" json:"driver_id"`
Imei string `gorm:"column:imei;comment:IMEI;type:varchar(255)" json:"imei"`
//DriverName string `gorm:"column:driver_name;comment:设备名称;type:varchar(255)" json:"driver_name"`
DriverPass string `gorm:"column:driver_pass;comment:设备密码;type:varchar(255)" json:"driver_pass"`
DriverVer string `gorm:"column:driver_ver;comment:固件版本;type:varchar(255)" json:"driver_ver"`
//DriverFd string `gorm:"column:driver_fd;comment:设备FD;type:varchar(255)" json:"driver_fd"`
Remark string `gorm:"column:remark;comment:备注;type:varchar(255)" json:"remark"`
Created time.Time `gorm:"column:created;autoCreateTime;comment:创建时间" json:"created"`
Updated time.Time `gorm:"column:updated;autoUpdateTime;comment:修改时间" json:"updated"`
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"`
Id int `gorm:"column:id;primaryKey" json:"id"`
Imei string `gorm:"column:imei;comment:IMEI;type:varchar(255)" json:"imei"`
DriverPass string `gorm:"column:driver_pass;comment:设备密码;type:varchar(255)" json:"driver_pass"`
DriverVer string `gorm:"column:driver_ver;comment:固件版本;type:varchar(255)" json:"driver_ver"`
Remark string `gorm:"column:remark;comment:备注;type:varchar(255)" json:"remark"`
Created time.Time `gorm:"column:created;autoCreateTime;comment:创建时间" json:"created"`
Updated time.Time `gorm:"column:updated;autoUpdateTime;comment:修改时间" json:"updated"`
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"`
}
func (r *Device) TableName() string {