feat:完善项目信息
This commit is contained in:
@ -3,15 +3,18 @@ package model
|
||||
// ActivityApply 活动申请数据模型
|
||||
type ActivityApply struct {
|
||||
Model
|
||||
Local
|
||||
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"`
|
||||
ModelTenant
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
ActivityInstanceBasic
|
||||
Amount float64 `gorm:"column:amount;type:decimal(10,2);default:0;comment:活动收费金额" json:"amount"`
|
||||
Content string `gorm:"column:content;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"`
|
||||
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
|
||||
Amount float64 `gorm:"column:amount;type:decimal(10,2);default:0;comment:活动收费金额" json:"amount"`
|
||||
Content string `gorm:"column:content;type:text;comment:活动详情" json:"content"`
|
||||
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"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
@ -22,10 +25,10 @@ type ActivityApplyStatus int
|
||||
const (
|
||||
// ActivityApplyStatusForRevoke 撤销
|
||||
ActivityApplyStatusForRevoke ActivityApplyStatus = iota - 1
|
||||
// ActivityApplyStatusForExamining 审核中
|
||||
ActivityApplyStatusForExamining
|
||||
// ActivityApplyStatusForPass 审核通过
|
||||
ActivityApplyStatusForPass
|
||||
// ActivityApplyStatusForProcessing 处理中
|
||||
ActivityApplyStatusForProcessing
|
||||
// ActivityApplyStatusForProcessed 处理结束
|
||||
ActivityApplyStatusForProcessed
|
||||
)
|
||||
|
||||
func (m *ActivityApply) TableName() string {
|
||||
|
19
app/common/model/activity_apply_log.go
Normal file
19
app/common/model/activity_apply_log.go
Normal file
@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
// ActivityApplyLog 活动申请日志数据模型
|
||||
type ActivityApplyLog struct {
|
||||
Model
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
ApplyID uint64 `gorm:"column:apply_id;type:int(11);default:0;comment:活动ID" json:"apply_id"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:'';comment:备注信息" json:"remark"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *ActivityApplyLog) TableName() string {
|
||||
return "activity_apply_log"
|
||||
}
|
||||
|
||||
func NewActivityApplyLog() *ActivityApplyLog {
|
||||
return &ActivityApplyLog{}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
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
|
||||
}
|
||||
|
||||
func (m *ActivityExamine) TableName() string {
|
||||
return "activity_examine"
|
||||
}
|
||||
|
||||
func NewActivityExamine() *ActivityExamine {
|
||||
return &ActivityExamine{}
|
||||
}
|
@ -1,18 +1,27 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ActivityInstance 活动数据模型
|
||||
type ActivityInstance struct {
|
||||
Model
|
||||
ModelTenant
|
||||
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:content;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"`
|
||||
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
|
||||
Industry string `gorm:"column:industry;type:varchar(255);comment:所属领域;行业信息" json:"-"`
|
||||
Amount float64 `gorm:"column:amount;type:decimal(10,2);default:0;comment:活动收费金额" json:"amount"`
|
||||
Content string `gorm:"column:content;type:text;comment:活动详情" json:"content"`
|
||||
MaxNumber int `gorm:"column:max_number;type:int(6);default:0;comment:报名限制人数,0不做限制" json:"max_number"`
|
||||
NotifyCrowd int `gorm:"column:notify_crowd;type:tinyint(3);default:0;comment:通知人群" json:"notify_crowd"`
|
||||
IsHome int `gorm:"column:is_home;type:tinyint(1);default:0;comment:首页展示(0:不展示,1:展示)" json:"is_home"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越小,优先排序" json:"sort"`
|
||||
Status ActivityInstanceStatus `gorm:"column:status;type:tinyint(1);default:1;comment:活动状态(1:显示,2:隐藏)" json:"status"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
@ -25,17 +34,6 @@ type ActivityInstanceBasic struct {
|
||||
JoinDeadline time.Time `gorm:"column:join_deadline;type:datetime;not null;comment:报名截止时间" json:"join_deadline"`
|
||||
}
|
||||
|
||||
// ActivityInstanceMode 活动类型
|
||||
type ActivityInstanceMode int
|
||||
|
||||
const (
|
||||
// ActivityInstanceModeForOrdinary 普通活动
|
||||
ActivityInstanceModeForOrdinary ActivityInstanceMode = iota + 1
|
||||
// ActivityInstanceModeForCharge 收费活动
|
||||
ActivityInstanceModeForCharge
|
||||
)
|
||||
|
||||
// ActivityInstanceStatus 活动状态
|
||||
type ActivityInstanceStatus int
|
||||
|
||||
const (
|
||||
@ -58,6 +56,17 @@ func (m *ActivityInstanceBasic) IsCanJoin() bool {
|
||||
return m.JoinDeadline.After(time.Now())
|
||||
}
|
||||
|
||||
func (m *ActivityInstance) SetIndustryAttribute(value []string) {
|
||||
_bytes, _ := json.Marshal(value)
|
||||
m.Industry = string(_bytes)
|
||||
}
|
||||
|
||||
func (m *ActivityInstance) GetIndustryAttribute() []string {
|
||||
out := make([]string, 0)
|
||||
_ = json.Unmarshal([]byte(m.Industry), &out)
|
||||
return out
|
||||
}
|
||||
|
||||
func NewActivityInstance() *ActivityInstance {
|
||||
return &ActivityInstance{}
|
||||
}
|
||||
|
@ -2,9 +2,10 @@ package model
|
||||
|
||||
type ActivityJoin struct {
|
||||
Model
|
||||
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"`
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
Identity int `gorm:"column:identity;type:tinyint(3);default:0;comment:身份信息" 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
|
||||
}
|
||||
|
@ -6,11 +6,12 @@ import "encoding/json"
|
||||
type ServiceInnovate struct {
|
||||
Model
|
||||
ModelTenant
|
||||
KindID uint64 `gorm:"column:kind_id;type:int(11);default:0;comment:类型ID" json:"-"`
|
||||
Title string `gorm:"column:title;type:varchar(50);default:'';comment:创新服务标题" json:"title"`
|
||||
Content string `gorm:"column:content;type:text;comment:创新服务内容" json:"content"`
|
||||
Tag string `gorm:"column:tag;type:varchar(255);default:'';comment:创新服务标签" json:"-"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越小,优先排序" json:"sort"`
|
||||
KindID uint64 `gorm:"column:kind_id;type:int(11);default:0;comment:类型ID" json:"-"`
|
||||
Title string `gorm:"column:title;type:varchar(50);default:'';comment:创新服务标题" json:"title"`
|
||||
Description string `gorm:"column:description;type:varchar(255);default:'';comment:创新服务描述" json:"description"`
|
||||
Content string `gorm:"column:content;type:text;comment:创新服务内容" json:"content"`
|
||||
Tag string `gorm:"column:tag;type:varchar(255);default:'';comment:创新服务标签" json:"-"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越小,优先排序" json:"sort"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
@ -16,13 +16,13 @@ type ServiceSolutionCaseKind struct {
|
||||
type ServiceSolutionCaseMode int
|
||||
|
||||
const (
|
||||
// ServiceSolutionCaseModeForSmallCompany 中小型企业
|
||||
// ServiceSolutionCaseModeForSmallCompany 中小企业服务
|
||||
ServiceSolutionCaseModeForSmallCompany ServiceSolutionCaseMode = iota + 101
|
||||
// ServiceSolutionCaseModeForBigCompany 大型企业
|
||||
// ServiceSolutionCaseModeForBigCompany 大型企业服务
|
||||
ServiceSolutionCaseModeForBigCompany
|
||||
// ServiceSolutionCaseModeForGovernment 政府单位
|
||||
// ServiceSolutionCaseModeForGovernment 政府企业服务
|
||||
ServiceSolutionCaseModeForGovernment
|
||||
// ServiceSolutionCaseModeForResearch 科研机构
|
||||
// ServiceSolutionCaseModeForResearch 科研院所服务
|
||||
ServiceSolutionCaseModeForResearch
|
||||
)
|
||||
|
||||
@ -32,13 +32,13 @@ func (m *ServiceSolutionCaseKind) TableName() string {
|
||||
|
||||
func (m *ServiceSolutionCaseKind) ModeTitle() string {
|
||||
if m.Mode == ServiceSolutionCaseModeForSmallCompany {
|
||||
return "中小型企业"
|
||||
return "中小企业服务"
|
||||
} else if m.Mode == ServiceSolutionCaseModeForBigCompany {
|
||||
return "大型企业"
|
||||
return "大型企业服务"
|
||||
} else if m.Mode == ServiceSolutionCaseModeForGovernment {
|
||||
return "政府单位"
|
||||
return "政府企业服务"
|
||||
} else if m.Mode == ServiceSolutionCaseModeForResearch {
|
||||
return "科研机构"
|
||||
return "科研院所服务"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ type SysMenu struct {
|
||||
Model
|
||||
SysMenuBasic
|
||||
Auth string `gorm:"column:auth;type:varchar(100);default:'';comment:权限/路由" json:"auth"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越大,优先排序" json:"sort"`
|
||||
Sort int `gorm:"column:sort;type:tinyint(3);default:0;comment:排序,数值越小,优先排序" json:"sort"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:'';comment:菜单备注" json:"remark"`
|
||||
Status SysMenuStatus `gorm:"column:status;type:tinyint(1);default:1;comment:状态" json:"status"`
|
||||
ModelDeleted
|
||||
|
Reference in New Issue
Block a user