Added buyer seller bolean
This commit is contained in:
@@ -20,6 +20,7 @@ type Company struct {
|
||||
Phone string `json:"phone"`
|
||||
Users []User `gorm:"many2many:user_companies;"`
|
||||
Devices []Device `json:"devices"`
|
||||
IsBuyer bool `json:"isBuyer"`
|
||||
}
|
||||
|
||||
type School struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package models
|
||||
type User struct {
|
||||
BaseModel
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Password string `json:"-"`
|
||||
Email string `json:"email"`
|
||||
Avatar string `json:"avatar"`
|
||||
IsActive bool `json:"isActive" gorm:"default:false"`
|
||||
@@ -13,6 +13,11 @@ type User struct {
|
||||
LoginAttempts int `gorm:"default:0"`
|
||||
}
|
||||
|
||||
type LoginRequest struct {
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type ResetPasswordRequest struct {
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user