Documentation ¶
Index ¶
- Variables
- type Article
- type ArticleComment
- type ArticleCommentMeta
- type ArticleMeta
- type Class
- type ClassMeta
- type Comment
- type CommentMeta
- type Date
- type File
- type FileMeta
- type Like
- type LikeMeta
- type Reply
- type ReplyMeta
- type Share
- type ShareComment
- type ShareCommentMeta
- type ShareMeta
- type SystemUser
- type TableGroup
- type TableList
- type TableMeta
- type UserMeta
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModelTableGroup = &TableGroup{ "main": SystemTableList, } // SystemTableList // @Date: 2023-02-06 22:33:32 // 系统表 SystemTableList = []TableMeta{ SystemUser{}, Class{}, File{}, Article{}, ArticleComment{}, Share{}, ShareComment{}, Comment{}, Reply{}, Like{}, } )
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { ArticleMeta SystemUser SystemUser `gorm:"foreignKey:UserId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` Class Class `gorm:"foreignKey:ClassId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` UserId uint `gorm:"comment:作者ID;" json:"userid"` ClassId uint `gorm:"comment:分类ID;" json:"classId"` Title string `gorm:"comment:文章标题;type:varchar(100);" json:"title"` Cover string `gorm:"comment:文章封面;type:varchar(255);" json:"cover"` Label string `gorm:"comment:文章标签;type:varchar(50);" json:"label"` Summary string `gorm:"comment:文章摘要;type:varchar(255);" json:"summary"` View int `gorm:"comment:浏览量;" json:"view"` Content string `gorm:"comment:文章内容;type:longtext;" json:"content"` gorm.Model }
Article @Date 2023-02-18 18:03:55 @Description: 文章数据库表
type ArticleComment ¶
type ArticleComment struct { ArticleCommentMeta Comment Comment `gorm:"foreignKey:CommentId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` Article Article `gorm:"foreignKey:ArticleId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` CommentId uint `json:"commentId" gorm:"comment:评论ID;primaryKey;"` ArticleId uint `json:"articleId" gorm:"comment:关联的文章ID;primaryKey;"` }
ArticleComment @Date 2023-02-23 20:21:38 @Description: 文章评论关联表
type ArticleCommentMeta ¶
type ArticleCommentMeta struct{}
func (ArticleCommentMeta) TableComment ¶
func (ArticleCommentMeta) TableComment() string
func (ArticleCommentMeta) TableName ¶
func (ArticleCommentMeta) TableName() string
type ArticleMeta ¶
type ArticleMeta struct{}
func (ArticleMeta) TableComment ¶
func (ArticleMeta) TableComment() string
func (ArticleMeta) TableName ¶
func (ArticleMeta) TableName() string
type Comment ¶
type Comment struct { CommentMeta User SystemUser `gorm:"foreignKey:UserId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` UserId uint `json:"userId" gorm:"comment:用户ID;"` Content string `json:"content" gorm:"comment:评论内容;type:text;"` gorm.Model }
Comment @Date 2023-02-23 20:23:46 @Description: 评论信息表
type CommentMeta ¶
type CommentMeta struct{}
func (CommentMeta) TableComment ¶
func (CommentMeta) TableComment() string
func (CommentMeta) TableName ¶
func (CommentMeta) TableName() string
type File ¶
type File struct { FileMeta User SystemUser `gorm:"foreignKey:UserId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` UserId uint `json:"userId" gorm:"comment:用户ID;"` Name string `gorm:"comment:文件名称;"` Type string `gorm:"comment:文件类型;"` Dir string `gorm:"comment:文件目录;"` Path string `gorm:"comment:文件路径;"` Url string `gorm:"comment:文件映射路径;"` gorm.Model }
type Like ¶
type Like struct { LikeMeta User SystemUser `gorm:"foreignKey:UserId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` UserId uint `json:"userId" gorm:"comment:用户ID;"` Like int `json:"like" gorm:"comment:点赞数量;type:bigint;"` gorm.Model }
Like @Date 2023-02-23 20:25:46 @Description: 点赞信息表
type Reply ¶
type Reply struct { ReplyMeta User SystemUser `gorm:"foreignKey:UserId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` Comment Comment `gorm:"foreignKey:CommentId;constraint:onUpdate:RESTRICT,onDelete:CASCADE"` UserId uint `json:"userId" gorm:"comment:用户ID;"` CommentId uint `json:"commentId" gorm:"comment:评论ID;"` Content string `json:"content" gorm:"comment:回复内容;type:text;"` gorm.Model }
Reply @Date 2023-02-23 22:30:16 @Description: 回复信息表
type ShareComment ¶
type ShareComment struct {}
ShareComment @Date 2023-02-24 23:44:43 @Description: 动态评论关联表
type ShareCommentMeta ¶
type ShareCommentMeta struct{}
func (ShareCommentMeta) TableComment ¶
func (ShareCommentMeta) TableComment() string
func (ShareCommentMeta) TableName ¶
func (ShareCommentMeta) TableName() string
type SystemUser ¶
type SystemUser struct { UserMeta Uuid string `gorm:"comment:用户ID;type:varchar(255);" json:"uuid"` Username string `gorm:"comment:用户登录账号;type:varchar(50);" json:"username"` Password string `gorm:"comment:用户登录密码;type:varchar(255);" json:"password"` Nickname string `gorm:"comment:用户昵称;type:varchar(50);" json:"nickname"` Description string `gorm:"comment:用户自我描述;type:varchar(100);" json:"description"` Avatar string `gorm:"comment:用户头像;type:varchar(255);" json:"avatar"` Phone string `gorm:"comment:用户手机号;type:varchar(50);" json:"phone"` Email string `gorm:"comment:用户邮箱;type:varchar(255);" json:"email"` Enable bool `gorm:"comment:用户是否启用;" json:"enable"` gorm.Model }
SystemUser @Date 2023-01-13 15:23:50 @Description: 系统用户结构体
type TableGroup ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.