1
0
mirror of https://github.com/mgerb/tmail synced 2026-01-09 01:12:47 +00:00
Files
tmail/mail/mail.go
2018-02-01 12:01:05 -06:00

23 lines
383 B
Go

package mail
import (
"github.com/mgerb/tmail/db"
log "github.com/sirupsen/logrus"
)
type Mail struct {
ID int `storm:"increment" json:"id"`
From string `json:"from"`
To string `storm:"index" json:"to"`
Subject string `json:"subject"`
Content string `json:"content"`
}
func (m *Mail) Save() {
err := db.Conn.Save(m)
if err != nil {
log.Error(err)
}
}