workshop.go 884 字节
package models

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
	"time"
)

type Workshop struct {
	tableName string `comment:"车间" pg:"manufacture.workshop,alias:workshop"`
	// 企业id
	CompanyId int `comment:"企业id"`
	// 组织ID
	OrgId int `comment:"组织ID"`
	// 车间ID
	WorkshopId int `comment:"车间ID" pg:"pk:workshop_id"`
	// 车间名称
	WorkshopName string `comment:"车间名称"`
	// 负责人 (用户对象)
	Principal *domain.User `comment:"负责人 (用户对象)"`
	// 生产线
	ProductLines []*domain.ProductLine `comment:"生产线" `
	// 创建时间
	CreatedAt time.Time `comment:"创建时间"`
	// 更新时间
	UpdatedAt time.Time `comment:"更新时间"`
	// 删除时间
	DeletedAt time.Time `pg:",soft_delete" comment:"删除时间"`
	// 扩展数据
	Ext *domain.Ext `comment:"扩展数据"`
}