mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 22:51:29 +00:00
This commit is contained in:
parent
50bc1ef757
commit
a879e412a1
@ -194,7 +194,7 @@ type User struct {
|
|||||||
UserName string `orm:"size(30);unique"`
|
UserName string `orm:"size(30);unique"`
|
||||||
Email string `orm:"size(100)"`
|
Email string `orm:"size(100)"`
|
||||||
Password string `orm:"size(100)"`
|
Password string `orm:"size(100)"`
|
||||||
Status int16
|
Status int16 `orm:"column(Status)"`
|
||||||
IsStaff bool
|
IsStaff bool
|
||||||
IsActive bool `orm:"default(1)"`
|
IsActive bool `orm:"default(1)"`
|
||||||
Created time.Time `orm:"auto_now_add;type(date)"`
|
Created time.Time `orm:"auto_now_add;type(date)"`
|
||||||
|
@ -80,7 +80,6 @@ func getTableUnique(val reflect.Value) [][]string {
|
|||||||
|
|
||||||
// get snaked column name
|
// get snaked column name
|
||||||
func getColumnName(ft int, addrField reflect.Value, sf reflect.StructField, col string) string {
|
func getColumnName(ft int, addrField reflect.Value, sf reflect.StructField, col string) string {
|
||||||
col = strings.ToLower(col)
|
|
||||||
column := col
|
column := col
|
||||||
if col == "" {
|
if col == "" {
|
||||||
column = snakeString(sf.Name)
|
column = snakeString(sf.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user