Documentation ¶
Index ¶
- type Item
- func (entity *Item) AutoMigrate(db *gorm.DB) error
- func (entity *Item) PkeyName() string
- func (entity *Item) PkeyValue() int32
- func (entity *Item) SetCeatedBy(CeatedBy string)
- func (entity *Item) SetComment(Comment string)
- func (entity *Item) SetCreatedAt(CreatedAt time.Time)
- func (entity *Item) SetDeletedAt(DeletedAt time.Time)
- func (entity *Item) SetId(Id int32)
- func (entity *Item) SetIsDeleted(IsDeleted int8)
- func (entity *Item) SetItemKey(ItemKey string)
- func (entity *Item) SetLineNum(LineNum int32)
- func (entity *Item) SetNamespaceId(NamespaceId int32)
- func (entity *Item) SetType(Type int8)
- func (entity *Item) SetUpdatedAt(UpdatedAt time.Time)
- func (entity *Item) SetUpdatedBy(UpdatedBy string)
- func (entity *Item) SetValue(Value string)
- func (entity *Item) TableName() string
- type ItemEntity
- type ItemParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { basedto.BaseEntity `gorm:"-"` /* 自增Id */ Id int32 `gorm:"column:id;type:int(10) unsigned;PRIMARY_KEY;comment:'自增Id'" json:"id"` /* 集群NamespaceId */ NamespaceId int32 `gorm:"column:namespace_id;type:int(10) unsigned;comment:'集群NamespaceId';default:0" json:"namespace_id"` /* 配置项Key */ ItemKey string `gorm:"column:item_key;type:varchar(128);comment:'配置项Key';default:'default'" json:"item_key"` /* 配置项类型,0: String,1: Number,2: Boolean,3: JSON */ Type int8 `` /* 138-byte string literal not displayed */ /* 配置项值 */ Value string `gorm:"column:value;type:longtext;comment:'配置项值'" json:"value"` /* 注释 */ Comment string `gorm:"column:comment;type:varchar(1024);comment:'注释'" json:"comment"` /* 行号 */ LineNum int32 `gorm:"column:line_num;type:int(10) unsigned;comment:'行号';default:0" json:"line_num"` /* 1: deleted, 0: normal */ IsDeleted int8 `gorm:"column:is_deleted;type:tinyint(1);comment:'1: deleted, 0: normal';default:0" json:"is_deleted"` /* */ DeletedAt time.Time `gorm:"column:deleted_at;type:datetime;comment:''" json:"deleted_at"` /* 创建人 */ CeatedBy string `gorm:"column:ceated_by;type:varchar(64);comment:'创建人';default:'default'" json:"ceated_by"` /* 创建时间 */ CreatedAt time.Time `gorm:"column:created_at;type:timestamp;comment:'创建时间'" json:"created_at"` /* 最后修改人 */ UpdatedBy string `gorm:"column:updated_by;type:varchar(64);comment:'最后修改人'" json:"updated_by"` /* 最后修改时间 */ UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;comment:'最后修改时间'" json:"updated_at"` }
配置项目
func (*Item) SetCeatedBy ¶
func (*Item) SetComment ¶
func (*Item) SetCreatedAt ¶
func (*Item) SetDeletedAt ¶
func (*Item) SetIsDeleted ¶
func (*Item) SetItemKey ¶
func (*Item) SetLineNum ¶
func (*Item) SetNamespaceId ¶
func (*Item) SetUpdatedAt ¶
func (*Item) SetUpdatedBy ¶
type ItemEntity ¶
type ItemEntity struct { basedto.BaseEntity `gorm:"-"` /* 自增Id */ Id int32 `gorm:"column:id;type:int(10) unsigned;PRIMARY_KEY;comment:'自增Id'" json:"id"` /* 集群NamespaceId */ NamespaceId int32 `gorm:"column:namespace_id;type:int(10) unsigned;comment:'集群NamespaceId';default:0" json:"namespace_id"` /* 配置项Key */ ItemKey string `gorm:"column:item_key;type:varchar(128);comment:'配置项Key';default:\'default\'" json:"item_key"` /* 配置项类型,0: String,1: Number,2: Boolean,3: JSON */ Type int8 `` /* 138-byte string literal not displayed */ /* 配置项值 */ Value string `gorm:"column:value;type:longtext;comment:'配置项值'" json:"value"` /* 注释 */ Comment string `gorm:"column:comment;type:varchar(1024);comment:'注释'" json:"comment"` /* 行号 */ LineNum int32 `gorm:"column:line_num;type:int(10) unsigned;comment:'行号';default:0" json:"line_num"` /* 1: deleted, 0: normal */ IsDeleted int8 `gorm:"column:is_deleted;type:tinyint(1);comment:'1: deleted, 0: normal';default:0" json:"is_deleted"` /* */ DeletedAt int64 `gorm:"column:deleted_at;type:datetime;comment:''" json:"deleted_at,string"` /* 创建人 */ CeatedBy string `gorm:"column:ceated_by;type:varchar(64);comment:'创建人';default:\'default\'" json:"ceated_by"` /* 创建时间 */ CreatedAt int64 `gorm:"column:created_at;type:timestamp;comment:'创建时间'" json:"created_at,string"` /* 最后修改人 */ UpdatedBy string `gorm:"column:updated_by;type:varchar(64);comment:'最后修改人'" json:"updated_by"` /* 最后修改时间 */ UpdatedAt int64 `gorm:"column:updated_at;type:timestamp;comment:'最后修改时间'" json:"updated_at,string"` }
func NewItemEntity ¶
func NewItemEntity() *ItemEntity
func (*ItemEntity) PkeyName ¶
func (entity *ItemEntity) PkeyName() string
func (*ItemEntity) PkeyValue ¶
func (entity *ItemEntity) PkeyValue() int32
func (*ItemEntity) TableName ¶
func (entity *ItemEntity) TableName() string
gorm默认生成的表名是结构名+'s',所以必须以结构方法指定!
type ItemParams ¶
type ItemParams struct { basedto.BaseEntity `gorm:"-"` /* 自增Id */ Id *int32 `gorm:"column:id;type:int(10) unsigned;PRIMARY_KEY;comment:'自增Id'" json:"id"` /* 集群NamespaceId */ NamespaceId *int32 `gorm:"column:namespace_id;type:int(10) unsigned;comment:'集群NamespaceId';default:0" json:"namespace_id"` /* 配置项Key */ ItemKey *string `gorm:"column:item_key;type:varchar(128);comment:'配置项Key';default:\'default\'" json:"item_key"` /* 配置项类型,0: String,1: Number,2: Boolean,3: JSON */ Type *int8 `` /* 138-byte string literal not displayed */ /* 配置项值 */ Value *string `gorm:"column:value;type:longtext;comment:'配置项值'" json:"value"` /* 注释 */ Comment *string `gorm:"column:comment;type:varchar(1024);comment:'注释'" json:"comment"` /* 行号 */ LineNum *int32 `gorm:"column:line_num;type:int(10) unsigned;comment:'行号';default:0" json:"line_num"` /* 1: deleted, 0: normal */ IsDeleted *int8 `gorm:"column:is_deleted;type:tinyint(1);comment:'1: deleted, 0: normal';default:0" json:"is_deleted"` /* */ DeletedAt *time.Time `gorm:"column:deleted_at;type:datetime;comment:''" json:"deleted_at"` /* 创建人 */ CeatedBy *string `gorm:"column:ceated_by;type:varchar(64);comment:'创建人';default:\'default\'" json:"ceated_by"` /* 创建时间 */ CreatedAt *time.Time `gorm:"column:created_at;type:timestamp;comment:'创建时间'" json:"created_at"` /* 最后修改人 */ UpdatedBy *string `gorm:"column:updated_by;type:varchar(64);comment:'最后修改人'" json:"updated_by"` /* 最后修改时间 */ UpdatedAt *time.Time `gorm:"column:updated_at;type:timestamp;comment:'最后修改时间'" json:"updated_at"` }
func NewItemParams ¶
func NewItemParams() *ItemParams
Click to show internal directories.
Click to hide internal directories.