24 lines
602 B
Go
24 lines
602 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
// Mail represents a private message between users.
|
|
//
|
|
// Original: struct Mail_Data in MAIL.H + body in .Data file
|
|
// Changes:
|
|
// - ID replaces positional slot
|
|
// - ToID/FromID replace To_Code/From_Code
|
|
// - Body stored inline
|
|
// - Read flag is new (original had no read tracking)
|
|
type Mail struct {
|
|
ID int64
|
|
Title string
|
|
Author string // Display name of sender
|
|
FromID int64 // Sender's user ID
|
|
ToID int64 // Recipient's user ID
|
|
Recipient string // Display name of recipient
|
|
Body string
|
|
Read bool
|
|
CreatedAt time.Time
|
|
}
|