Compare commits

..

No commits in common. "ccd92c270a87902460c16843f1ccf1607dac86be" and "d2a43a88c47251e1c9da10a2c5bc1dbd579af8d0" have entirely different histories.

5 changed files with 4 additions and 21 deletions

View File

@ -6,7 +6,6 @@ DB_PORT=
APP_PORT=
GRACEFULL_TIMEOUT=
SALT_SECURITY=
REDIS_HOST=
REDIS_USERNAME=

View File

@ -114,21 +114,9 @@ DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=your_db_name
DB_PORT=3306 # or 5432, depending on your DB type
APP_PORT=3000 # example
GRACEFULL_TIMEOUT=10 #example
SALT_SECURITY=your_secret_security
Make sure to replace the values with your actual database details.
```
## Migrate the Database Using `make migrate`
Before running your application, let's setup your database first.
```bash
make migrate
```
## Build the Binary Using `make build`
Run the following command to build your project. The binary will be placed in the `bin` folder.

View File

@ -29,7 +29,6 @@ func main() {
var temp subscribeplandomain.SubscribePlan
if err := db.Where("code = ?", "basic").First(&temp).Error; err != nil {
log.Print("seeding basic subscribe plan")
db.Create(&subscribeplandomain.SubscribePlan{
ID: uuid.NewString(),
Code: "basic",

View File

@ -18,12 +18,10 @@ type User struct {
type RegisterStaffReq struct {
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
Username string `json:"username" validate:"required"`
}
type Staff struct {
ID string `json:"id"`
Email string `json:"email"`
Password string `json:"password"`
Username string `json:"username"`
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
}

View File

@ -71,12 +71,9 @@ paths:
format: email
password:
type: string
username:
type: string
required:
- email
- password
- username
responses:
"201":
description: Staff member created
@ -194,6 +191,8 @@ paths:
required:
- email
- password
- subscribe_plan_id
- phone
responses:
"201":
description: User created