aozhiwei a8a8480a68 1
2024-08-06 22:30:41 +08:00

47 lines
1.3 KiB
Go

package system
import (
"main/common"
)
/*
Recipients:
[
"account_id1",
"account_id2",
"@group_id1",
"@group_id2",
]
Attachments:
[
{
"item_id": 100001,
"item_num": 100
}
]
*/
type Mail struct {
UniKey *string `gorm:"column:unikey" json:"unikey"`
MailId int64 `gorm:"primaryKey;column:mail_id;<-:create" json:"mail_id,string"`
MailType int32 `gorm:"column:mail_type;<-:create" json:"mail_type"`
Subject string `gorm:"column:subject" json:"subject"`
Content string `gorm:"column:content" json:"content"`
Recipients []string `gorm:"column:recipients;serializer:json" json:"recipients"`
Attachments []common.Attachment `gorm:"column:attachments;serializer:json" json:"attachments"`
Deleted int32 `gorm:"column:deleted" json:"deleted"`
SendTime int32 `gorm:"column:sendtime" json:"sendtime"`
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
UserRegEndTime int32 `gorm:"column:user_reg_end_time" json:"user_reg_end_time"`
Tag1 int32 `gorm:"column:tag1" json:"tag1"`
Tag2 int32 `gorm:"column:tag2;" json:"tag2"`
ExpireTime int32 `gorm:"column:expiretime" json:"expiretime"`
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
}
func (Mail) TableName() string {
return "t_mail"
}