struct.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package admin
  2. import (
  3. "github.com/metarare/metarare_api/models"
  4. "gorm.io/gorm"
  5. )
  6. type AdminAuthContainer struct {
  7. AccessToken string `json:"access_token,omitempty"`
  8. Permission models.AdminPermission `json:"permission,omitempty"`
  9. }
  10. type UpdateStatus struct {
  11. ID uint64 `json:"id"`
  12. Status string `json:"status"`
  13. }
  14. type RegisterAdministratorData struct {
  15. Email string `json:"email"`
  16. Password string `json:"password"`
  17. Name string `json:"name"`
  18. Phone string `json:"phone"`
  19. Position string `json:"position"`
  20. Chargeof string `json:"chargeof"`
  21. Team string `json:"team"`
  22. }
  23. type UpdatePermission struct {
  24. AdminID uint64 `json:"admin_id"`
  25. UserPermission bool `json:"user_permission"`
  26. CollectionPermission bool `json:"collection_permission"`
  27. SystemPermission bool `json:"system_permission"`
  28. AdminPermission bool `json:"admin_permission"`
  29. LogPermission bool `json:"log_permission"`
  30. }
  31. type UpdateCuration struct {
  32. ID uint64 `json:"id"`
  33. Index uint64 `json:"index"`
  34. }
  35. type RegisterArtistData struct {
  36. Name string `json:"name"`
  37. Phone string `json:"phone"`
  38. Email string `json:"email"`
  39. Team string `json:"team"`
  40. Category string `json:"category"`
  41. }
  42. type AccountInfo struct {
  43. Email string `json:"email"`
  44. Password string `json:"password"`
  45. }
  46. type RegisterAdminData struct {
  47. Email string `json:"email"`
  48. Password string `json:"password"`
  49. Name string `json:"name"`
  50. Phone string `json:"phone"`
  51. Position string `json:"position"`
  52. Chargeof string `json:"chargeof"`
  53. Team string `json:"team"`
  54. }
  55. type SettingData struct {
  56. SpecialCollection string `json:"special_collection,omitempty"`
  57. Commission float64 `json:"commission,omitempty"`
  58. GasDeposit float64 `json:"gas_deposit,omitempty"`
  59. }
  60. type Log struct {
  61. DB *gorm.DB `json:"db"`
  62. ActionType string `json:"action_type"`
  63. SubActionType string `json:"sub_action_type"`
  64. Target string `sjon:"target"`
  65. Admin models.Admin `json:"admin"`
  66. TargetID uint64 `json:"target_id"`
  67. To string `json:"to"`
  68. From string `json:"from"`
  69. }