Feat(booking): Added backtosg field
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good

This commit is contained in:
2022-09-27 04:36:41 +08:00
parent 252dfbffd6
commit 51b539fe7a
7 changed files with 42 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ type Booking struct {
Passport string
PassportExpiry time.Time // Only date matters
Contact string // +6512345678
BackToSg bool // true/false
Status string // "success", "error", "pending", "running"
}
@@ -34,6 +35,7 @@ type BookingCreateRequest struct {
Passport string `json:"passport" validate:"required"`
PassportExpiry time.Time `json:"passportExpiry" validate:"required" swaggertype:"string" format:"date-time"`
Contact string `json:"contact" validate:"required,e164" swaggertype:"string" example:"+6512345678"`
BackToSg bool `json:"backToSg" swaggertype:"boolean" example:"false"`
}
type BookingResponse struct {
@@ -46,6 +48,7 @@ type BookingResponse struct {
PassportExpiry time.Time `json:"passportExpiry"`
Contact string `json:"contact"`
Status string `json:"status"`
BackToSg bool `json:"backToSg" validate:"required"`
}
type BookingListResponse []BookingResponse