feat:完善项目管理,增加网站活动管理

This commit is contained in:
henry
2021-12-15 17:36:56 +08:00
parent ba62a25e4b
commit a59759379c
13 changed files with 281 additions and 26 deletions

View File

@ -134,6 +134,9 @@ func initModel() {
&synchronized{iModel: model.NewTechnologyPaper()}, &synchronized{iModel: model.NewTechnologyProduct()},
&synchronized{iModel: model.NewTechnologyProject()}, &synchronized{iModel: model.NewTechnologyTopic()},
&synchronized{iModel: model.NewServiceDocking()},
// 活动管理
&synchronized{iModel: model.NewActivityInstance()}, &synchronized{iModel: model.NewActivityApply()},
&synchronized{iModel: model.NewActivityExamine()}, &synchronized{iModel: model.NewActivityJoin()},
)
}
func initCacheMode() {

View File

@ -4,9 +4,11 @@ package model
type ActivityApply struct {
Model
Local
IdentityUID uint64 `gorm:"column:identity_uid;type:int;default:0;comment:用户身份表uuid" json:"-"`
Mode ActivityInstanceMode `gorm:"column:mode;type:tinyint(1);default:1;comment:活动模式" json:"mode"`
IdentityUID uint64 `gorm:"column:identity_uid;type:int;default:0;comment:用户身份表uuid" json:"-"`
Image
Mode ActivityInstanceMode `gorm:"column:mode;type:tinyint(1);default:1;comment:活动模式" json:"mode"`
ActivityInstanceBasic
Amount float64 `gorm:"column:amount;type:decimal(10,2);default:0;comment:活动收费金额" json:"amount"`
Content string `gorm:"column:title;type:text;comment:活动详情" json:"content"`
MaxNumber int `gorm:"column:max_number;type:int(6);default:0;comment:报名限制人数0不做限制" json:"max_number"`
Status ActivityApplyStatus `gorm:"column:status;type:tinyint(1);default:0;comment:审核状态" json:"status"`

View File

@ -1,7 +1,11 @@
package model
// ActivityExamine 活动审核数据模型
type ActivityExamine struct {
Model
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
ActivityID uint64 `gorm:"column:activity_id;type:int(11);default:0;comment:活动ID" json:"activity_id"`
Examine
ModelDeleted
ModelAt
}

View File

@ -6,9 +6,10 @@ import "time"
type ActivityInstance struct {
Model
Local
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份来源" json:"-"`
Mode ActivityInstanceMode `gorm:"column:mode;type:tinyint(1);default:1;comment:活动模式" json:"mode"`
Mode ActivityInstanceMode `gorm:"column:mode;type:tinyint(1);default:1;comment:活动模式" json:"mode"`
Image
ActivityInstanceBasic
Amount float64 `gorm:"column:amount;type:decimal(10,2);default:0;comment:活动收费金额" json:"amount"`
Content string `gorm:"column:title;type:text;comment:活动详情" json:"content"`
MaxNumber int `gorm:"column:max_number;type:int(6);default:0;comment:报名限制人数0不做限制" json:"max_number"`
Status ActivityInstanceStatus `gorm:"column:status;type:tinyint(1);default:1;comment:活动状态1显示2隐藏" json:"status"`

View File

@ -2,9 +2,9 @@ package model
type ActivityJoin struct {
Model
MUid uint64 `gorm:"column:m_uid;type:int;default:0;comment:用户manage_uuid" json:"-"`
ActivityID uint64 `gorm:"column:activity_id;type:int(11);default:0;comment:活动ID" json:"activity_id"`
Status ActivityJoinStatus `gorm:"column:status;type:tinyint(1);default:1;comment:报名状态(-1取消1报名成功" json:"status"`
IdentityUID uint64 `gorm:"column:identity_uid;type:int;default:0;comment:用户身份表uuid" json:"-"`
ActivityID uint64 `gorm:"column:activity_id;type:int(11);default:0;comment:活动ID" json:"activity_id"`
Status ActivityJoinStatus `gorm:"column:status;type:tinyint(1);default:1;comment:报名状态(-1取消1报名成功" json:"status"`
ModelDeleted
ModelAt
}