chores: refactor struct and structure project
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
package authdomain
|
||||
|
||||
type LoginReq struct {
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
}
|
||||
|
||||
type AuthResponse struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
type LoginRepoResponse struct {
|
||||
ID string `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type StaffProfile struct {
|
||||
ID string `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
ProfilePicture string `json:"profile_picture"`
|
||||
}
|
||||
|
||||
type UserProfile struct {
|
||||
ID string `json:"id"`
|
||||
Email string `json:"email"`
|
||||
SubscribePlanCode string `json:"subscribe_plan_code"`
|
||||
SubscribePlanName string `json:"subscribe_plan_name"`
|
||||
SubscribeStatus string `json:"subscribe_status"`
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package authdomain
|
||||
|
||||
type RegisterUserReq struct {
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Phone string `json:"phone" validate:"required"`
|
||||
SubscribePlanID string `json:"subscribe_plan_id"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID string `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
Phone string `json:"phone"`
|
||||
SubscribeID string `json:"subscribe_id"`
|
||||
}
|
||||
|
||||
type RegisterStaffReq struct {
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
ProfilePicture string `json:"profile_picture"`
|
||||
}
|
||||
|
||||
type UpdateStaffReq struct {
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type Staff struct {
|
||||
ID string `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
Name string `json:"name"`
|
||||
ProfilePicture string `json:"profile_picture"`
|
||||
}
|
||||
@@ -3,4 +3,5 @@ package authdomain
|
||||
type AuthToken struct {
|
||||
Email string
|
||||
SessionID string
|
||||
Role string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user