2022-02-03 16:44:08 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
2022-02-21 10:43:39 +00:00
|
|
|
"github.com/jhillyerd/enmime"
|
2022-02-03 16:44:08 +00:00
|
|
|
"net/textproto"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Article struct {
|
2022-02-05 16:03:54 +00:00
|
|
|
ID int `db:"id"`
|
|
|
|
CreatedAt time.Time `db:"created_at"`
|
|
|
|
HeaderRaw string `db:"header"`
|
|
|
|
Body string `db:"body"`
|
|
|
|
Thread sql.NullString `db:"thread"`
|
|
|
|
|
|
|
|
Header textproto.MIMEHeader `db:"-"`
|
2022-02-21 10:43:39 +00:00
|
|
|
Envelope *enmime.Envelope `db:"-"`
|
2022-02-05 16:03:54 +00:00
|
|
|
ArticleNumber int `db:"-"`
|
2022-04-12 00:29:22 +00:00
|
|
|
Attachments []Attachment
|
|
|
|
}
|
|
|
|
|
|
|
|
type Attachment struct {
|
|
|
|
ContentType string `db:"content_type"`
|
|
|
|
FileName string `db:"attachment_id"`
|
2022-02-03 16:44:08 +00:00
|
|
|
}
|