Files
platform/web/models/announcement.gen.go

33 lines
1.3 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package models
import (
"platform/web/common"
"gorm.io/gorm"
)
const TableNameAnnouncement = "announcement"
// Announcement mapped from table <announcement>
type Announcement struct {
CreatedAt common.LocalDateTime `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt common.LocalDateTime `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
Type int32 `gorm:"column:type;not null;default:1" json:"type"`
Status int32 `gorm:"column:status;not null;default:1" json:"status"`
Sort int32 `gorm:"column:sort;not null" json:"sort"`
Pin bool `gorm:"column:pin;not null" json:"pin"`
Title string `gorm:"column:title;not null" json:"title"`
Content string `gorm:"column:content;not null" json:"content"`
}
// TableName Announcement's table name
func (*Announcement) TableName() string {
return TableNameAnnouncement
}