Add User Partner and Product
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package response
|
||||
|
||||
type LoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
Name string `json:"name"`
|
||||
Role Role `json:"role"`
|
||||
Branch *Branch `json:"branch"`
|
||||
Token string `json:"token"`
|
||||
Name string `json:"name"`
|
||||
Role Role `json:"role"`
|
||||
Partner *Partner `json:"partner"`
|
||||
}
|
||||
|
||||
type Role struct {
|
||||
|
||||
@@ -4,9 +4,9 @@ type Partner struct {
|
||||
ID *int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Status string `json:"status"`
|
||||
Address string `json:"address"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
Address string `json:"address,omitempty"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type PartnerList struct {
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
package response
|
||||
|
||||
import "furtuna-be/internal/constants/product"
|
||||
|
||||
type Product struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Type product.ProductType `json:"type"`
|
||||
Price float64 `json:"price"`
|
||||
Status product.ProductStatus `json:"status"`
|
||||
Description string `json:"description" `
|
||||
Image string `json:"image" `
|
||||
BranchID int64 `json:"branch_id"`
|
||||
StockQty int64 `json:"stock_qty"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
ID int64 `json:"id"`
|
||||
PartnerID int64 `json:"partner_id"`
|
||||
SiteID int64 `json:"site_id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Price float64 `json:"price"`
|
||||
IsWeekendTicket bool `json:"is_weekend_ticket"`
|
||||
IsSeasonTicket bool `json:"is_season_ticket"`
|
||||
Status string `json:"status"`
|
||||
Description string `json:"description"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type ProductList struct {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package response
|
||||
|
||||
type Site struct {
|
||||
ID *int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
PartnerID int64 `json:"partner_id"`
|
||||
Image string `json:"image"`
|
||||
Address string `json:"address"`
|
||||
LocationLink string `json:"location_link"`
|
||||
Description string `json:"description"`
|
||||
Highlight string `json:"highlight"`
|
||||
ContactPerson string `json:"contact_person"`
|
||||
TnC string `json:"tnc"`
|
||||
AdditionalInfo string `json:"additional_info"`
|
||||
Status string `json:"status"`
|
||||
IsSeasonTicket bool `json:"is_season_ticket"`
|
||||
IsDiscountActive bool `json:"is_discount_active"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type SiteList struct {
|
||||
Sites []Site `json:"sites"`
|
||||
Total int64 `json:"total"`
|
||||
Limit int `json:"limit"`
|
||||
Offset int `json:"offset"`
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package response
|
||||
|
||||
type User struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
Status string `json:"status"`
|
||||
RoleID int64 `json:"role_id"`
|
||||
RoleName string `json:"role_name"`
|
||||
PartnerID *int64 `json:"partner_id"`
|
||||
BranchName string `json:"partner_name"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty"`
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
Status string `json:"status"`
|
||||
RoleID int64 `json:"role_id"`
|
||||
RoleName string `json:"role_name"`
|
||||
PartnerID *int64 `json:"partner_id"`
|
||||
PartnerName string `json:"partner_name"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type UserList struct {
|
||||
|
||||
Reference in New Issue
Block a user