user.go 627 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package models
  2. import "time"
  3. type User struct {
  4. Id int64
  5. Email string
  6. Name string
  7. Login string
  8. Password string
  9. Salt string
  10. IsAdmin bool
  11. AccountId int64
  12. Created time.Time
  13. Updated time.Time
  14. }
  15. type Account2 struct {
  16. Id int64
  17. Name string
  18. Created time.Time
  19. Updated time.Time
  20. }
  21. type AccountUser struct {
  22. AccountId int64
  23. UserId int64
  24. Role RoleType
  25. Created time.Time
  26. Updated time.Time
  27. }
  28. // ---------------------
  29. // COMMANDS
  30. type CreateUserCommand struct {
  31. Email string
  32. Login string
  33. Password string
  34. Salt string
  35. IsAdmin bool
  36. Result User `json:"-"`
  37. }