This commit is contained in:
aozhiwei 2024-05-11 15:41:16 +08:00
parent a50dc649a6
commit 53cbe363b6
3 changed files with 14 additions and 4 deletions

View File

@ -2,6 +2,7 @@ package system
import (
"f5"
"main/common"
"main/constant"
"main/model/system"
"net/http"
@ -30,8 +31,8 @@ func (this *MailApi) AddMail(c *gin.Context) {
UserRegEndTime int32 `json:"user_reg_end_time"`
Subject string `json:"subject"`
Content string `json:"content"`
Attachments string `json:"attachments"`
Recipients string `json:"recipients"`
Attachments []common.Attachment `json:"attachments"`
Recipients []string `json:"recipients"`
}{}
if err := c.ShouldBindJSON(&reqJson); err != nil {
c.JSON(http.StatusOK, gin.H{

View File

@ -1,5 +1,10 @@
package common
type Attachment struct {
ItemId int32 `json:"item_id"`
ItemNum int32 `json:"item_num"`
}
type App interface {
Run(func(), func())
AddSession(accountId string) string

View File

@ -1,5 +1,9 @@
package system
import (
"main/common"
)
/*
Recipients:
[
@ -23,8 +27,8 @@ type Mail struct {
MailType int32 `gorm:"column:mail_type" json:"mail_type"`
Subject string `gorm:"column:subject" json:"subject"`
Content string `gorm:"column:content" json:"content"`
Recipients string `gorm:"column:recipients" json:"recipients"`
Attachments string `gorm:"column:attachments" json:"attachments"`
Recipients []string `gorm:"column:recipients;serializer:json" json:"recipients"`
Attachments []common.Attachment `gorm:"column:attachments" 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"`