// Code generated by gormcol. DO NOT EDIT.

package dbmodel

import (
	"git.ma-al.com/goc_marek/gormcol"
	"time"
)

const TableNamePsSupplyOrder = "ps_supply_order"

// PsSupplyOrder mapped from table <ps_supply_order>
type PsSupplyOrder struct {
	IDSupplyOrder        int32      `gorm:"column:id_supply_order;primaryKey;autoIncrement:true" json:"id_supply_order"`
	IDSupplier           int32      `gorm:"column:id_supplier;not null;index:id_supplier,priority:1" json:"id_supplier"`
	SupplierName         string     `gorm:"column:supplier_name;not null" json:"supplier_name"`
	IDLang               int32      `gorm:"column:id_lang;not null" json:"id_lang"`
	IDWarehouse          int32      `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"`
	IDSupplyOrderState   int32      `gorm:"column:id_supply_order_state;not null" json:"id_supply_order_state"`
	IDCurrency           int32      `gorm:"column:id_currency;not null" json:"id_currency"`
	IDRefCurrency        int32      `gorm:"column:id_ref_currency;not null" json:"id_ref_currency"`
	Reference            string     `gorm:"column:reference;not null;index:reference,priority:1" json:"reference"`
	DateAdd              time.Time  `gorm:"column:date_add;not null" json:"date_add"`
	DateUpd              time.Time  `gorm:"column:date_upd;not null" json:"date_upd"`
	DateDeliveryExpected *time.Time `gorm:"column:date_delivery_expected" json:"date_delivery_expected"`
	TotalTe              *float64   `gorm:"column:total_te;default:0.000000" json:"total_te"`
	TotalWithDiscountTe  *float64   `gorm:"column:total_with_discount_te;default:0.000000" json:"total_with_discount_te"`
	TotalTax             *float64   `gorm:"column:total_tax;default:0.000000" json:"total_tax"`
	TotalTi              *float64   `gorm:"column:total_ti;default:0.000000" json:"total_ti"`
	DiscountRate         *float64   `gorm:"column:discount_rate;default:0.000000" json:"discount_rate"`
	DiscountValueTe      *float64   `gorm:"column:discount_value_te;default:0.000000" json:"discount_value_te"`
	IsTemplate           *bool      `gorm:"column:is_template" json:"is_template"`
}

// TableName PsSupplyOrder's table name
func (*PsSupplyOrder) TableName() string {
	return TableNamePsSupplyOrder
}

var PsSupplyOrderCols = struct {
	IDSupplyOrder gormcol.Field
	IDSupplier gormcol.Field
	SupplierName gormcol.Field
	IDLang gormcol.Field
	IDWarehouse gormcol.Field
	IDSupplyOrderState gormcol.Field
	IDCurrency gormcol.Field
	IDRefCurrency gormcol.Field
	Reference gormcol.Field
	DateAdd gormcol.Field
	DateUpd gormcol.Field
	DateDeliveryExpected gormcol.Field
	TotalTe gormcol.Field
	TotalWithDiscountTe gormcol.Field
	TotalTax gormcol.Field
	TotalTi gormcol.Field
	DiscountRate gormcol.Field
	DiscountValueTe gormcol.Field
	IsTemplate gormcol.Field
}{
	IDSupplyOrder: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_supply_order"),
	IDSupplier: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_supplier"),
	SupplierName: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "supplier_name"),
	IDLang: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_lang"),
	IDWarehouse: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_warehouse"),
	IDSupplyOrderState: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_supply_order_state"),
	IDCurrency: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_currency"),
	IDRefCurrency: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_ref_currency"),
	Reference: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "reference"),
	DateAdd: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "date_add"),
	DateUpd: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "date_upd"),
	DateDeliveryExpected: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "date_delivery_expected"),
	TotalTe: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_te"),
	TotalWithDiscountTe: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_with_discount_te"),
	TotalTax: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_tax"),
	TotalTi: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_ti"),
	DiscountRate: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "discount_rate"),
	DiscountValueTe: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "discount_value_te"),
	IsTemplate: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "is_template"),
}
