2025-04-24 20:39:31 +08:00

35 lines
542 B
Go

package model
import (
"admin/internal/db"
"gorm.io/gorm"
"time"
)
func init() {
db.RegisterTableModels(RoleMail{})
}
type MailAttachItem struct {
ID int32
Num int64
ItemType int
}
type RoleMail struct {
ID int `gorm:"primarykey"`
RoleIDs string
ServerID int
Title string
Content string
Attach []*MailAttachItem `gorm:"type:json;serializer:json"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
func (lm *RoleMail) TableName() string {
return "mock_mailrole"
}