table_info.go
543 字节
package domain
type TableInfo struct {
// 应用于模块 1:数控中心 2:拆解模块 4:计算模块
ApplyOnModule int `json:"module"`
// 依赖关联的表
DependencyTables []int `json:"dependencyTables"`
}
func (t *TableInfo) SetApplyOn(applyOn int) *TableInfo {
t.ApplyOnModule = applyOn
return t
}
func (t *TableInfo) SetDependencyTables(tableIds []int) *TableInfo {
t.DependencyTables = tableIds
return t
}
func NewTableInfo() *TableInfo {
return &TableInfo{
ApplyOnModule: 0,
DependencyTables: make([]int, 0),
}
}