model

package
v0.0.0-...-c47cd45 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectDbfactroy

func InjectDbfactroy(s *Dbfactroy)

func LoadDbfactroy

func LoadDbfactroy() baseiface.ISingleton

Types

type Dbfactroy

type Dbfactroy struct {
	basedto.BaseEntity `gorm:"-"`

	/*    */
	Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"`
	/*    */
	ConnectName string `gorm:"column:connect_name;type:varchar(255);comment:''" json:"connect_name"`
	/*    */
	Dbtype string `gorm:"column:dbtype;type:varchar(255);comment:''" json:"dbtype"`
	/*    */
	Dbname string `gorm:"column:dbname;type:varchar(255);comment:''" json:"dbname"`
	/*    */
	Host string `gorm:"column:host;type:varchar(255);comment:''" json:"host"`
	/*    */
	Port int32 `gorm:"column:port;type:int(255);comment:''" json:"port"`
	/*    */
	Username string `gorm:"column:username;type:varchar(255);comment:''" json:"username"`
	/*    */
	Password string `gorm:"column:password;type:varchar(255);comment:''" json:"password"`
	/*    */
	Charset string `gorm:"column:charset;type:varchar(255);comment:''" json:"charset"`
}

func FindBeanDbfactroy

func FindBeanDbfactroy() *Dbfactroy

func NewDbfactroy

func NewDbfactroy() *Dbfactroy

func (*Dbfactroy) AutoMigrate

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

迁移

func (*Dbfactroy) String

func (entity *Dbfactroy) String() string

指定生成结果转json字符串

func (*Dbfactroy) TableName

func (entity *Dbfactroy) TableName() string

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

func (*Dbfactroy) ToString

func (entity *Dbfactroy) ToString() string

func (*Dbfactroy) Unmarshal

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

func (*Dbfactroy) UnmarshalBy

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

type DbfactroyEntity

type DbfactroyEntity struct {

	/*    */
	Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"`
	/*    */
	ConnectName string `gorm:"column:connect_name;type:varchar(255);comment:''" json:"connect_name"`
	/*    */
	Dbtype string `gorm:"column:dbtype;type:varchar(255);comment:''" json:"dbtype"`
	/*    */
	Dbname string `gorm:"column:dbname;type:varchar(255);comment:''" json:"dbname"`
	/*    */
	Host string `gorm:"column:host;type:varchar(255);comment:''" json:"host"`
	/*    */
	Port int32 `gorm:"column:port;type:int(255);comment:''" json:"port"`
	/*    */
	Username string `gorm:"column:username;type:varchar(255);comment:''" json:"username"`
	/*    */
	Password string `gorm:"column:password;type:varchar(255);comment:''" json:"password"`
	/*    */
	Charset string `gorm:"column:charset;type:varchar(255);comment:''" json:"charset"`
}

type DbfactroyParams

type DbfactroyParams struct {

	/*    */
	Id *int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"`
	/*    */
	ConnectName *string `gorm:"column:connect_name;type:varchar(255);comment:''" json:"connect_name"`
	/*    */
	Dbtype *string `gorm:"column:dbtype;type:varchar(255);comment:''" json:"dbtype"`
	/*    */
	Dbname *string `gorm:"column:dbname;type:varchar(255);comment:''" json:"dbname"`
	/*    */
	Host *string `gorm:"column:host;type:varchar(255);comment:''" json:"host"`
	/*    */
	Port *int32 `gorm:"column:port;type:int(255);comment:''" json:"port"`
	/*    */
	Username *string `gorm:"column:username;type:varchar(255);comment:''" json:"username"`
	/*    */
	Password *string `gorm:"column:password;type:varchar(255);comment:''" json:"password"`
	/*    */
	Charset *string `gorm:"column:charset;type:varchar(255);comment:''" json:"charset"`
}

Jump to

Keyboard shortcuts

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