Compare commits
	
		
			5 Commits
		
	
	
		
			master
			...
			intergrate
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								 | 
						d29ad11fa5 | |
| 
							
							
								 | 
						ed48d80665 | |
| 
							
							
								 | 
						c491945395 | |
| 
							
							
								 | 
						8c5e7e4798 | |
| 
							
							
								 | 
						30b0238c0f | 
| 
						 | 
				
			
			@ -17,7 +17,6 @@ func GetLocation() Location {
 | 
			
		|||
	return Location{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetLocationByCode ...
 | 
			
		||||
func (l Location) GetLocationByCode(payload model.LocationRequestPayload) (*model.ResponseLocationAddress, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Location.GetLocationByCode, toBytes(payload))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
| 
						 | 
				
			
			@ -37,70 +36,3 @@ func (l Location) GetLocationByCode(payload model.LocationRequestPayload) (*mode
 | 
			
		|||
	}
 | 
			
		||||
	return r.Data, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetProvincesByCodes ... ...
 | 
			
		||||
func (l Location) GetProvincesByCodes(p model.ProvinceRequestPayload) (*model.LocationProvinceResponse, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Location.GetProvincesByCodes, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Data  *model.LocationProvinceResponse `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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetDistrictsByCodes ...
 | 
			
		||||
func (l Location) GetDistrictsByCodes(p model.DistrictRequestPayload) (*model.LocationDistrictResponse, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Location.GetDistrictsByCodes, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Data  *model.LocationDistrictResponse `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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetWardsByCodes ...
 | 
			
		||||
func (l Location) GetWardsByCodes(p model.WardRequestPayload) (*model.LocationWardResponse, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Location.GetWardsByCodes, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Data  *model.LocationWardResponse `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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,36 +0,0 @@
 | 
			
		|||
package client
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"errors"
 | 
			
		||||
	"github.com/Selly-Modules/natsio"
 | 
			
		||||
	"github.com/Selly-Modules/natsio/model"
 | 
			
		||||
	"github.com/Selly-Modules/natsio/subject"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// News ...
 | 
			
		||||
type News struct{}
 | 
			
		||||
 | 
			
		||||
// GetNews ...
 | 
			
		||||
func GetNews() News {
 | 
			
		||||
	return News{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetProductNoticesByInventory ...
 | 
			
		||||
func (n News) GetProductNoticesByInventory(p model.GetProductNoticesByInventoryRequest) (*model.GetProductNoticesByInventoryResponse, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.News.GetProductNoticesByInventory, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Data  *model.GetProductNoticesByInventoryResponse `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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -66,35 +66,3 @@ func (o Order) ChangeDeliveryStatus(p model.OrderChangeDeliveryStatus) error {
 | 
			
		|||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateLogisticInfoFailed ...
 | 
			
		||||
func (o Order) UpdateLogisticInfoFailed(p model.OrderUpdateLogisticInfoFailed) error {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Order.UpdateLogisticInfoFailed, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	var r model.CommonResponseData
 | 
			
		||||
	if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if r.Error != "" {
 | 
			
		||||
		return errors.New(r.Error)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ORNotUpdateStatus ...
 | 
			
		||||
func (o Order) ORNotUpdateStatus(p model.OrderORsNotUpdateStatus) error {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Order.ORNotUpdateStatus, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	var r model.CommonResponseData
 | 
			
		||||
	if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if r.Error != "" {
 | 
			
		||||
		return errors.New(r.Error)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,88 +0,0 @@
 | 
			
		|||
package client
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"errors"
 | 
			
		||||
 | 
			
		||||
	"github.com/Selly-Modules/natsio"
 | 
			
		||||
	"github.com/Selly-Modules/natsio/model"
 | 
			
		||||
	"github.com/Selly-Modules/natsio/subject"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Seller ...
 | 
			
		||||
type Seller struct{}
 | 
			
		||||
 | 
			
		||||
// GetSeller ...
 | 
			
		||||
func GetSeller() Seller {
 | 
			
		||||
	return Seller{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetSellerInfoByID ...
 | 
			
		||||
func (s Seller) GetSellerInfoByID(p model.GetSellerByIDRequest) (*model.ResponseSellerInfo, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Seller.GetSellerInfoByID, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Data  *model.ResponseSellerInfo `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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetListSellerInfoByIDs ...
 | 
			
		||||
func (s Seller) GetListSellerInfoByIDs(p model.GetListSellerByIDsRequest) (*model.ResponseListSellerInfo, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Seller.GetListSellerInfoByIDs, toBytes(p))
 | 
			
		||||
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Data  *model.ResponseListSellerInfo `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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetListSellerInfoSupportChatByIDs ...
 | 
			
		||||
func (s Seller) GetListSellerInfoSupportChatByIDs(p model.GetListSellerSupportChatByIDsRequest) (*model.ResponseListSellerInfoSupportChat, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.SupportChat.GetListSellerInfoSupportChatByIDs, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Data  *model.ResponseListSellerInfoSupportChat `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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -17,60 +17,6 @@ func GetWarehouse() Warehouse {
 | 
			
		|||
	return Warehouse{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateIsClosedSupplier ...
 | 
			
		||||
func (w Warehouse) UpdateIsClosedSupplier(p model.UpdateSupplierIsClosedRequest) error {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Warehouse.UpdateIsClosedSupplier, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Error string `json:"error"`
 | 
			
		||||
	}
 | 
			
		||||
	if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if r.Error != "" {
 | 
			
		||||
		return errors.New(r.Error)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AfterCreateWarehouse ...
 | 
			
		||||
func (w Warehouse) AfterCreateWarehouse(p model.WarehouseNatsResponse) error {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Warehouse.AfterCreateWarehouse, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Error string `json:"error"`
 | 
			
		||||
	}
 | 
			
		||||
	if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if r.Error != "" {
 | 
			
		||||
		return errors.New(r.Error)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AfterUpdateWarehouse ...
 | 
			
		||||
func (w Warehouse) AfterUpdateWarehouse(p model.WarehouseNatsResponse) error {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Warehouse.AfterUpdateWarehouse, toBytes(p))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	var r struct {
 | 
			
		||||
		Error string `json:"error"`
 | 
			
		||||
	}
 | 
			
		||||
	if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if r.Error != "" {
 | 
			
		||||
		return errors.New(r.Error)
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CreateOutboundRequest ...
 | 
			
		||||
func (w Warehouse) CreateOutboundRequest(p model.OutboundRequestPayload) (*model.OutboundRequestResponse, error) {
 | 
			
		||||
	msg, err := natsio.GetServer().Request(subject.Warehouse.CreateOutboundRequest, toBytes(p))
 | 
			
		||||
| 
						 | 
				
			
			@ -144,22 +90,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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
package natsio
 | 
			
		||||
 | 
			
		||||
// StreamNameSelly ...
 | 
			
		||||
const StreamNameSelly = "selly"
 | 
			
		||||
| 
						 | 
				
			
			@ -1,12 +0,0 @@
 | 
			
		|||
package jsconsumer
 | 
			
		||||
 | 
			
		||||
// Selly ...
 | 
			
		||||
var Selly = struct {
 | 
			
		||||
	PushNotification               string
 | 
			
		||||
	UpdateSellerAffiliateStatistic string
 | 
			
		||||
	CheckAnDInsertCashflowBySeller string
 | 
			
		||||
}{
 | 
			
		||||
	PushNotification:               "PULL_PUSH_NOTIFICATION",
 | 
			
		||||
	UpdateSellerAffiliateStatistic: "PULL_UPDATE_SELLER_AFFILIATE_STATISTIC",
 | 
			
		||||
	CheckAnDInsertCashflowBySeller: "PULL_CHECK_AND_INSERT_CASHFLOW_BY_SELLER",
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,60 +0,0 @@
 | 
			
		|||
package jsmodel
 | 
			
		||||
 | 
			
		||||
// PushNotification ...
 | 
			
		||||
type PushNotification struct {
 | 
			
		||||
	User        string              `json:"user"`
 | 
			
		||||
	Type        string              `json:"type"`
 | 
			
		||||
	TargetID    string              `json:"targetId"`
 | 
			
		||||
	IsFromAdmin bool                `json:"isFromAdmin"`
 | 
			
		||||
	Category    string              `json:"category"`
 | 
			
		||||
	Options     NotificationOptions `json:"options"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotificationOptions ...
 | 
			
		||||
type NotificationOptions struct {
 | 
			
		||||
	Title   string `json:"title"`
 | 
			
		||||
	Content string `json:"content"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// PayloadUpdateSellerAffiliateStatistic ...
 | 
			
		||||
type PayloadUpdateSellerAffiliateStatistic struct {
 | 
			
		||||
	SellerID  string                   `json:"sellerId"`
 | 
			
		||||
	Statistic SellerAffiliateStatistic `json:"statistic"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SellerAffiliateStatistic ...
 | 
			
		||||
type SellerAffiliateStatistic struct {
 | 
			
		||||
	TransactionTotal              int     `json:"transactionTotal"`
 | 
			
		||||
	TransactionCashback           int     `json:"transactionCashback"`
 | 
			
		||||
	TransactionPending            int     `json:"transactionPending"`
 | 
			
		||||
	TransactionApproved           int     `json:"transactionApproved"`
 | 
			
		||||
	TransactionRejected           int     `json:"transactionRejected"`
 | 
			
		||||
	CommissionTransactionTotal    float64 `json:"commissionTransactionTotal"`
 | 
			
		||||
	CommissionTransactionCashback float64 `json:"commissionTransactionCashback"`
 | 
			
		||||
	CommissionTransactionApproved float64 `json:"commissionTransactionApproved"`
 | 
			
		||||
	CommissionTransactionPending  float64 `json:"commissionTransactionPending"`
 | 
			
		||||
	CommissionTransactionRejected float64 `json:"commissionTransactionRejected"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// PayloadCashflowsBySeller ...
 | 
			
		||||
type PayloadCashflowsBySeller struct {
 | 
			
		||||
	SellerID string           `json:"sellerId"`
 | 
			
		||||
	List     []CashflowSeller `json:"list"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CashflowSeller ...
 | 
			
		||||
type CashflowSeller struct {
 | 
			
		||||
	Value      float64          `json:"value"`
 | 
			
		||||
	Action     string           `json:"action"`
 | 
			
		||||
	Category   string           `json:"category"`
 | 
			
		||||
	TargetID   string           `json:"targetId"`
 | 
			
		||||
	TargetType string           `json:"targetType"`
 | 
			
		||||
	Options    *CashFlowOptions `json:"options"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CashFlowOptions ...
 | 
			
		||||
type CashFlowOptions struct {
 | 
			
		||||
	AffiliateTransactionCode string `json:"affiliateTransactionCode,omitempty"`
 | 
			
		||||
	AffiliateCampaignID      string `json:"affiliateCampaignId,omitempty"`
 | 
			
		||||
	AffiliateCampaignName    string `json:"affiliateCampaignName,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,10 +0,0 @@
 | 
			
		|||
package jssubject
 | 
			
		||||
 | 
			
		||||
var root = "js"
 | 
			
		||||
 | 
			
		||||
// prefixes ...
 | 
			
		||||
var prefixes = struct {
 | 
			
		||||
	Selly string
 | 
			
		||||
}{
 | 
			
		||||
	Selly: "selly",
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,21 +0,0 @@
 | 
			
		|||
package jssubject
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// getSellyValue ...
 | 
			
		||||
func getSellyValue(val string) string {
 | 
			
		||||
	return fmt.Sprintf("%s.%s.%s", root, prefixes.Selly, val)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Selly ...
 | 
			
		||||
var Selly = struct {
 | 
			
		||||
	PushNotification               string
 | 
			
		||||
	UpdateSellerAffiliateStatistic string
 | 
			
		||||
	CheckAnDInsertCashflowBySeller string
 | 
			
		||||
}{
 | 
			
		||||
	PushNotification:               getSellyValue("push_notifications"),
 | 
			
		||||
	UpdateSellerAffiliateStatistic: getSellyValue("update_seller_affiliate_statistic"),
 | 
			
		||||
	CheckAnDInsertCashflowBySeller: getSellyValue("check_and_insert_cashflow_statistic"),
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -6,18 +6,3 @@ type LocationRequestPayload struct {
 | 
			
		|||
	District int `json:"district"`
 | 
			
		||||
	Ward     int `json:"ward"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ProvinceRequestPayload ...
 | 
			
		||||
type ProvinceRequestPayload struct {
 | 
			
		||||
	Codes []int `json:"codes"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DistrictRequestPayload ...
 | 
			
		||||
type DistrictRequestPayload struct {
 | 
			
		||||
	Codes []int `json:"codes"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WardRequestPayload ...
 | 
			
		||||
type WardRequestPayload struct {
 | 
			
		||||
	Codes []int `json:"codes"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,18 +26,3 @@ type LocationWard struct {
 | 
			
		|||
	Name string `json:"name"`
 | 
			
		||||
	Code int    `json:"code"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// LocationProvinceResponse ...
 | 
			
		||||
type LocationProvinceResponse struct {
 | 
			
		||||
	Provinces []LocationProvince `json:"provinces"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// LocationDistrictResponse ...
 | 
			
		||||
type LocationDistrictResponse struct {
 | 
			
		||||
	Districts []LocationDistrict `json:"districts"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// LocationWardResponse ...
 | 
			
		||||
type LocationWardResponse struct {
 | 
			
		||||
	Wards []LocationWard `json:"wards"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +0,0 @@
 | 
			
		|||
package model
 | 
			
		||||
 | 
			
		||||
// GetProductNoticesByInventoryRequest ....
 | 
			
		||||
type GetProductNoticesByInventoryRequest struct {
 | 
			
		||||
	InventoryIds []string `json:"inventoryIds"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,38 +0,0 @@
 | 
			
		|||
package model
 | 
			
		||||
 | 
			
		||||
// GetProductNoticesByInventoryResponse ....
 | 
			
		||||
type GetProductNoticesByInventoryResponse struct {
 | 
			
		||||
	Notices []NewsAppResponse `json:"notices"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewsAppResponse ...
 | 
			
		||||
type NewsAppResponse struct {
 | 
			
		||||
	ID           string        `json:"_id"`
 | 
			
		||||
	Title        string        `json:"title,omitempty"`
 | 
			
		||||
	Target       *TargetNewDoc `json:"target,omitempty"`
 | 
			
		||||
	ActionType   *ActionType   `json:"action"`
 | 
			
		||||
	ShortDesc    string        `json:"shortDesc,omitempty"`
 | 
			
		||||
	Type         string        `json:"type"`
 | 
			
		||||
	ShortTitle   string        `json:"shortTitle,omitempty"`
 | 
			
		||||
	Color        string        `json:"color"`
 | 
			
		||||
	Options      *NewsOptions  `json:"options,omitempty"`
 | 
			
		||||
	DisplayStyle string        `json:"displayStyle"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewsOptions ...
 | 
			
		||||
type NewsOptions struct {
 | 
			
		||||
	Category string `json:"category"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TargetNewDoc ...
 | 
			
		||||
type TargetNewDoc struct {
 | 
			
		||||
	Type  string `json:"type,omitempty"`
 | 
			
		||||
	Value string `json:"value,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ActionType ...
 | 
			
		||||
type ActionType struct {
 | 
			
		||||
	Type  string `json:"type"`
 | 
			
		||||
	Value string `json:"value"`
 | 
			
		||||
	Text  string `json:"text,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2,12 +2,11 @@ package model
 | 
			
		|||
 | 
			
		||||
// OrderUpdateORStatus ...
 | 
			
		||||
type OrderUpdateORStatus struct {
 | 
			
		||||
	OrderCode      string      `json:"orderCode"`
 | 
			
		||||
	ORCode         string      `json:"orCode"`
 | 
			
		||||
	Status         string      `json:"status"`
 | 
			
		||||
	DeliveryStatus string      `json:"deliveryStatus"`
 | 
			
		||||
	Reason         string      `json:"reason"`
 | 
			
		||||
	Data           OrderORData `json:"data"`
 | 
			
		||||
	OrderCode      string `json:"orderCode"`
 | 
			
		||||
	ORCode         string `json:"orCode"`
 | 
			
		||||
	Status         string `json:"status"`
 | 
			
		||||
	DeliveryStatus string `json:"deliveryStatus"`
 | 
			
		||||
	Reason         string `json:"reason"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// OrderCancelDelivery ...
 | 
			
		||||
| 
						 | 
				
			
			@ -21,20 +20,3 @@ type OrderChangeDeliveryStatus struct {
 | 
			
		|||
	DeliveryStatus string   `json:"deliveryStatus"`
 | 
			
		||||
	ActionBy       ActionBy `json:"actionBy"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// OrderORData ...
 | 
			
		||||
type OrderORData struct {
 | 
			
		||||
	Link string `json:"link"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// OrderUpdateLogisticInfoFailed ...
 | 
			
		||||
type OrderUpdateLogisticInfoFailed struct {
 | 
			
		||||
	OrderID string `json:"orderId"`
 | 
			
		||||
	ORCode  string `json:"orCode"`
 | 
			
		||||
	Reason  string `json:"reason"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// OrderORsNotUpdateStatus ...
 | 
			
		||||
type OrderORsNotUpdateStatus struct {
 | 
			
		||||
	ORCodes []string `json:"orCodes"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,18 +0,0 @@
 | 
			
		|||
package model
 | 
			
		||||
 | 
			
		||||
import "go.mongodb.org/mongo-driver/bson/primitive"
 | 
			
		||||
 | 
			
		||||
// GetSellerByIDRequest ...
 | 
			
		||||
type GetSellerByIDRequest struct {
 | 
			
		||||
	SellerID primitive.ObjectID `json:"sellerId"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetListSellerByIDsRequest ...
 | 
			
		||||
type GetListSellerByIDsRequest struct {
 | 
			
		||||
	SellerIDs []primitive.ObjectID `json:"sellerIds"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetListSellerSupportChatByIDsRequest ...
 | 
			
		||||
type GetListSellerSupportChatByIDsRequest struct {
 | 
			
		||||
	SellerIDs []primitive.ObjectID `json:"sellerIds"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,81 +0,0 @@
 | 
			
		|||
package model
 | 
			
		||||
 | 
			
		||||
import "time"
 | 
			
		||||
 | 
			
		||||
// ResponseSellerInfo ...
 | 
			
		||||
type ResponseSellerInfo struct {
 | 
			
		||||
	ID   string `json:"_id"`
 | 
			
		||||
	Name string `json:"name"`
 | 
			
		||||
	Code string `json:"code"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ResponseListSellerInfo ...
 | 
			
		||||
type ResponseListSellerInfo struct {
 | 
			
		||||
	Sellers []ResponseSellerInfo `json:"sellers"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ResponseListSellerInfoSupportChat ...
 | 
			
		||||
type ResponseListSellerInfoSupportChat struct {
 | 
			
		||||
	Sellers []ResponseSellerInfoSupportChat `json:"sellers"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ResponseSellerInfoSupportChat ...
 | 
			
		||||
type ResponseSellerInfoSupportChat struct {
 | 
			
		||||
	ID           string               `json:"_id"`
 | 
			
		||||
	Name         string               `json:"name"`
 | 
			
		||||
	Code         string               `json:"code"`
 | 
			
		||||
	Membership   SellerMembershipInfo `json:"membership"`
 | 
			
		||||
	Info         SellerContactInfo    `json:"info"`
 | 
			
		||||
	Team         *TeamInfo            `json:"team,omitempty"`
 | 
			
		||||
	Statistic    SellerStatistic      `json:"statistic"`
 | 
			
		||||
	TrackingTime *SellerTrackingTime  `json:"trackingTime"`
 | 
			
		||||
	Invitee      *InviteeInfo         `json:"invitee"`
 | 
			
		||||
	CreatedAt    time.Time            `json:"createdAt"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SellerTrackingTime ...
 | 
			
		||||
type SellerTrackingTime struct {
 | 
			
		||||
	FirstOrderDeliveredAt time.Time `json:"firstOrderDeliveredAt,omitempty"`
 | 
			
		||||
	ThirdOrderDeliveredAt time.Time `json:"thirdOrderDeliveredAt,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SellerStatistic ...
 | 
			
		||||
type SellerStatistic struct {
 | 
			
		||||
	ThisMonthSale                float64 `bson:"thisMonthSale" json:"thisMonthSale"`
 | 
			
		||||
	LastMonthSale                float64 `bson:"lastMonthSale" json:"lastMonthSale"`
 | 
			
		||||
	Sale                         float64 `bson:"sale" json:"sale"`
 | 
			
		||||
	TransactionTotal             int     `json:"transactionTotal"`
 | 
			
		||||
	TransactionPaymentProcessing int     `json:"transactionPaymentProcessing"`
 | 
			
		||||
	TransactionWaitingApprove    int     `json:"transactionWaitingApprove"`
 | 
			
		||||
	TransactionPending           int     `json:"transactionPending"`
 | 
			
		||||
	TransactionSuccess           int     `json:"transactionSuccess"`
 | 
			
		||||
	TransactionRejected          int     `json:"transactionRejected"`
 | 
			
		||||
	TransactionDelivering        int     `json:"transactionDelivering"`
 | 
			
		||||
	TransactionDelivered         int     `json:"transactionDelivered"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TeamInfo ...
 | 
			
		||||
type TeamInfo struct {
 | 
			
		||||
	ID   string `json:"_id"`
 | 
			
		||||
	Name string `json:"name"`
 | 
			
		||||
	Role string `json:"role"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// InviteeInfo ...
 | 
			
		||||
type InviteeInfo struct {
 | 
			
		||||
	ID   string `json:"_id"`
 | 
			
		||||
	Name string `json:"name"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SellerContactInfo ...
 | 
			
		||||
type SellerContactInfo struct {
 | 
			
		||||
	City     int    `json:"cityCode"`
 | 
			
		||||
	CityName string `json:"cityName"`
 | 
			
		||||
	Gender   string `json:"gender"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SellerMembershipInfo ...
 | 
			
		||||
type SellerMembershipInfo struct {
 | 
			
		||||
	Level int    `json:"level"`
 | 
			
		||||
	Name  string `json:"name"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2,9 +2,8 @@ package model
 | 
			
		|||
 | 
			
		||||
// ResponseSupplierInfo ...
 | 
			
		||||
type ResponseSupplierInfo struct {
 | 
			
		||||
	ID           string `json:"id"`
 | 
			
		||||
	Name         string `json:"name"`
 | 
			
		||||
	BusinessType string `json:"businessType"`
 | 
			
		||||
	ID   string `json:"id"`
 | 
			
		||||
	Name string `json:"name"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ResponseSupplierContract ...
 | 
			
		||||
| 
						 | 
				
			
			@ -17,12 +16,11 @@ type ResponseSupplierContract struct {
 | 
			
		|||
 | 
			
		||||
// SupplierBrief ...
 | 
			
		||||
type SupplierBrief struct {
 | 
			
		||||
	ID           string `json:"_id"`
 | 
			
		||||
	Name         string `json:"name"`
 | 
			
		||||
	Status       string `json:"status"`
 | 
			
		||||
	BusinessType string `json:"businessType"`
 | 
			
		||||
	CreatedAt    string `json:"createdAt"`
 | 
			
		||||
	UpdatedAt    string `json:"updatedAt"`
 | 
			
		||||
	ID        string `json:"_id"`
 | 
			
		||||
	Name      string `json:"name"`
 | 
			
		||||
	Status    string `json:"status"`
 | 
			
		||||
	CreatedAt string `json:"createdAt"`
 | 
			
		||||
	UpdatedAt string `json:"updatedAt"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type SupplierAll struct {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,12 +12,11 @@ type OutboundRequestPayload struct {
 | 
			
		|||
	TPLCode      string                `json:"tplCode"`
 | 
			
		||||
	Customer     CustomerInfo          `json:"customer"`
 | 
			
		||||
	Items        []OutboundRequestItem `json:"items"`
 | 
			
		||||
	Insurance    *InsuranceOpts        `json:"insurance"`
 | 
			
		||||
	Insurance    *InsuranceOpts
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 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 ...
 | 
			
		||||
| 
						 | 
				
			
			@ -76,25 +69,3 @@ type SyncORStatusRequest struct {
 | 
			
		|||
	ORCode    string `json:"orCode"`
 | 
			
		||||
	OrderCode string `json:"orderCode"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateSupplierIsClosedRequest ...
 | 
			
		||||
type UpdateSupplierIsClosedRequest struct {
 | 
			
		||||
	Suppliers []SupplierIsClosed `json:"suppliers"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SupplierIsClosed ...
 | 
			
		||||
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"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,26 +24,6 @@ type WarehouseConfiguration struct {
 | 
			
		|||
	Order                   WarehouseOrder    `json:"order"`
 | 
			
		||||
	Partner                 WarehousePartner  `json:"partner"`
 | 
			
		||||
	Delivery                WarehouseDelivery `json:"delivery"`
 | 
			
		||||
	Other                   WarehouseOther    `json:"other"`
 | 
			
		||||
	Food                    WarehouseFood     `json:"food"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WarehouseFood ...
 | 
			
		||||
type WarehouseFood struct {
 | 
			
		||||
	ForceClosed bool        `json:"forceClosed"`
 | 
			
		||||
	IsClosed    bool        `json:"isClosed"`
 | 
			
		||||
	TimeRange   []TimeRange `json:"timeRange"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TimeRange ...
 | 
			
		||||
type TimeRange struct {
 | 
			
		||||
	From int64 `json:"from"`
 | 
			
		||||
	To   int64 `json:"to"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WarehouseOther ...
 | 
			
		||||
type WarehouseOther struct {
 | 
			
		||||
	DoesSupportSellyExpress bool `json:"doesSupportSellyExpress"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WarehouseSupplier ...
 | 
			
		||||
| 
						 | 
				
			
			@ -122,8 +102,6 @@ type ResponseLatLng struct {
 | 
			
		|||
// WarehouseNatsResponse ...
 | 
			
		||||
type WarehouseNatsResponse struct {
 | 
			
		||||
	ID             string                    `json:"_id"`
 | 
			
		||||
	Staff          string                    `json:"staff"`
 | 
			
		||||
	BusinessType   string                    `json:"businessType"`
 | 
			
		||||
	Name           string                    `json:"name"`
 | 
			
		||||
	SearchString   string                    `json:"searchString"`
 | 
			
		||||
	Slug           string                    `json:"slug"`
 | 
			
		||||
| 
						 | 
				
			
			@ -135,30 +113,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"`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,17 +3,13 @@ package subject
 | 
			
		|||
var prefixes = struct {
 | 
			
		||||
	Communication string
 | 
			
		||||
	Order         string
 | 
			
		||||
	News          string
 | 
			
		||||
	Warehouse     string
 | 
			
		||||
	Location      string
 | 
			
		||||
	Supplier      string
 | 
			
		||||
	Seller        string
 | 
			
		||||
}{
 | 
			
		||||
	Communication: "communication",
 | 
			
		||||
	Order:         "order",
 | 
			
		||||
	News:          "news",
 | 
			
		||||
	Warehouse:     "warehouse",
 | 
			
		||||
	Location:      "location",
 | 
			
		||||
	Supplier:      "supplier",
 | 
			
		||||
	Seller:        "seller",
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,13 +7,7 @@ func getLocationValue(val string) string {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
var Location = struct {
 | 
			
		||||
	GetLocationByCode   string
 | 
			
		||||
	GetProvincesByCodes string
 | 
			
		||||
	GetDistrictsByCodes string
 | 
			
		||||
	GetWardsByCodes     string
 | 
			
		||||
	GetLocationByCode string
 | 
			
		||||
}{
 | 
			
		||||
	GetLocationByCode:   getLocationValue("get_location_warehouse"),
 | 
			
		||||
	GetProvincesByCodes: getLocationValue("get_provinces_by_codes"),
 | 
			
		||||
	GetDistrictsByCodes: getLocationValue("get_districts_by_codes"),
 | 
			
		||||
	GetWardsByCodes:     getLocationValue("get_wards_by_codes"),
 | 
			
		||||
	GetLocationByCode: getLocationValue("get_location_warehouse"),
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +0,0 @@
 | 
			
		|||
package subject
 | 
			
		||||
 | 
			
		||||
import "fmt"
 | 
			
		||||
 | 
			
		||||
func getNewsValue(val string) string {
 | 
			
		||||
	return fmt.Sprintf("%s.%s", prefixes.News, val)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var News = struct {
 | 
			
		||||
	GetProductNoticesByInventory string
 | 
			
		||||
}{
 | 
			
		||||
	GetProductNoticesByInventory: getNewsValue("get_product_notices_by_inventory"),
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -7,15 +7,11 @@ func getOrderValue(val string) string {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
var Order = struct {
 | 
			
		||||
	UpdateORStatus           string
 | 
			
		||||
	CancelDelivery           string
 | 
			
		||||
	ChangeDeliveryStatus     string
 | 
			
		||||
	UpdateLogisticInfoFailed string
 | 
			
		||||
	ORNotUpdateStatus        string
 | 
			
		||||
	UpdateORStatus       string
 | 
			
		||||
	CancelDelivery       string
 | 
			
		||||
	ChangeDeliveryStatus string
 | 
			
		||||
}{
 | 
			
		||||
	UpdateORStatus:           getOrderValue("update_outbound_request_status"),
 | 
			
		||||
	CancelDelivery:           getOrderValue("cancel_delivery"),
 | 
			
		||||
	ChangeDeliveryStatus:     getOrderValue("change_delivery_status"),
 | 
			
		||||
	UpdateLogisticInfoFailed: getOrderValue("update_logistic_info_failed"),
 | 
			
		||||
	ORNotUpdateStatus:        getOrderValue("outbound_request_not_update_status"),
 | 
			
		||||
	UpdateORStatus:       getOrderValue("update_outbound_request_status"),
 | 
			
		||||
	CancelDelivery:       getOrderValue("cancel_delivery"),
 | 
			
		||||
	ChangeDeliveryStatus: getOrderValue("change_delivery_status"),
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,23 +0,0 @@
 | 
			
		|||
package subject
 | 
			
		||||
 | 
			
		||||
import "fmt"
 | 
			
		||||
 | 
			
		||||
func getSellerValue(val string) string {
 | 
			
		||||
	return fmt.Sprintf("%s.%s", prefixes.Seller, val)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Seller ...
 | 
			
		||||
var Seller = struct {
 | 
			
		||||
	GetSellerInfoByID      string
 | 
			
		||||
	GetListSellerInfoByIDs string
 | 
			
		||||
}{
 | 
			
		||||
	GetSellerInfoByID:      getSellerValue("get_seller_info_by_id"),
 | 
			
		||||
	GetListSellerInfoByIDs: getSellerValue("get_list_seller_info_by_ids"),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SupportChat ...
 | 
			
		||||
var SupportChat = struct {
 | 
			
		||||
	GetListSellerInfoSupportChatByIDs string
 | 
			
		||||
}{
 | 
			
		||||
	GetListSellerInfoSupportChatByIDs: "SELLY_CHAT.REQUEST.SELLER_INFO",
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -18,13 +18,7 @@ var Warehouse = struct {
 | 
			
		|||
	FindByCondition               string
 | 
			
		||||
	Distinct                      string
 | 
			
		||||
	Count                         string
 | 
			
		||||
	AfterUpdateWarehouse          string
 | 
			
		||||
	AfterCreateWarehouse          string
 | 
			
		||||
	UpdateIsClosedSupplier        string
 | 
			
		||||
	GetWarehouses                 string
 | 
			
		||||
}{
 | 
			
		||||
	AfterCreateWarehouse:          getWarehouseValue("after_create_warehouse"),
 | 
			
		||||
	AfterUpdateWarehouse:          getWarehouseValue("after_update_warehouse"),
 | 
			
		||||
	CreateOutboundRequest:         getWarehouseValue("create_outbound_request"),
 | 
			
		||||
	UpdateOutboundRequestLogistic: getWarehouseValue("update_outbound_request_logistic_info"),
 | 
			
		||||
	CancelOutboundRequest:         getWarehouseValue("cancel_outbound_request"),
 | 
			
		||||
| 
						 | 
				
			
			@ -36,6 +30,4 @@ var Warehouse = struct {
 | 
			
		|||
	FindByCondition:               getWarehouseValue("find_all_by_condition"),
 | 
			
		||||
	Distinct:                      getWarehouseValue("distinct"),
 | 
			
		||||
	Count:                         getWarehouseValue("count"),
 | 
			
		||||
	UpdateIsClosedSupplier:        getWarehouseValue("update_is_closed_supplier"),
 | 
			
		||||
	GetWarehouses:                 getWarehouseValue("get_warehouses"),
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue