mirror of https://github.com/go-sonic/sonic.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
2.3 KiB
Go
40 lines
2.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 entity
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/go-sonic/sonic/consts"
|
|
)
|
|
|
|
const TableNameComment = "comment"
|
|
|
|
// Comment mapped from table <comment>
|
|
type Comment struct {
|
|
ID int32 `gorm:"column:id;type:int;primaryKey;autoIncrement:true" json:"id"`
|
|
Type consts.CommentType `gorm:"column:type;type:bigint;not null;index:comment_type_status,priority:1" json:"type"`
|
|
CreateTime time.Time `gorm:"column:create_time;type:datetime;not null" json:"create_time"`
|
|
UpdateTime *time.Time `gorm:"column:update_time;type:datetime" json:"update_time"`
|
|
AllowNotification bool `gorm:"column:allow_notification;type:tinyint(1);not null;default:1" json:"allow_notification"`
|
|
Author string `gorm:"column:author;type:varchar(50);not null" json:"author"`
|
|
AuthorURL string `gorm:"column:author_url;type:varchar(511);not null" json:"author_url"`
|
|
Content string `gorm:"column:content;type:varchar(1023);not null" json:"content"`
|
|
Email string `gorm:"column:email;type:varchar(255);not null" json:"email"`
|
|
GravatarMd5 string `gorm:"column:gravatar_md5;type:varchar(127);not null" json:"gravatar_md5"`
|
|
IPAddress string `gorm:"column:ip_address;type:varchar(127);not null" json:"ip_address"`
|
|
IsAdmin bool `gorm:"column:is_admin;type:tinyint(1);not null" json:"is_admin"`
|
|
ParentID int32 `gorm:"column:parent_id;type:int;not null;index:comment_parent_id,priority:1" json:"parent_id"`
|
|
PostID int32 `gorm:"column:post_id;type:int;not null;index:comment_post_id,priority:1" json:"post_id"`
|
|
Status consts.CommentStatus `gorm:"column:status;type:bigint;not null;index:comment_type_status,priority:2;default:0" json:"status"`
|
|
TopPriority int32 `gorm:"column:top_priority;type:int;not null" json:"top_priority"`
|
|
UserAgent string `gorm:"column:user_agent;type:varchar(511);not null" json:"user_agent"`
|
|
}
|
|
|
|
// TableName Comment's table name
|
|
func (*Comment) TableName() string {
|
|
return TableNameComment
|
|
}
|