user.go 579 B

123456789101112131415161718192021
  1. package model
  2. import (
  3. "github.com/jinzhu/gorm"
  4. uuid "github.com/satori/go.uuid"
  5. )
  6. type User struct {
  7. gorm.Model `json:"-"`
  8. UUID uuid.UUID `json:"uuid"`
  9. UserName string `json:"userName"`
  10. PassWord string `json:"passWord"`
  11. NickName string `json:"nickName" gorm:"default:'galeone'"`
  12. HeaderImg string `json:"headerImg" gorm:"default:'galeone'"`
  13. //Propertie // 多余属性自行添加
  14. //PropertieId uint // 自动关联 Propertie 的Id 附加属性过多 建议创建一对一关系
  15. }
  16. //type Propertie struct {
  17. // gorm.Model
  18. //}