package gmodel

import (
	"gorm.io/gorm"
)

// fs_quotation 报价单信息表
type FsQuotation struct {
	Id          int64   `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
	CanteenName *string `gorm:"index;default:'';" json:"canteen_name"`           // 餐厅名
	CanteenType *int64  `gorm:"index;default:0;" json:"canteen_type"`            // 餐厅类别id
	SalerId     *int64  `gorm:"index;default:0;" json:"saler_id"`                // 业务员id
	Cover       *string `gorm:"default:'';" json:"cover"`                        // 合集图
	PageNum     *int64  `gorm:"default:0;" json:"page_num"`                      // 页数
	ProductNum  *int64  `gorm:"default:0;" json:"product_num"`                   // 产品数量
	GiftNum     *int64  `gorm:"default:0;" json:"gift_num"`                      // 赠品数
	Status      *int64  `gorm:"default:0;" json:"status"`                        // 状态位 0停用 1待设计 2设计中 3待报价 4报价中 5完成
	Ctime       *int64  `gorm:"default:0;" json:"ctime"`                         // 添加时间
	DesignId    *int64  `gorm:"default:0;" json:"design_id"`                     // 设计人员
	QuotationId *int64  `gorm:"default:0;" json:"quotation_id"`                  // 报价人员
	IsMark      *int64  `gorm:"default:0;" json:"is_mark"`                       // 星标
	Qid         *int64  `gorm:"default:0;" json:"qid"`                           //
}
type FsQuotationModel struct {
	db   *gorm.DB
	name string
}

func NewFsQuotationModel(db *gorm.DB) *FsQuotationModel {
	return &FsQuotationModel{db: db, name: "fs_quotation"}
}