Mhamdans17 commited on
Commit ·
f168cd0
1
Parent(s): e76e0a5
feat: add company_address to tenant registration request payload
Browse files
controllers/auth_controller.go
CHANGED
|
@@ -78,6 +78,7 @@ type RegisterRequest struct {
|
|
| 78 |
|
| 79 |
type TenantRegistrationRequest struct {
|
| 80 |
CompanyName string `json:"company_name" binding:"required"`
|
|
|
|
| 81 |
OwnerName string `json:"owner_name" binding:"required"`
|
| 82 |
OwnerEmail string `json:"owner_email" binding:"required,email"`
|
| 83 |
OwnerPhone string `json:"owner_phone" binding:"required"`
|
|
@@ -242,10 +243,10 @@ func RegisterTenant(c *gin.Context) {
|
|
| 242 |
tx.Rollback()
|
| 243 |
}
|
| 244 |
}()
|
| 245 |
-
|
| 246 |
// 1. Buat Company
|
| 247 |
comp := models.Company{
|
| 248 |
Name: req.CompanyName,
|
|
|
|
| 249 |
BankAccountNumber: req.BankAccountNumber,
|
| 250 |
BankName: req.BankName,
|
| 251 |
Email: req.OwnerEmail,
|
|
|
|
| 78 |
|
| 79 |
type TenantRegistrationRequest struct {
|
| 80 |
CompanyName string `json:"company_name" binding:"required"`
|
| 81 |
+
CompanyAddress string `json:"company_address"`
|
| 82 |
OwnerName string `json:"owner_name" binding:"required"`
|
| 83 |
OwnerEmail string `json:"owner_email" binding:"required,email"`
|
| 84 |
OwnerPhone string `json:"owner_phone" binding:"required"`
|
|
|
|
| 243 |
tx.Rollback()
|
| 244 |
}
|
| 245 |
}()
|
|
|
|
| 246 |
// 1. Buat Company
|
| 247 |
comp := models.Company{
|
| 248 |
Name: req.CompanyName,
|
| 249 |
+
Address: req.CompanyAddress,
|
| 250 |
BankAccountNumber: req.BankAccountNumber,
|
| 251 |
BankName: req.BankName,
|
| 252 |
Email: req.OwnerEmail,
|