Documentation ¶
Index ¶
- Constants
- type Post
- type PostCategory
- type PostCategoryDAO
- func (this *PostCategoryDAO) DisablePostCategory(tx *dbs.Tx, categoryId int64) error
- func (this *PostCategoryDAO) EnablePostCategory(tx *dbs.Tx, categoryId int64) error
- func (this *PostCategoryDAO) FindEnabledPostCategory(tx *dbs.Tx, categoryId int64) (*PostCategory, error)
- func (this *PostCategoryDAO) FindPostCategoryName(tx *dbs.Tx, categoryId int64) (string, error)
- type PostCategoryOperator
- type PostDAO
- type PostOperator
Constants ¶
View Source
const ( PostCategoryStateEnabled = 1 // 已启用 PostCategoryStateDisabled = 0 // 已禁用 )
View Source
const ( PostCategoryField_Id dbs.FieldName = "id" // ID PostCategoryField_Name dbs.FieldName = "name" // 分类名称 PostCategoryField_IsOn dbs.FieldName = "isOn" // 是否启用 PostCategoryField_Code dbs.FieldName = "code" // 代号 PostCategoryField_Order dbs.FieldName = "order" // 排序 PostCategoryField_State dbs.FieldName = "state" // 分类状态 )
View Source
const ( PostStateEnabled = 1 // 已启用 PostStateDisabled = 0 // 已禁用 )
View Source
const ( PostField_Id dbs.FieldName = "id" // ID PostField_CategoryId dbs.FieldName = "categoryId" // 文章分类 PostField_Type dbs.FieldName = "type" // 类型:normal, url PostField_Url dbs.FieldName = "url" // URL PostField_Subject dbs.FieldName = "subject" // 标题 PostField_Body dbs.FieldName = "body" // 内容 PostField_CreatedAt dbs.FieldName = "createdAt" // 创建时间 PostField_IsPublished dbs.FieldName = "isPublished" // 是否已发布 PostField_PublishedAt dbs.FieldName = "publishedAt" // 发布时间 PostField_ProductCode dbs.FieldName = "productCode" // 产品代号 PostField_State dbs.FieldName = "state" // 状态 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
type Post struct { Id uint32 `field:"id"` // ID CategoryId uint32 `field:"categoryId"` // 文章分类 Type string `field:"type"` // 类型:normal, url Url string `field:"url"` // URL Subject string `field:"subject"` // 标题 Body string `field:"body"` // 内容 CreatedAt uint64 `field:"createdAt"` // 创建时间 IsPublished bool `field:"isPublished"` // 是否已发布 PublishedAt uint64 `field:"publishedAt"` // 发布时间 ProductCode string `field:"productCode"` // 产品代号 State uint8 `field:"state"` // 状态 }
Post 文章管理
type PostCategory ¶
type PostCategory struct { Id uint32 `field:"id"` // ID Name string `field:"name"` // 分类名称 IsOn bool `field:"isOn"` // 是否启用 Code string `field:"code"` // 代号 Order uint32 `field:"order"` // 排序 State uint8 `field:"state"` // 分类状态 }
PostCategory 文章分类
type PostCategoryDAO ¶
func NewPostCategoryDAO ¶
func NewPostCategoryDAO() *PostCategoryDAO
func (*PostCategoryDAO) DisablePostCategory ¶
func (this *PostCategoryDAO) DisablePostCategory(tx *dbs.Tx, categoryId int64) error
DisablePostCategory 禁用条目
func (*PostCategoryDAO) EnablePostCategory ¶
func (this *PostCategoryDAO) EnablePostCategory(tx *dbs.Tx, categoryId int64) error
EnablePostCategory 启用条目
func (*PostCategoryDAO) FindEnabledPostCategory ¶
func (this *PostCategoryDAO) FindEnabledPostCategory(tx *dbs.Tx, categoryId int64) (*PostCategory, error)
FindEnabledPostCategory 查找启用中的条目
func (*PostCategoryDAO) FindPostCategoryName ¶
FindPostCategoryName 根据主键查找名称
type PostCategoryOperator ¶
type PostCategoryOperator struct { Id any // ID Name any // 分类名称 IsOn any // 是否启用 Code any // 代号 Order any // 排序 State any // 分类状态 }
func NewPostCategoryOperator ¶
func NewPostCategoryOperator() *PostCategoryOperator
type PostDAO ¶
func NewPostDAO ¶
func NewPostDAO() *PostDAO
func (*PostDAO) DisablePost ¶
DisablePost 禁用条目
func (*PostDAO) EnablePost ¶
EnablePost 启用条目
type PostOperator ¶
type PostOperator struct { Id any // ID CategoryId any // 文章分类 Type any // 类型:normal, url Url any // URL Subject any // 标题 Body any // 内容 CreatedAt any // 创建时间 IsPublished any // 是否已发布 PublishedAt any // 发布时间 ProductCode any // 产品代号 State any // 状态 }
func NewPostOperator ¶
func NewPostOperator() *PostOperator
Click to show internal directories.
Click to hide internal directories.