// Code generated by gormcol. DO NOT EDIT.

package dbmodel

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

const TableNamePsSpecificPriceRule = "ps_specific_price_rule"

// PsSpecificPriceRule mapped from table <ps_specific_price_rule>
type PsSpecificPriceRule struct {
	IDSpecificPriceRule int32     `gorm:"column:id_specific_price_rule;primaryKey;autoIncrement:true" json:"id_specific_price_rule"`
	Name                string    `gorm:"column:name;not null" json:"name"`
	IDShop              int32     `gorm:"column:id_shop;not null;index:id_product,priority:1;default:1" json:"id_shop"`
	IDCurrency          int32     `gorm:"column:id_currency;not null;index:id_product,priority:2" json:"id_currency"`
	IDCountry           int32     `gorm:"column:id_country;not null;index:id_product,priority:3" json:"id_country"`
	IDGroup             int32     `gorm:"column:id_group;not null;index:id_product,priority:4" json:"id_group"`
	FromQuantity        int32     `gorm:"column:from_quantity;not null;index:id_product,priority:5" json:"from_quantity"`
	Price               *float64  `gorm:"column:price" json:"price"`
	Reduction           float64   `gorm:"column:reduction;not null" json:"reduction"`
	ReductionTax        bool      `gorm:"column:reduction_tax;not null;default:1" json:"reduction_tax"`
	ReductionType       string    `gorm:"column:reduction_type;not null" json:"reduction_type"`
	From                time.Time `gorm:"column:from;not null;index:id_product,priority:6" json:"from"`
	To                  time.Time `gorm:"column:to;not null;index:id_product,priority:7" json:"to"`
}

// TableName PsSpecificPriceRule's table name
func (*PsSpecificPriceRule) TableName() string {
	return TableNamePsSpecificPriceRule
}

var PsSpecificPriceRuleCols = struct {
	IDSpecificPriceRule gormcol.Field
	Name gormcol.Field
	IDShop gormcol.Field
	IDCurrency gormcol.Field
	IDCountry gormcol.Field
	IDGroup gormcol.Field
	FromQuantity gormcol.Field
	Price gormcol.Field
	Reduction gormcol.Field
	ReductionTax gormcol.Field
	ReductionType gormcol.Field
	From gormcol.Field
	To gormcol.Field
}{
	IDSpecificPriceRule: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_specific_price_rule"),
	Name: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "name"),
	IDShop: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_shop"),
	IDCurrency: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_currency"),
	IDCountry: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_country"),
	IDGroup: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_group"),
	FromQuantity: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "from_quantity"),
	Price: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "price"),
	Reduction: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "reduction"),
	ReductionTax: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "reduction_tax"),
	ReductionType: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "reduction_type"),
	From: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "from"),
	To: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "to"),
}
