28 lines
499 B
Go
28 lines
499 B
Go
package model
|
|
|
|
import (
|
|
"admin/internal/db"
|
|
"gorm.io/gorm"
|
|
"time"
|
|
)
|
|
|
|
func init() {
|
|
db.RegisterTableModels(GlobalMail{})
|
|
}
|
|
|
|
type GlobalMail struct {
|
|
ID int `gorm:"primarykey"`
|
|
ServerIDs []int `gorm:"type:json;serializer:json"`
|
|
Title string
|
|
Content string
|
|
Attach []*MailAttachItem `gorm:"type:json;serializer:json"`
|
|
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
|
}
|
|
|
|
func (lm *GlobalMail) TableName() string {
|
|
return "mock_mailglobal"
|
|
}
|