Help us shape the future of Go! Take the 2026 Go Developer Survey

announcement

package
v1.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package announcement holds the announcement row (the announcement table) and its list filter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcement

type Announcement struct {
	Id        int64     `gorm:"primaryKey"`
	Title     string    `gorm:"type:varchar(255);not null;default:'';comment:Title"`
	Content   string    `gorm:"type:text;comment:Content"`
	Show      *bool     `gorm:"type:tinyint(1);not null;default:0;comment:Show"`
	Pinned    *bool     `gorm:"type:tinyint(1);not null;default:0;comment:Pinned"`
	Popup     *bool     `gorm:"type:tinyint(1);not null;default:0;comment:Popup"`
	CreatedAt time.Time `gorm:"<-:create;comment:Create Time"`
	UpdatedAt time.Time `gorm:"comment:Update Time"`
}

func (Announcement) TableName

func (Announcement) TableName() string

type Filter

type Filter struct {
	Show   *bool
	Pinned *bool
	Popup  *bool
	Search string
}

Filter selects a page of the announcement list.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL