model

package
v0.0.0-...-df8aa5b Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelList = map[string]interface{}{
	"TdFirm": TdFirm{},
}

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB)

func NewGorm

func NewGorm(dsn string) *gorm.DB

Types

type TdFirm

type TdFirm struct {
	FirmId    string `json:"firm_id" gorm:"primaryKey;column:firm_id;type:varchar(36);comment:唯一id;"`
	FirmName  string `json:"firm_name" gorm:"column:firm_name;not null;uniqueIndex;type:varchar(255);comment:厂商名称;"`
	FirmAlias string `json:"firm_alias" gorm:"column:firm_alias;type:varchar(255);comment:厂商别名;"`
	FirmCode  string `json:"firm_code" gorm:"column:firm_code;type:varchar(255);comment:厂商编码;"`
	FirmDesc  string `json:"firm_desc" gorm:"column:firm_desc;type:varchar(255);comment:厂商描述;"`
}

func (*TdFirm) BeforeCreate

func (u *TdFirm) BeforeCreate(tx *gorm.DB) (err error)

func (TdFirm) TableName

func (table TdFirm) TableName() string

Jump to

Keyboard shortcuts

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