Discover Packages
gitee.com/sparrow614/sparrow_cloud_go
rest_framework
testhelper
package
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Jun 3, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
const (
TEST_TABLE_USER_SQL = ``
INSERT_USER_SQL = `insert into user (name, age) values (?, ?);`
)
sql 和 model放在一起
type BaseModel struct {
Id int `json:"id" gorm:"column:id;type:int(11);not null;primaryKey;autoIncrement"`
Age int `json:"age" gorm:"column:age;type:int(11);not null;default:0"`
}
type User struct {
Name string `json:"name" gorm:"column:name;type:varchar(255);not null;default:''"`
BaseModel
}
测试 User 结构体
Source Files
¶
Click to show internal directories.
Click to hide internal directories.