gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

announcement.go (2642B)


      1 // GoToSocial
      2 // Copyright (C) GoToSocial Authors admin@gotosocial.org
      3 // SPDX-License-Identifier: AGPL-3.0-or-later
      4 //
      5 // This program is free software: you can redistribute it and/or modify
      6 // it under the terms of the GNU Affero General Public License as published by
      7 // the Free Software Foundation, either version 3 of the License, or
      8 // (at your option) any later version.
      9 //
     10 // This program is distributed in the hope that it will be useful,
     11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 // GNU Affero General Public License for more details.
     14 //
     15 // You should have received a copy of the GNU Affero General Public License
     16 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 
     18 package model
     19 
     20 // Announcement models an admin announcement for the instance.
     21 //
     22 // swagger:model announcement
     23 type Announcement struct {
     24 	// The ID of the announcement.
     25 	// example: 01FC30T7X4TNCZK0TH90QYF3M4
     26 	ID string `json:"id"`
     27 	// The body of the announcement.
     28 	// Should be HTML formatted.
     29 	// example: <p>This is an announcement. No malarky.</p>
     30 	Content string `json:"content"`
     31 	// When the announcement should begin to be displayed (ISO 8601 Datetime).
     32 	// If the announcement has no start time, this will be omitted or empty.
     33 	// example: 2021-07-30T09:20:25+00:00
     34 	StartsAt string `json:"starts_at"`
     35 	// When the announcement should stop being displayed (ISO 8601 Datetime).
     36 	// If the announcement has no end time, this will be omitted or empty.
     37 	// example: 2021-07-30T09:20:25+00:00
     38 	EndsAt string `json:"ends_at"`
     39 	// Announcement doesn't have begin time and end time, but begin day and end day.
     40 	AllDay bool `json:"all_day"`
     41 	// When the announcement was first published (ISO 8601 Datetime).
     42 	// example: 2021-07-30T09:20:25+00:00
     43 	PublishedAt string `json:"published_at"`
     44 	// When the announcement was last updated (ISO 8601 Datetime).
     45 	// example: 2021-07-30T09:20:25+00:00
     46 	UpdatedAt string `json:"updated_at"`
     47 	// Announcement is 'published', ie., visible to users.
     48 	// Announcements that are not published should be shown only to admins.
     49 	Published bool `json:"published"`
     50 	// Requesting account has seen this announcement.
     51 	Read bool `json:"read"`
     52 	// Mentions this announcement contains.
     53 	Mentions []Mention `json:"mentions"`
     54 	// Statuses contained in this announcement.
     55 	Statuses []Status `json:"statuses"`
     56 	// Tags used in this announcement.
     57 	Tags []Tag `json:"tags"`
     58 	// Emojis used in this announcement.
     59 	Emojis []Emoji `json:"emoji"`
     60 	// Reactions to this announcement.
     61 	Reactions []AnnouncementReaction `json:"reactions"`
     62 }