package model import "time" // THREAD ||--|{ MESSAGE: "populated by" type Message struct { ID string URL string TS uint64 Author string Plaintext string Updated uint64 } func NewMessage(ID, URL string, TS uint64, Author, Plaintext string) Message { return Message{ ID: ID, URL: URL, TS: TS, Author: Author, Plaintext: Plaintext, Updated: uint64(time.Now().UnixNano() / int64(time.Millisecond)), } }