Compare commits

..

No commits in common. "master" and "feature/seller-by-id" have entirely different histories.

4 changed files with 0 additions and 66 deletions

View File

@ -144,22 +144,3 @@ func (w Warehouse) GetConfigByWarehouseID(warehouseID string) (*model.WarehouseC
}
return r.Data, nil
}
// GetWarehouses ...
func (w Warehouse) GetWarehouses(p model.GetWarehousesRequest) (*model.GetWarehousesResponse, error) {
msg, err := natsio.GetServer().Request(subject.Warehouse.GetWarehouses, toBytes(p))
if err != nil {
return nil, err
}
var r struct {
Data *model.GetWarehousesResponse `json:"data"`
Error string `json:"error"`
}
if err = json.Unmarshal(msg.Data, &r); err != nil {
return nil, err
}
if r.Error != "" {
return nil, errors.New(r.Error)
}
return r.Data, nil
}

View File

@ -17,7 +17,6 @@ type OutboundRequestPayload struct {
// InsuranceOpts ...
type InsuranceOpts struct {
InsuranceType string `json:"insuranceType"`
VehicleTypeID string `json:"vehicleTypeId"`
VehicleTypeName string `json:"vehicleTypeName"`
InsuranceTypeID string `json:"insuranceTypeId"`
@ -26,12 +25,6 @@ type InsuranceOpts struct {
Chassis string `json:"chassis"`
Engine string `json:"engine"`
BeginDate string `json:"beginDate"`
// For car insurance
NumberOfSeatsCarOccupantAccidentInsurance int `json:"numberOfSeatsCarOccupantAccidentInsurance"`
NumberOfSeats int `json:"numberOfSeats"`
NumberOfSeatsOrTonnageId string `json:"numberOfSeatsOrTonnageId"`
NumberOfSeatsOrTonnageName string `json:"numberOfSeatsOrTonnageName"`
}
// OutboundRequestItem ...
@ -87,14 +80,3 @@ type SupplierIsClosed struct {
Supplier string `json:"supplier"`
IsClosed bool `json:"isClosed"`
}
// GetWarehousesRequest ...
type GetWarehousesRequest struct {
Keyword string `json:"keyword"`
Status string `json:"status"`
Supplier string `json:"supplier"`
BusinessType string `json:"businessType"`
Page int64 `json:"page"`
Limit int64 `json:"limit"`
}

View File

@ -135,30 +135,3 @@ type WarehouseNatsResponse struct {
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
// WarehouseInfo ...
type WarehouseInfo struct {
ID string `json:"_id"`
Name string `json:"name"`
BusinessType string `json:"businessType"`
Status string `json:"status"`
Slug string `json:"slug"`
Supplier WarehouseSupplierInfo `json:"supplier"`
Location ResponseWarehouseLocation `json:"location"`
Contact ResponseWarehouseContact `json:"contact"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
// WarehouseSupplierInfo ...
type WarehouseSupplierInfo struct {
ID string `json:"_id"`
Name string `json:"name"`
}
// GetWarehousesResponse ...
type GetWarehousesResponse struct {
Total int64 `json:"total"`
Limit int64 `json:"limit"`
List []WarehouseInfo `json:"list"`
}

View File

@ -21,7 +21,6 @@ var Warehouse = struct {
AfterUpdateWarehouse string
AfterCreateWarehouse string
UpdateIsClosedSupplier string
GetWarehouses string
}{
AfterCreateWarehouse: getWarehouseValue("after_create_warehouse"),
AfterUpdateWarehouse: getWarehouseValue("after_update_warehouse"),
@ -37,5 +36,4 @@ var Warehouse = struct {
Distinct: getWarehouseValue("distinct"),
Count: getWarehouseValue("count"),
UpdateIsClosedSupplier: getWarehouseValue("update_is_closed_supplier"),
GetWarehouses: getWarehouseValue("get_warehouses"),
}