1package boards23import "time"45// Board defines a type for boards.6type Board struct {7 // ID is the unique identifier of the board.8 ID ID910 // Name is the current name of the board.11 Name string1213 // Aliases contains a list of alternative names for the board.14 Aliases []string1516 // Readonly indicates that the board is readonly.17 Readonly bool1819 // Threads contains board threads.20 Threads PostStorage2122 // ThreadsSequence generates sequential ID for new threads.23 ThreadsSequence IdentifierGenerator2425 // Permissions enables support for permissioned boards.26 // This type of boards allows managing members with roles and permissions.27 // It also enables the implementation of permissioned execution of board related features.28 Permissions Permissions2930 // Creator is the account address that created the board.31 Creator address3233 // Meta allows storing board metadata.34 Meta any3536 // CreatedAt is the board's creation time.37 CreatedAt time.Time3839 // UpdatedAt is the board's update time.40 UpdatedAt time.Time41}4243// New creates a new basic non permissioned board.44func New(id ID) *Board {45 return &Board{46 ID: id,47 Threads: NewPostStorage(),48 ThreadsSequence: NewIdentifierGenerator(),49 CreatedAt: time.Now(),50 }51}5253// SetID sets board ID value.54func (board *Board) SetID(v ID) {55 board.ID = v56}5758// SetName sets name value.59func (board *Board) SetName(v string) {60 board.Name = v61}6263// SetAliases sets board name aliases.64func (board *Board) SetAliases(v []string) {65 board.Aliases = v66}6768// SetReadonly sets readonly value.69func (board *Board) SetReadonly(v bool) {70 board.Readonly = v71}7273// SetThreadStorage sets the storage where board threads are stored.74func (board *Board) SetThreadStorage(v PostStorage) {75 board.Threads = v76}7778// SetThreadsSequence sets the sequential thread ID generator.79func (board *Board) SetThreadsSequence(v IdentifierGenerator) {80 board.ThreadsSequence = v81}8283// SetPermissions sets permissions value.84func (board *Board) SetPermissions(v Permissions) {85 board.Permissions = v86}8788// SetCreator sets the address of the account that created the board.89func (board *Board) SetCreator(v address) {90 board.Creator = v91}9293// SetCreatedAt sets the time when board was created.94func (board *Board) SetCreatedAt(v time.Time) {95 board.CreatedAt = v96}9798// SetUpdatedAt sets the time when a board value was updated.99func (board *Board) SetUpdatedAt(v time.Time) {100 board.UpdatedAt = v101}102103// SetMeta sets board metadata.104func (board *Board) SetMeta(v any) {105 board.Meta = v106}107Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.