Files
cas_tt_cloud_backend/app/common/model/activity_apply.go
2022-01-13 15:23:27 +08:00

42 lines
1.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
// ActivityApply 活动申请数据模型
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"`
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"`
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
}
// ActivityApplyStatus 审核状态
type ActivityApplyStatus int
const (
// ActivityApplyStatusForRevoke 撤销
ActivityApplyStatusForRevoke ActivityApplyStatus = iota - 1
// ActivityApplyStatusForProcessing 处理中
ActivityApplyStatusForProcessing
// ActivityApplyStatusForProcessed 处理结束
ActivityApplyStatusForProcessed
)
func (m *ActivityApply) TableName() string {
return "activity_apply"
}
func NewActivityApply() *ActivityApply {
return &ActivityApply{}
}