model

package
v0.0.0-...-8851dd1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	CategoryID       int    `json:"category_id"`
	CategoryName     string `json:"category_name"`
	ParentCategoryID int    `json:"parent_category_id"`
	Active           bool   `json:"active"`
}

func TestCategory

func TestCategory(t *testing.T) *Category

func (*Category) ValidateCategory

func (c *Category) ValidateCategory() error

type Currency

type Currency struct {
	CurrencyID   int
	CurrencyName string
	CurrencyCode string
}

type MarketPlace

type MarketPlace struct {
	MarketPlaceID   int
	MarketPlaceName string
	Active          bool
}

type MarketPlaceItem

type MarketPlaceItem struct {
	MarketPlaceItemID int
	ProductID         int
	ItemName          string
	MarketPlaceID     int
	SKU               int
	UserID            int
	Active            bool
}

func TestMarketPlaceItem

func TestMarketPlaceItem(t *testing.T) *MarketPlaceItem

func (*MarketPlaceItem) ValidateMarketPlaceItem

func (mpi *MarketPlaceItem) ValidateMarketPlaceItem() error

type MarketPlaceItemsList

type MarketPlaceItemsList struct {
	MPIList []*MarketPlaceItem
}

func (*MarketPlaceItemsList) GetMPIList

func (mpil *MarketPlaceItemsList) GetMPIList(p *Product)

func (*MarketPlaceItemsList) UpdateMPIList

func (mpil *MarketPlaceItemsList) UpdateMPIList(p *Product)

func (*MarketPlaceItemsList) ValidateMarketPlaceItems

func (mpi *MarketPlaceItemsList) ValidateMarketPlaceItems() error

type Material

type Material struct {
	MaterialID   int    `json:"material_id"`
	MaterialName string `json:"material_name"`
	Active       bool   `json:"active"`
}

func TestMaterial

func TestMaterial(t *testing.T) *Material

func (*Material) ValidateMaterial

func (m *Material) ValidateMaterial() error

type Payment

type Payment struct {
	PaymentID       int
	PaymentDate     time.Time
	PaymentAmount   float32
	CurrencyID      int
	SupplierID      int
	SupplyOrderID   int
	PaymentStatusID int
	Active          bool
}

type PaymentAudit

type PaymentAudit struct {
	PaymentAuditID   int
	PaymentID        int
	PaymentAuditDate time.Time
	PaymentStatusID  int
	AuditUserID      int
	Active           bool
}

type PaymentStatus

type PaymentStatus struct {
	PaymentStatusID    int
	PaymentStatus_Name string
}

type Product

type Product struct {
	ProductID      int     `json:"product_id"`
	ProductName    string  `json:"product_name"`
	CategoryID     int     `json:"category_id"`
	PiecesInPack   int     `json:"pieces_in_pack"`
	MaterialID     int     `json:"material_id"`
	Weight         float32 `json:"weight"`
	Lenght         float32 `json:"lenght"`
	Width          float32 `json:"width"`
	Height         float32 `json:"height"`
	Description    string  `json:"description"`
	UserID         int     `json:"user_id"`
	Active         bool    `json:"-"`
	WildberriesSKU int     `json:"wildberries_sku"`
	OzonSKU        int     `json:"ozon_sku"`
}

func TestProduct

func TestProduct(t *testing.T) *Product

func TestProductWOSKU

func TestProductWOSKU(t *testing.T) *Product

func (*Product) Validate

func (p *Product) Validate() error

type Supplier

type Supplier struct {
	SupplierID            int
	SupplierName          string
	SupplierAddress       string
	SupplierCountryID     int
	SupplierSWIFT         string
	SupplierAccountNumber int
	Active                bool
}

type SupplyOrder

type SupplyOrder struct {
	SupplyOrderID          int
	OrderDate              time.Time
	SupplierID             int
	ShippingCostToLogistic float32
	ShippingCostByLogistic float32
	Active                 bool
}

type SupplyOrderAudit

type SupplyOrderAudit struct {
	SupplyOrderAuditID   int
	SupplyOrderID        int
	SupplyOrderAuditDate time.Time
	SupplyOrderStatusID  int
	AuditUserID          int
	Active               bool
}

type SupplyOrderPayment

type SupplyOrderPayment struct {
	SupplyOrderPaymentID int
	SupplyOrderID        int
	PaymentID            int
}

type SupplyOrderProduct

type SupplyOrderProduct struct {
	SupplyOrderProductID int
	SupplyOrderID        int
	ProductID            int
	Quantity             float32
	UnitPrice            float32
	CurrencyID           int
}

type SupplyOrderStatus

type SupplyOrderStatus struct {
	SupplyOrderStatusID   int
	SupplyOrderStatusName string
}

type User

type User struct {
	ID                int    `json:"id"`
	Email             string `json:"email"`
	Password          string `json:"password,omitempty"`
	EncryptedPassword string `json:"-"`
	UserRole          int    `json:"userrole"`
	Active            bool   `json:"active"`
}

User

func TestAdminUser

func TestAdminUser(t *testing.T) *User

func TestUser

func TestUser(t *testing.T) *User

func (*User) ComparePassword

func (u *User) ComparePassword(password string) bool

func (*User) EncryptPasswordBeforeCreate

func (u *User) EncryptPasswordBeforeCreate() error

func (*User) Sanitize

func (u *User) Sanitize()

func (*User) Validate

func (u *User) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL