enterprise_user.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package http_model
  2. import "youngee_m_api/model/gorm_model"
  3. type EnterpriseUserRequest struct {
  4. PageSize int32 `json:"page_size"`
  5. PageNum int32 `json:"page_num"`
  6. User string `json:"user"` // 企业用户ID
  7. Username string `json:"username"` // 企业名称
  8. CreatedAt string `json:"created_at"` // 创建时间
  9. }
  10. type EnterpriseUserPreview struct {
  11. User string `json:"user"` // 企业用户ID
  12. UserID string `json:"userID"` // 用户ID
  13. EnterpriseID int64 `json:"enterprise_id"` // 企业ID
  14. Username string `json:"username"` // 企业名称
  15. Balance float64 `json:"balance"` // 账户余额
  16. FrozenBalance float64 `json:"frozen_balance"` // 冻结余额
  17. AvailableBalance float64 `json:"available_balance"` // 可用余额
  18. Phone string `json:"phone"` // 联系方式
  19. CreatedAt string `json:"created_at"` // 创建时间
  20. }
  21. type EnterpriseUserData struct {
  22. EnterpriseUserPreview []*EnterpriseUserPreview `json:"enterprise_user_preview"`
  23. Total string `json:"total"`
  24. }
  25. type EnterpriseUser struct {
  26. Enterprise gorm_model.Enterprise
  27. YoungeeUser gorm_model.YounggeeUser
  28. }
  29. func NewEnterpriseUserRequest() *EnterpriseUserRequest {
  30. return new(EnterpriseUserRequest)
  31. }
  32. func NewEnterpriseUserResponse() *CommonResponse {
  33. resp := new(CommonResponse)
  34. resp.Data = new(EnterpriseUserData)
  35. return resp
  36. }