2025-10-16 13:28:24 +08:00

29 lines
1.4 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 model
import (
"time"
)
const TableNameArticle = "article"
// Article 文章表
type Article struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"` // 主键
Title string `gorm:"column:title;not null;comment:文章标题" json:"title"` // 文章标题
CoverImage string `gorm:"column:cover_image;not null;comment:文章封面图" json:"cover_image"` // 文章封面图
Content string `gorm:"column:content;not null;comment:文章内容" json:"content"` // 文章内容
CreatedUser string `gorm:"column:created_user;not null;comment:创建人" json:"created_user"` // 创建人
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
UpdatedUser string `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"` // 更新人
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
}
// TableName Article's table name
func (*Article) TableName() string {
return TableNameArticle
}