product_group_selector.go 679 字节
package dto

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

// 生产班组
type ProductGroupSelectorDto struct {
	// 生产小组ID
	ProductGroupId int `json:"productGroupId,omitempty"`
	// 班组名称
	GroupName string `json:"groupName,omitempty"`
	// 班组长
	GroupLeader *domain.User `json:"groupLeader"`
	// 帮组成员列表
	GroupMembers []*domain.User `json:"groupMembers"`
}

func (d *ProductGroupSelectorDto) LoadDto(m *domain.ProductGroup, orgId int) *ProductGroupSelectorDto {
	d.ProductGroupId = m.ProductGroupId
	d.GroupName = m.GroupName
	d.GroupLeader = m.GroupLeader
	d.GroupMembers = m.GroupMembers
	return d
}