Documentation ¶
Index ¶
- func NewDBEngine(databaseSetting *setting.DatabaseSettingS) (*gorm.DB, error)
- type BlogPosts
- type BlogPostsTag
- type BlogTag
- func (t *BlogTag) Count(db *gorm.DB) (int, error)
- func (t *BlogTag) Create(db *gorm.DB) error
- func (t *BlogTag) Delete(db *gorm.DB) error
- func (t *BlogTag) First(db *gorm.DB) error
- func (t *BlogTag) List(db *gorm.DB, offset int, limit int) ([]*BlogTag, error)
- func (t *BlogTag) TableName() string
- func (t *BlogTag) Update(db *gorm.DB, values interface{}) error
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDBEngine ¶
func NewDBEngine(databaseSetting *setting.DatabaseSettingS) (*gorm.DB, error)
Types ¶
type BlogPosts ¶
type BlogPosts struct { ID int64 `json:"ID" gorm:"primary_key"` // ID CreatedBy string `json:"created_by"` // 创建人 CreatedOn time.Time `json:"created_on"` // 创建时间 DeletedOn time.Time `json:"deleted_on"` // 删除时间 IsDel int8 `json:"is_del"` // 是否删除, 0 未删除, 1 已删除 PostAuthorId int64 `json:"post_author_id"` // 文章作者 ID PostAuthorName string `json:"post_author_name"` // 文章作者名字 PostContent string `json:"post_content"` // 文章内容 PostDesc string `json:"post_desc"` // 文章描述 PostStatus int8 `json:"post_status"` // 文章状态 0: draft, 1: published, 2: private PostTitle string `json:"post_title"` // 文章标题 UpdatedBy string `json:"updated_by"` // 更新人 UpdatedOn time.Time `json:"updated_on"` // 更新时间 }
type BlogPostsTag ¶
type BlogPostsTag struct { CreatedBy string `json:"created_by"` // 创建人 CreatedOn time.Time `json:"created_on"` // 创建时间 DeletedOn time.Time `json:"deleted_on"` // 删除时间 ID int64 `json:"ID"` // ID IsDel int8 `json:"is_del"` // 是否删除, 0 未删除, 1 已删除 PostId int64 `json:"post_id"` // 文章 ID TagId int64 `json:"tag_id"` // 标签 ID UpdatedBy string `json:"updated_by"` // 更新人 UpdatedOn time.Time `json:"updated_on"` // 更新时间 }
type BlogTag ¶
type BlogTag struct { CreatedBy string `json:"created_by"` // 创建人 CreatedOn time.Time `json:"created_on"` // 创建时间 DeletedOn time.Time `json:"deleted_on"` // 删除时间 ID int64 `json:"ID"` // ID IsDel int8 `json:"is_del"` // 是否删除, 0 未删除, 1 已删除 TagName string `json:"tag_name"` // 标签名称 TagStatus int8 `json:"tag_status"` // 标签状态 0: 禁用, 1: 启用 UpdatedBy string `json:"updated_by"` // 更新人 UpdatedOn time.Time `json:"updated_on"` // 更新时间 }
Click to show internal directories.
Click to hide internal directories.