feat:完善项目信息

This commit is contained in:
henry
2022-01-13 15:23:27 +08:00
parent e3909112ce
commit 0494bbf5d0
18 changed files with 396 additions and 15 deletions

View File

@ -122,6 +122,7 @@ func (this *Instance) Handle() {
}},
&synchronized{iModel: model.NewSysNavigation()},
&synchronized{iModel: model.NewSysAbout()},
&synchronized{iModel: model.NewSysBanner()},
// 日志管理
&synchronized{iModel: model.NewSysLog()}, &synchronized{iModel: model.NewSysUserLoginLog()},
// 用户管理

View File

@ -5,7 +5,7 @@ type ActivityApply struct {
Model
ModelTenant
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份信息" json:"-"`
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份信息" json:"identity"`
ActivityInstanceBasic
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"`
@ -15,7 +15,7 @@ type ActivityApply struct {
MaxNumber int `gorm:"column:max_number;type:int(6);default:0;comment:报名限制人数0不做限制" json:"max_number"`
Address string `gorm:"column:address;type:varchar(255);default:'';comment:活动地址" json:"address"`
NotifyCrowd int `gorm:"column:notify_crowd;type:tinyint(3);default:0;comment:通知人群" json:"notify_crowd"`
Status ActivityApplyStatus `gorm:"column:status;type:tinyint(1);default:0;comment:审状态" json:"status"`
Status ActivityApplyStatus `gorm:"column:status;type:tinyint(1);default:0;comment:审状态" json:"status"`
ModelDeleted
ModelAt
}

View File

@ -4,6 +4,7 @@ import (
config2 "SciencesServer/app/basic/config"
"SciencesServer/config"
"SciencesServer/utils"
"encoding/json"
"strings"
"time"
)
@ -55,6 +56,11 @@ func (m *Images) AnalysisSlice(domain string) []string {
return images
}
func (m *Images) SetImagesAttribute(value []string) {
_bytes, _ := json.Marshal(value)
m.Images = string(_bytes)
}
type Local struct {
Local string `gorm:"column:local;type:varchar(8);default:'';comment:数据位置来源" json:"-"`
}

View File

@ -1,7 +1,16 @@
package model
// SysBanner Banner数据管理模型
type SysBanner struct {
Model
ModelTenant
Title string `gorm:"column:title;type:varchar(255);default:'';comment:名称标题" json:"title"`
Local string `gorm:"column:local;type:varchar(255);default:'';comment:所在位置" json:"local"`
Key string `gorm:"column:key;type:varchar(100);default:'';comment:不做参考,页面唯一标识" json:"key"`
Images
Size string `gorm:"column:size;type:varchar(15);default:'';comment:图片尺寸" json:"size"`
IsMultiple int `gorm:"column:is_multiple;type:tinyint(1);default:0;comment:是否多图" json:"is_multiple"`
Remark string `gorm:"column:remark;type:varchar(255);default:'';comment:备注" json:"remark"`
ModelDeleted
ModelAt
}