material_group_k3cloud.go 836 字节
package models

//MaterialGroupK3cloud 采集自金蝶k3cloud物料分组数据
type MaterialGroupK3cloud struct {
	tableName   string `comment:"采集自金蝶k3cloud物料数据" pg:"manufacture.material_group_k3cloud,alias:material_group_k3cloud"`
	Id          int    `pg:",pk"`
	Number      string `comment:"分组编码" pg:"number"`
	Name        string `comment:"分组名称" pg:"name"`
	ParentId    int    `comment:"父级id" pg:"parent_id"`
	DataVersion int64  `comment:"数据版本" pg:"data_version"`
}

type MaterialGroupK3clouds []*MaterialGroupK3cloud

func (materialGroupK3clouds MaterialGroupK3clouds) ToMapId() map[int]*MaterialGroupK3cloud {
	var result = make(map[int]*MaterialGroupK3cloud)
	for i := range materialGroupK3clouds {
		result[materialGroupK3clouds[i].Id] = materialGroupK3clouds[i]
	}
	return result
}