Compare commits
No commits in common. "ccd92c270a87902460c16843f1ccf1607dac86be" and "d2a43a88c47251e1c9da10a2c5bc1dbd579af8d0" have entirely different histories.
ccd92c270a
...
d2a43a88c4
@ -6,7 +6,6 @@ DB_PORT=
|
|||||||
|
|
||||||
APP_PORT=
|
APP_PORT=
|
||||||
GRACEFULL_TIMEOUT=
|
GRACEFULL_TIMEOUT=
|
||||||
SALT_SECURITY=
|
|
||||||
|
|
||||||
REDIS_HOST=
|
REDIS_HOST=
|
||||||
REDIS_USERNAME=
|
REDIS_USERNAME=
|
||||||
|
|||||||
12
README.md
12
README.md
@ -114,21 +114,9 @@ DB_USER=your_db_user
|
|||||||
DB_PASSWORD=your_db_password
|
DB_PASSWORD=your_db_password
|
||||||
DB_NAME=your_db_name
|
DB_NAME=your_db_name
|
||||||
DB_PORT=3306 # or 5432, depending on your DB type
|
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.
|
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`
|
## Build the Binary Using `make build`
|
||||||
|
|
||||||
Run the following command to build your project. The binary will be placed in the `bin` folder.
|
Run the following command to build your project. The binary will be placed in the `bin` folder.
|
||||||
|
|||||||
@ -29,7 +29,6 @@ func main() {
|
|||||||
var temp subscribeplandomain.SubscribePlan
|
var temp subscribeplandomain.SubscribePlan
|
||||||
|
|
||||||
if err := db.Where("code = ?", "basic").First(&temp).Error; err != nil {
|
if err := db.Where("code = ?", "basic").First(&temp).Error; err != nil {
|
||||||
log.Print("seeding basic subscribe plan")
|
|
||||||
db.Create(&subscribeplandomain.SubscribePlan{
|
db.Create(&subscribeplandomain.SubscribePlan{
|
||||||
ID: uuid.NewString(),
|
ID: uuid.NewString(),
|
||||||
Code: "basic",
|
Code: "basic",
|
||||||
|
|||||||
@ -18,12 +18,10 @@ type User struct {
|
|||||||
type RegisterStaffReq struct {
|
type RegisterStaffReq struct {
|
||||||
Email string `json:"email" validate:"required"`
|
Email string `json:"email" validate:"required"`
|
||||||
Password string `json:"password" validate:"required"`
|
Password string `json:"password" validate:"required"`
|
||||||
Username string `json:"username" validate:"required"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Staff struct {
|
type Staff struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email" validate:"required"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password" validate:"required"`
|
||||||
Username string `json:"username"`
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,12 +71,9 @@ paths:
|
|||||||
format: email
|
format: email
|
||||||
password:
|
password:
|
||||||
type: string
|
type: string
|
||||||
username:
|
|
||||||
type: string
|
|
||||||
required:
|
required:
|
||||||
- email
|
- email
|
||||||
- password
|
- password
|
||||||
- username
|
|
||||||
responses:
|
responses:
|
||||||
"201":
|
"201":
|
||||||
description: Staff member created
|
description: Staff member created
|
||||||
@ -194,6 +191,8 @@ paths:
|
|||||||
required:
|
required:
|
||||||
- email
|
- email
|
||||||
- password
|
- password
|
||||||
|
- subscribe_plan_id
|
||||||
|
- phone
|
||||||
responses:
|
responses:
|
||||||
"201":
|
"201":
|
||||||
description: User created
|
description: User created
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user