product_section.go 684 字节
package domain

// 工段
type ProductSection struct {
	// 工段ID
	SectionId int `json:"sectionId,omitempty"`
	// 工段名称
	SectionName string `json:"sectionName,omitempty"`
	// 已删除标识 1:正常 2:已删除
	Removed int `json:"removed,omitempty"`
}

func (m *ProductSection) CloneSample() *ProductSection {
	return &ProductSection{
		SectionId:   m.SectionId,
		SectionName: m.SectionName,
	}
}

type ProductSections []*ProductSection

func (ms ProductSections) Len() int           { return len(ms) }
func (ms ProductSections) Less(i, j int) bool { return ms[i].SectionId < ms[j].SectionId }
func (ms ProductSections) Swap(i, j int)      { ms[i], ms[j] = ms[j], ms[i] }