User.go 423 B

123456789101112
  1. package models
  2. type User struct {
  3. ID int `xorm:"id unsigned int not null pk autoincr"`
  4. Account string `xorm:"varchar(20) notnull unique comment('账号登陆名')"`
  5. Name string `xorm:"varchar(10) notnull comment('用户名')"`
  6. Password string `xorm:"char(32) notnull comment('登陆密码,两次md5加盐,md5(md5(password+pmail) +pmail2023)')"`
  7. }
  8. func (p User) TableName() string {
  9. return "user"
  10. }