From 71400f936f5a98f8d76eda8a585825c25cc3a08e Mon Sep 17 00:00:00 2001 From: godLei6 <603785348@qq.com> Date: Mon, 4 Sep 2023 14:07:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E4=B8=BB=E9=94=AE?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=BC=9A=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dmsvr/internal/repo/relationDB/model.go | 2 +- src/syssvr/internal/repo/relationDB/model.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dmsvr/internal/repo/relationDB/model.go b/src/dmsvr/internal/repo/relationDB/model.go index d68bc536a..51c53a1ea 100644 --- a/src/dmsvr/internal/repo/relationDB/model.go +++ b/src/dmsvr/internal/repo/relationDB/model.go @@ -105,7 +105,7 @@ func (m *DmDeviceInfo) TableName() string { // 设备分组信息表 type DmGroupInfo struct { - GroupID int64 `gorm:"column:group_id;primary_key;type:bigint"` // 分组ID + GroupID int64 `gorm:"column:group_id;primary_key;AUTO_INCREMENT;type:bigint"` // 分组ID ParentID int64 `gorm:"column:parent_id;type:bigint;default:0;NOT NULL"` // 父组ID 0-根组 ProjectID int64 `gorm:"column:project_id;index;type:bigint;default:0;NOT NULL"` // 项目ID(雪花ID) ProductID string `gorm:"column:product_id;type:char(11);NOT NULL"` // 产品id,为空则不限定分组内的产品类型 diff --git a/src/syssvr/internal/repo/relationDB/model.go b/src/syssvr/internal/repo/relationDB/model.go index ef6d1a204..2b4399419 100644 --- a/src/syssvr/internal/repo/relationDB/model.go +++ b/src/syssvr/internal/repo/relationDB/model.go @@ -13,7 +13,7 @@ type SysExample struct { // 用户登录信息表 type SysUserInfo struct { - UserID int64 `gorm:"column:user_id;primary_key;type:BIGINT;NOT NULL"` // 用户id + UserID int64 `gorm:"column:user_id;primary_key;AUTO_INCREMENT;type:BIGINT;NOT NULL"` // 用户id UserName sql.NullString `gorm:"column:user_name;uniqueIndex;type:VARCHAR(20)"` // 登录用户名 Password string `gorm:"column:password;type:CHAR(32);NOT NULL"` // 登录密码 Email sql.NullString `gorm:"column:email;uniqueIndex;type:VARCHAR(255)"` // 邮箱