// Code generated by gormcol. DO NOT EDIT.

package dbmodel

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

const TableNamePsMessage = "ps_message"

// PsMessage mapped from table <ps_message>
type PsMessage struct {
	IDMessage  int32     `gorm:"column:id_message;primaryKey;autoIncrement:true" json:"id_message"`
	IDCart     *int32    `gorm:"column:id_cart;index:id_cart,priority:1" json:"id_cart"`
	IDCustomer int32     `gorm:"column:id_customer;not null;index:id_customer,priority:1" json:"id_customer"`
	IDEmployee *int32    `gorm:"column:id_employee;index:id_employee,priority:1" json:"id_employee"`
	IDOrder    int32     `gorm:"column:id_order;not null;index:message_order,priority:1" json:"id_order"`
	Message    string    `gorm:"column:message;not null" json:"message"`
	Private    bool      `gorm:"column:private;not null;default:1" json:"private"`
	DateAdd    time.Time `gorm:"column:date_add;not null" json:"date_add"`
}

// TableName PsMessage's table name
func (*PsMessage) TableName() string {
	return TableNamePsMessage
}

var PsMessageCols = struct {
	IDMessage gormcol.Field
	IDCart gormcol.Field
	IDCustomer gormcol.Field
	IDEmployee gormcol.Field
	IDOrder gormcol.Field
	Message gormcol.Field
	Private gormcol.Field
	DateAdd gormcol.Field
}{
	IDMessage: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_message"),
	IDCart: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_cart"),
	IDCustomer: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_customer"),
	IDEmployee: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_employee"),
	IDOrder: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_order"),
	Message: gormcol.Field{}.Set((&PsMessage{}).TableName(), "message"),
	Private: gormcol.Field{}.Set((&PsMessage{}).TableName(), "private"),
	DateAdd: gormcol.Field{}.Set((&PsMessage{}).TableName(), "date_add"),
}
