feat:完善项目信息

This commit is contained in:
henry
2022-01-20 17:22:05 +08:00
parent bfa9af1654
commit 7a9c8f9e56
11 changed files with 53 additions and 24 deletions

View File

@ -21,7 +21,7 @@ type IModel interface {
// Model
type Model struct {
ID uint64 `gorm:"column:id;primaryKey;autoIncrement;type:int(11);comment:主键" json:"-"`
ID uint64 `gorm:"column:id;primaryKey;autoIncrement;comment:主键" json:"-" form:"id"` // 主键
Database string `json:"-" gorm:"-"`
}

View File

@ -3,7 +3,9 @@ package model
// ServiceDocking 对接信息数据模型
type ServiceDocking struct {
Model
ModelTenant
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
IP string `gorm:"column:ip;type:char(16);default:'';comment:IP地址" json:"ip"`
ModelDeleted
ModelAt
}

View File

@ -4,7 +4,7 @@ package model
type UserCollect struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
Kind UserCollectKind `gorm:"column:kind;type:tinyint(3);default:0;comment:收藏数据类型" json:"kind"`
Kind UserCollectKind `gorm:"column:kind;type:smallint(6);default:0;comment:收藏数据类型" json:"kind"`
ObjectID uint64 `gorm:"column:object_id;type:int(11);default:0;comment:收藏对象ID" json:"-"`
ModelDeleted
ModelAt
@ -14,7 +14,7 @@ type UserCollectKind int
const (
// UserCollectKindForLaboratory 实验室
UserCollectKindForLaboratory UserCollectKind = iota + 1
UserCollectKindForLaboratory UserCollectKind = iota + 1001
// UserCollectKindForExpert 专家
UserCollectKindForExpert
// UserCollectKindForCompany 公司