修改用户邮箱数据库长度

pull/25/merge
Minho 2017-05-04 11:40:49 +08:00
parent 98230109e3
commit ec1d99c0aa
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ func Initialization() {
if err := models.NewOption().InsertMulti(options...);err != nil { if err := models.NewOption().InsertMulti(options...);err != nil {
beego.Error(err) panic("Option.InsertMulti => " + err.Error())
os.Exit(1) os.Exit(1)
} }
@ -76,7 +76,7 @@ func Initialization() {
member.Email = "admin@iminho.me" member.Email = "admin@iminho.me"
if err := member.Add();err != nil { if err := member.Add();err != nil {
panic(err) panic("Member.Add => " + err.Error())
os.Exit(0) os.Exit(0)
} }
@ -98,7 +98,7 @@ func Initialization() {
book.Theme = "default" book.Theme = "default"
if err := book.Insert(); err != nil { if err := book.Insert(); err != nil {
panic(err) panic("Book.Insert => " + err.Error())
os.Exit(0) os.Exit(0)
} }
} }

View File

@ -17,7 +17,7 @@ type Member struct {
Account string `orm:"size(100);unique;column(account)" json:"account"` Account string `orm:"size(100);unique;column(account)" json:"account"`
Password string `orm:"size(1000);column(password)" json:"-"` Password string `orm:"size(1000);column(password)" json:"-"`
Description string `orm:"column(description);size(2000)" json:"description"` Description string `orm:"column(description);size(2000)" json:"description"`
Email string `orm:"size(255);column(email);unique" json:"email"` Email string `orm:"size(100);column(email);unique" json:"email"`
Phone string `orm:"size(255);column(phone);null;default(null)" json:"phone"` Phone string `orm:"size(255);column(phone);null;default(null)" json:"phone"`
Avatar string `orm:"size(1000);column(avatar)" json:"avatar"` Avatar string `orm:"size(1000);column(avatar)" json:"avatar"`
//用户角色0 超级管理员 /1 管理员/ 2 普通用户 . //用户角色0 超级管理员 /1 管理员/ 2 普通用户 .