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 TableName

type TableName 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"`
	/*    */
	TimeHms *int64 `gorm:"column:time_hms;type:bigint(20);comment:''" json:"timeHms,string"`
	/*    */
	Adatetime *model.LocalTime `gorm:"column:adatetime;type:datetime;comment:''" json:"adatetime"`
	/*    */
	Atimestamp *model.LocalTime `gorm:"column:atimestamp;type:timestamp;comment:''" json:"atimestamp"`
	/*    */
	Adate *model.LocalDate `gorm:"column:adate;type:date;comment:''" json:"adate"`
	/*    */
	BitField *model.BitField `gorm:"column:bit_field;type:bit(1);comment:''" json:"bitField"`
	/*    */
	T *int32 `gorm:"column:t;type:int(11);comment:''" json:"t"`
}

func (*TableName) AutoMigrate

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

迁移

func (*TableName) GetAdate

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

func (*TableName) GetAdatetime

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

func (*TableName) GetAtimestamp

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

func (*TableName) GetBitField

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

func (*TableName) GetId

func (entity *TableName) GetId() int64

func (*TableName) GetName

func (entity *TableName) GetName() string

func (*TableName) GetRowid

func (entity *TableName) GetRowid() int64

func (*TableName) GetT

func (entity *TableName) GetT() int32

func (*TableName) GetTimeHms

func (entity *TableName) GetTimeHms() int64

func (*TableName) GetVc

func (entity *TableName) GetVc() float64

func (*TableName) Ini

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

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

func (*TableName) IniNil

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

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

func (*TableName) SetAdate

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

func (*TableName) SetAdatetime

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

func (*TableName) SetAtimestamp

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

func (*TableName) SetBitField

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

func (*TableName) SetId

func (entity *TableName) SetId(Id int64)

func (*TableName) SetName

func (entity *TableName) SetName(Name string)

func (*TableName) SetRowid

func (entity *TableName) SetRowid(Rowid int64)

func (*TableName) SetT

func (entity *TableName) SetT(T int32)

func (*TableName) SetTimeHms

func (entity *TableName) SetTimeHms(TimeHms int64)

func (*TableName) SetVc

func (entity *TableName) SetVc(Vc float64)

func (*TableName) String

func (entity *TableName) String() string

指定生成结果转json字符串

func (*TableName) TableName

func (entity *TableName) TableName() string

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

func (*TableName) ToString

func (entity *TableName) ToString() string

func (*TableName) Unmarshal

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

func (*TableName) UnmarshalBy

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

Jump to

Keyboard shortcuts

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