model

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmsContent

type CmsContent struct {

	/*    */
	ContentId *int32 `gorm:"column:content_id;type:int(11);PRIMARY_KEY;comment:''" json:"contentId"`
	/*  编码  */
	Code *string `gorm:"column:code;type:varchar(32);comment:'编码';default:\'none\'" json:"code"`
	/*  部门名称  */
	Name *string `gorm:"column:name;type:varchar(32);comment:'部门名称'" json:"name"`
	/*    */
	ParentId *int32 `gorm:"column:parentId;type:int(11);comment:''" json:"parentId"`
	/*    */
	DepPath *string `gorm:"column:depPath;type:varchar(255);comment:''" json:"depPath"`
	/*    */
	Enabled *model.BitField `gorm:"column:enabled;type:bit(1);comment:''" json:"enabled"`
	/*    */
	IsParent *int8 `gorm:"column:isParent;type:tinyint(1);comment:'';default:0" json:"isParent"`
	/*  负责人  */
	MngrId *int32 `gorm:"column:mngrId;type:int(11);comment:'负责人';default:0" json:"mngrId"`
	/*  0-部门 1-班组  */
	Type *int32 `gorm:"column:type;type:int(11);comment:'0-部门 1-班组';default:0" json:"type"`
}

func (*CmsContent) AutoMigrate

func (entity *CmsContent) AutoMigrate(db *gorm.DB) error

迁移

func (*CmsContent) GetCode

func (entity *CmsContent) GetCode() string

func (*CmsContent) GetContentId

func (entity *CmsContent) GetContentId() int32

func (*CmsContent) GetDepPath

func (entity *CmsContent) GetDepPath() string

func (*CmsContent) GetEnabled

func (entity *CmsContent) GetEnabled() model.BitField

func (*CmsContent) GetIsParent

func (entity *CmsContent) GetIsParent() int8

func (*CmsContent) GetMngrId

func (entity *CmsContent) GetMngrId() int32

func (*CmsContent) GetName

func (entity *CmsContent) GetName() string

func (*CmsContent) GetParentId

func (entity *CmsContent) GetParentId() int32

func (*CmsContent) GetType

func (entity *CmsContent) GetType() int32

func (*CmsContent) Ini

func (entity *CmsContent) Ini(iniPk bool) *CmsContent

iniPk bool:是否初始化主键ContentId 初始化指针

func (*CmsContent) IniNil

func (entity *CmsContent) IniNil(iniPk bool) *CmsContent

iniPk bool:是否初始化主键ContentId 初始化指针

func (*CmsContent) SetCode

func (entity *CmsContent) SetCode(Code string)

func (*CmsContent) SetContentId

func (entity *CmsContent) SetContentId(ContentId int32)

func (*CmsContent) SetDepPath

func (entity *CmsContent) SetDepPath(DepPath string)

func (*CmsContent) SetEnabled

func (entity *CmsContent) SetEnabled(Enabled model.BitField)

func (*CmsContent) SetIsParent

func (entity *CmsContent) SetIsParent(IsParent int8)

func (*CmsContent) SetMngrId

func (entity *CmsContent) SetMngrId(MngrId int32)

func (*CmsContent) SetName

func (entity *CmsContent) SetName(Name string)

func (*CmsContent) SetParentId

func (entity *CmsContent) SetParentId(ParentId int32)

func (*CmsContent) SetType

func (entity *CmsContent) SetType(Type int32)

func (*CmsContent) String

func (entity *CmsContent) String() string

指定生成结果转json字符串

func (*CmsContent) TableName

func (entity *CmsContent) TableName() string

gorm默认生成的表名是结构名+'s',所以必须以结构方法指定!

func (*CmsContent) ToString

func (entity *CmsContent) ToString() string

func (*CmsContent) Unmarshal

func (entity *CmsContent) Unmarshal(body string) error

func (*CmsContent) UnmarshalBy

func (entity *CmsContent) UnmarshalBy(body []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL