lishihai
2024-07-03 91d7ca06128f996844aa7d2d691d083c944bdf1d
constvar/const.go
@@ -327,10 +327,16 @@
type MiniDictType int
const (
   StorageType  MiniDictType = iota + 1 // 入库类型
   StockoutType                         // 出库类型
   TransferType                         // 调拨类型
   TakeStock                            // 盘点类型
   StorageType   MiniDictType = iota + 1 // 入库类型
   StockoutType                          // 出库类型
   TransferType                          // 调拨类型
   TakeStockType                         // 盘点类型
   DisuseType                            // 报废类型
)
const (
   InputTotalHeader  string = "入库合计"
   OutPutTotalHeader string = "出库合计"
)
func (t MiniDictType) Valid() bool {
@@ -339,3 +345,19 @@
   }
   return true
}
// BoolType 布尔类型
type BoolType int
const (
   BoolTypeTrue  BoolType = 1 // true
   BoolTypeFalse BoolType = 2 // false
)
func (slf BoolType) IsValid() bool {
   return slf == BoolTypeTrue || slf == BoolTypeFalse
}
func (slf BoolType) Bool() bool {
   return slf == BoolTypeTrue
}