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 TableName1

type TableName1 struct {

	/*    */
	Id *int64 `gorm:"column:id;type:bigint(20);PRIMARY_KEY;comment:''" json:"id,string"`
	/*    */
	Rowid *int64 `gorm:"column:rowid;type:bigint(20);comment:''" json:"rowid,string"`
	/*    */
	Vc *float64 `gorm:"column:vc;type:decimal(22,2);comment:''" json:"vc"`
	/*    */
	Name *string `gorm:"column:name;type:varchar(223);comment:''" json:"name"`
	/*    */
	Adate *model.LocalDate `gorm:"column:adate;type:date;comment:''" json:"adate"`
	/*    */
	Atimestamp *model.LocalTime `gorm:"column:atimestamp;type:timestamp;comment:''" json:"atimestamp"`
	/*    */
	Adatetime *model.LocalTime `gorm:"column:adatetime;type:datetime;comment:''" json:"adatetime"`
	/*    */
	Int4Field *int32 `gorm:"column:int4_field;type:int(11);comment:''" json:"int4Field"`
	/*    */
	DeletedAt *model.LocalTime `gorm:"column:deleted_at;type:datetime;comment:''" json:"deletedAt"`
	/*    */
	Datefield *model.LocalDate `gorm:"column:datefield;type:date;comment:''" json:"datefield"`
	/*    */
	Column13 *string `gorm:"column:column13;type:varchar(255);comment:''" json:"column13"`
	/*    */
	BitField *model.BitField `gorm:"column:bit_field;type:bit(1);comment:''" json:"bitField"`
	/*    */
	TTime *string `gorm:"column:t_time;type:varchar(10);comment:''" json:"tTime"`
	/*    */
	WorkState *string `gorm:"column:work_state;type:varchar(36);comment:''" json:"workState"`
}

11

func (*TableName1) AutoMigrate

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

迁移

func (*TableName1) GetAdate

func (entity *TableName1) GetAdate() model.LocalDate

func (*TableName1) GetAdatetime

func (entity *TableName1) GetAdatetime() model.LocalTime

func (*TableName1) GetAtimestamp

func (entity *TableName1) GetAtimestamp() model.LocalTime

func (*TableName1) GetBitField

func (entity *TableName1) GetBitField() model.BitField

func (*TableName1) GetColumn13

func (entity *TableName1) GetColumn13() string

func (*TableName1) GetDatefield

func (entity *TableName1) GetDatefield() model.LocalDate

func (*TableName1) GetDeletedAt

func (entity *TableName1) GetDeletedAt() model.LocalTime

func (*TableName1) GetId

func (entity *TableName1) GetId() int64

func (*TableName1) GetInt4Field

func (entity *TableName1) GetInt4Field() int32

func (*TableName1) GetName

func (entity *TableName1) GetName() string

func (*TableName1) GetRowid

func (entity *TableName1) GetRowid() int64

func (*TableName1) GetTTime

func (entity *TableName1) GetTTime() string

func (*TableName1) GetVc

func (entity *TableName1) GetVc() float64

func (*TableName1) GetWorkState

func (entity *TableName1) GetWorkState() string

func (*TableName1) Ini

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

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

func (*TableName1) IniNil

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

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

func (*TableName1) SetAdate

func (entity *TableName1) SetAdate(Adate model.LocalDate)

func (*TableName1) SetAdatetime

func (entity *TableName1) SetAdatetime(Adatetime model.LocalTime)

func (*TableName1) SetAtimestamp

func (entity *TableName1) SetAtimestamp(Atimestamp model.LocalTime)

func (*TableName1) SetBitField

func (entity *TableName1) SetBitField(BitField model.BitField)

func (*TableName1) SetColumn13

func (entity *TableName1) SetColumn13(Column13 string)

func (*TableName1) SetDatefield

func (entity *TableName1) SetDatefield(Datefield model.LocalDate)

func (*TableName1) SetDeletedAt

func (entity *TableName1) SetDeletedAt(DeletedAt model.LocalTime)

func (*TableName1) SetId

func (entity *TableName1) SetId(Id int64)

func (*TableName1) SetInt4Field

func (entity *TableName1) SetInt4Field(Int4Field int32)

func (*TableName1) SetName

func (entity *TableName1) SetName(Name string)

func (*TableName1) SetRowid

func (entity *TableName1) SetRowid(Rowid int64)

func (*TableName1) SetTTime

func (entity *TableName1) SetTTime(TTime string)

func (*TableName1) SetVc

func (entity *TableName1) SetVc(Vc float64)

func (*TableName1) SetWorkState

func (entity *TableName1) SetWorkState(WorkState string)

func (*TableName1) String

func (entity *TableName1) String() string

指定生成结果转json字符串

func (*TableName1) TableName

func (entity *TableName1) TableName() string

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

func (*TableName1) ToString

func (entity *TableName1) ToString() string

func (*TableName1) Unmarshal

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

func (*TableName1) UnmarshalBy

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

Jump to

Keyboard shortcuts

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