feat:完善项目信息
This commit is contained in:
@ -8,15 +8,17 @@ import (
|
||||
type ManageLaboratory struct {
|
||||
Model
|
||||
Local
|
||||
ResearchID uint64 `gorm:"column:research_id;type:int(11);default:0;comment:科研机构ID" json:"-"`
|
||||
Name string `gorm:"column:name;type:varchar(30);default:'';comment:名称" json:"name"`
|
||||
Code string `gorm:"column:code;type:varchar(30);default:'';comment:信用代码" json:"code"`
|
||||
ResearchID uint64 `gorm:"column:research_id;type:int(11);default:0;comment:科研机构ID" json:"-"`
|
||||
Name string `gorm:"column:name;type:varchar(30);default:'';comment:名称" json:"name"`
|
||||
Code string `gorm:"column:code;type:varchar(30);default:'';comment:信用代码" json:"code"`
|
||||
Contact string `gorm:"column:contact;type:varchar(20);default:'';comment:联系人" json:"contact"`
|
||||
ContactMobile string `gorm:"column:contact_mobile;type:varchar(15);default:'';comment:联系方式" json:"contact_mobile"`
|
||||
Image
|
||||
Area
|
||||
Url string `gorm:"column:url;type:varchar(255);default:'';comment:实验室网站" json:"url"`
|
||||
Position string `gorm:"column:position;type:varchar(50);default:'';comment:坐标" json:"-"`
|
||||
Industry string `gorm:"column:industry;type:varchar(255);default:'';comment:行业领域" json:"-"`
|
||||
Keyword string `gorm:"column:keyword;type:varchar(255);default:'';comment:关键词" json:"keyword"`
|
||||
Keyword string `gorm:"column:keyword;type:varchar(255);default:'';comment:关键词" json:"-"`
|
||||
Research string `gorm:"column:research;type:varchar(255);default:'';comment:研究信息" json:"research"`
|
||||
Introduce string `gorm:"column:introduce;type:text;comment:介绍描述" json:"introduce"`
|
||||
Examine
|
||||
|
26
app/common/model/user_collect.go
Normal file
26
app/common/model/user_collect.go
Normal file
@ -0,0 +1,26 @@
|
||||
package model
|
||||
|
||||
// UserCollect 用户收藏管理数据模型
|
||||
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"`
|
||||
ObjectID uint64 `gorm:"column:object_id;type:int(11);default:0;comment:收藏对象ID" json:"-"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
type UserCollectKind int
|
||||
|
||||
const (
|
||||
// UserCollectKindForLaboratory 实验室
|
||||
UserCollectKindForLaboratory UserCollectKind = iota + 1
|
||||
)
|
||||
|
||||
func (m *UserCollect) TableName() string {
|
||||
return "user_collect"
|
||||
}
|
||||
|
||||
func NewUserCollect() *UserCollect {
|
||||
return &UserCollect{}
|
||||
}
|
30
app/common/model/user_visit.go
Normal file
30
app/common/model/user_visit.go
Normal file
@ -0,0 +1,30 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// UserVisit 用户浏览记录数据模型
|
||||
type UserVisit struct {
|
||||
Model
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
Kind UserVisitKind `gorm:"column:kind;type:tinyint(3);default:0;comment:收藏数据类型" json:"kind"`
|
||||
ObjectID uint64 `gorm:"column:object_id;type:int(11);default:0;comment:收藏对象ID" json:"-"`
|
||||
Count int `gorm:"column:count;type:int(8);default:0;comment:浏览次数" json:"count"`
|
||||
Date time.Time `gorm:"column:date;type:datetime;not null;comment:最后浏览时间" json:"date"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
type UserVisitKind int
|
||||
|
||||
const (
|
||||
// UserVisitKindForLaboratory 实验室
|
||||
UserVisitKindForLaboratory UserCollectKind = iota + 1
|
||||
)
|
||||
|
||||
func (m *UserVisit) TableName() string {
|
||||
return "user_visit"
|
||||
}
|
||||
|
||||
func NewUserVisit() *UserVisit {
|
||||
return &UserVisit{}
|
||||
}
|
Reference in New Issue
Block a user