1
This commit is contained in:
parent
a50dc649a6
commit
53cbe363b6
@ -2,6 +2,7 @@ package system
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"f5"
|
"f5"
|
||||||
|
"main/common"
|
||||||
"main/constant"
|
"main/constant"
|
||||||
"main/model/system"
|
"main/model/system"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -30,8 +31,8 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
|||||||
UserRegEndTime int32 `json:"user_reg_end_time"`
|
UserRegEndTime int32 `json:"user_reg_end_time"`
|
||||||
Subject string `json:"subject"`
|
Subject string `json:"subject"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
Attachments string `json:"attachments"`
|
Attachments []common.Attachment `json:"attachments"`
|
||||||
Recipients string `json:"recipients"`
|
Recipients []string `json:"recipients"`
|
||||||
}{}
|
}{}
|
||||||
if err := c.ShouldBindJSON(&reqJson); err != nil {
|
if err := c.ShouldBindJSON(&reqJson); err != nil {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
|
type Attachment struct {
|
||||||
|
ItemId int32 `json:"item_id"`
|
||||||
|
ItemNum int32 `json:"item_num"`
|
||||||
|
}
|
||||||
|
|
||||||
type App interface {
|
type App interface {
|
||||||
Run(func(), func())
|
Run(func(), func())
|
||||||
AddSession(accountId string) string
|
AddSession(accountId string) string
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
|
import (
|
||||||
|
"main/common"
|
||||||
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Recipients:
|
Recipients:
|
||||||
[
|
[
|
||||||
@ -23,8 +27,8 @@ type Mail struct {
|
|||||||
MailType int32 `gorm:"column:mail_type" json:"mail_type"`
|
MailType int32 `gorm:"column:mail_type" json:"mail_type"`
|
||||||
Subject string `gorm:"column:subject" json:"subject"`
|
Subject string `gorm:"column:subject" json:"subject"`
|
||||||
Content string `gorm:"column:content" json:"content"`
|
Content string `gorm:"column:content" json:"content"`
|
||||||
Recipients string `gorm:"column:recipients" json:"recipients"`
|
Recipients []string `gorm:"column:recipients;serializer:json" json:"recipients"`
|
||||||
Attachments string `gorm:"column:attachments" json:"attachments"`
|
Attachments []common.Attachment `gorm:"column:attachments" json:"attachments"`
|
||||||
Deleted int32 `gorm:"column:deleted" json:"deleted"`
|
Deleted int32 `gorm:"column:deleted" json:"deleted"`
|
||||||
SendTime int32 `gorm:"column:sendtime" json:"sendtime"`
|
SendTime int32 `gorm:"column:sendtime" json:"sendtime"`
|
||||||
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
|
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user