This commit is contained in:
aozhiwei 2024-04-13 15:41:26 +08:00
parent a6fb94c21e
commit 8b32ce6c89
2 changed files with 18 additions and 16 deletions

View File

@ -7,28 +7,25 @@ import (
//"strings" //"strings"
) )
type attachment struct {
itemId int32
itemNum int32
}
type mail struct { type mail struct {
GameId int `json:"-"` malid int64
MailId int64 `json:"mailid,string"` subject string
From string `json:"from"` content string
To string `json:"to"` sendTime int32
Subject string `json:"subject"` expireTime int32
Content string `json:"content"` attachments []*attachment
Flag int `json:"flags"`
SendTime int32 `json:"sendtime"`
ExpireTime int32 `json:"expiretime"`
MailType int `json:"mailtype"`
MailSubType int `json:"mailsubtype"`
UserType int `json:"-"`
CreateTime int32 `json:"-"`
Ext string `json:"ext"`
} }
func (m *mail) Init() { func (this *mail) Init() {
} }
func NewMail() *mail { func newMail() *mail {
m := new(mail) m := new(mail)
m.Init() m.Init()
return m return m

View File

@ -11,9 +11,14 @@ type userMail struct {
userMailHash map[string]map[string]*mail userMailHash map[string]map[string]*mail
} }
type group struct {
userHash map[string]int32
}
type mailMgr struct { type mailMgr struct {
idHash map[int64]*mail idHash map[int64]*mail
userMailArr [1024]*userMail userMailArr [1024]*userMail
groupHash map[string]*group
} }
func (this *mailMgr) Init() { func (this *mailMgr) Init() {