package models // Character is a common data model representing an RP character or NPC. type Character struct { ID string `json:"id" bson:"_id"` Nicks []string `json:"nicks" bson:"nicks"` Name string `json:"name" bson:"name"` ShortName string `json:"shortName" bson:"shortName"` Author string `json:"author" bson:"author"` Description string `json:"description" bson:"description"` } // Nick gets the character's nick. func (character *Character) Nick() *string { if len(character.Nicks[0]) == 0 { return nil } return &character.Nicks[0] }