package gmodel

import (
	"gorm.io/gorm"
)

// fs_factory_product 工厂生产表(废弃)
type FsFactoryProduct struct {
	Id                    int64   `gorm:"primary_key;default:0;auto_increment;" json:"id"`   //
	FactoryId             *int64  `gorm:"index;default:0;" json:"factory_id"`                // 工厂id
	OrderId               *int64  `gorm:"index;default:0;" json:"order_id"`                  // 订单id
	OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 产品模板sn
	Num                   *int64  `gorm:"default:0;" json:"num"`                             // 数量
	IsProduct             *int64  `gorm:"default:0;" json:"is_product"`                      // 是否开始生产( 0:未开始 ,1:已开始)
	IsEnd                 *int64  `gorm:"default:0;" json:"is_end"`                          // 是否完成(0:未完成,1:已完成)
	IsDeliver             *int64  `gorm:"default:0;" json:"is_deliver"`                      // 是否已发货(0:未发货,1:已发货)
	Ctime                 *int64  `gorm:"default:0;" json:"ctime"`                           // 创建时间
}
type FsFactoryProductModel struct {
	db   *gorm.DB
	name string
}

func NewFsFactoryProductModel(db *gorm.DB) *FsFactoryProductModel {
	return &FsFactoryProductModel{db: db, name: "fs_factory_product"}
}