account.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package datamodels
  2. import "time"
  3. // Account Data Model
  4. type Account struct {
  5. OcId int64 `json:"ocId" xorm:"'oc_id' bigint comment('组织ID:公司或机构或单位ID')"`
  6. AccountId int64 `json:"accountId" xorm:"'account_id' bigint not null pk comment('主键ID')"`
  7. AccountName string `json:"accountName" xorm:"'account_name' varchar(128) comment('帐号名称')"`
  8. Password string `json:"password" xorm:"'password' varchar(128) comment('密码')"`
  9. AccountType int64 `json:"accountType" xorm:"'account_type' bigint comment('帐号类型:0:系统用户,1:企业用户,2:集团用户,3:政府用户,4:合作伙伴')"`
  10. AccountRealName string `json:"accountRealName" xorm:"'account_real_name' varchar(64) comment('姓名')"`
  11. AccountIntro string `json:"accountIntro" xorm:"'account_intro' varchar(511) comment('个人简介')"`
  12. AccountAvatar string `json:"accountAvatar" xorm:"'account_avatar' varchar(255) comment('头像')"`
  13. AccountPhoto string `json:"accountPhoto" xorm:"'account_photo' varchar(255) comment('照片')"`
  14. AccountPhone string `json:"accountPhone" xorm:"'account_phone' varchar(32) comment('手机号')"`
  15. AccountLastIp string `json:"accountLastIp" xorm:"'account_last_ip' varchar(10) comment('最近一次登录IP')"`
  16. AccountLoc string `json:"accountLoc" xorm:"'account_loc' varchar(64) comment('区域')"`
  17. AccountMail string `json:"accountMail" xorm:"'account_mail' varchar(64) comment('Email')"`
  18. AccountStaffNo string `json:"accountStaffNo" xorm:"'account_staff_no' varchar(64) comment('StaffNo')"`
  19. Status int64 `json:"status" xorm:"'status' bigint default 1 comment('状态,默认值 1,[0:未激活; 1:正常; 2:锁定; -1:删除'])"`
  20. WxId int64 `json:"wxId" xorm:"'wxId' bigint default 1 comment('状态,默认值 1,[0:未激活; 1:正常; 2:锁定; -1:删除'])"`
  21. IsFixed int64 `json:"isFixed" xorm:"'isFixed' bigint default 1 comment('状态,默认值 1,[0:未激活; 1:正常; 2:锁定; -1:删除'])"`
  22. CreatedBy int64 `json:"createdBy" xorm:"'created_by'"`
  23. CreatedAt time.Time `json:"createdAt" xorm:"'created_at'"`
  24. UpdatedBy int64 `json:"updatedBy" xorm:"'updated_by'"`
  25. UpdatedAt time.Time `json:"updatedAt" xorm:"'updated_at'"`
  26. DeletedFlag int64 `json:"deletedFlag" xorm:"'deleted_flag'"`
  27. DeletedBy int64 `json:"deletedBy" xorm:"'deleted_by'"`
  28. DeletedAt time.Time `json:"deletedAt" xorm:"'deleted_at'"`
  29. }
  30. // TableName table name
  31. func (t *Account) TableName() string {
  32. return "account"
  33. }