Documentation
¶
Index ¶
Constants ¶
View Source
const TableNameMytable = "mytables"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct {
gorm.Model
Name string `gorm:"type:varchar(100);not null"`
Age int `gorm:"type:int"`
Phone string `gorm:"type:varchar(11)"`
Address string `gorm:"type:text"`
Amount float64 `gorm:"type:float"`
}
Customer a struct mapping to table customers
type Mytable ¶
type Mytable struct {
ID int32 `gorm:"column:ID;type:int(11);not null" json:"ID_example"`
Username *string `gorm:"column:username;type:varchar(16);index:idx_username,priority:1;default:NULL" json:"username_example"`
Age int32 `gorm:"column:age;type:int(8);not null" json:"age_example"`
Phone string `gorm:"column:phone;type:varchar(11);not null" json:"phone_example"`
}
Mytable mapped from table <mytables>
Click to show internal directories.
Click to hide internal directories.