From 5bc036d71ff6094e550c99168eae2e2b4d495f51 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 13 九月 2023 21:10:26 +0800
Subject: [PATCH] 增加位置表,产品分类表,产品表

---
 constvar/const.go |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/constvar/const.go b/constvar/const.go
index 9a4e5c9..dff496d 100644
--- a/constvar/const.go
+++ b/constvar/const.go
@@ -41,3 +41,89 @@
 		slf == WhetherTypeAlways ||
 		slf == ReservationNever
 }
+
+// ProductType 浜у搧绫诲瀷
+type ProductType int
+
+const (
+	ProductTypeRaw      = iota + 1 // 鍘熸潗鏂�
+	ProductTypeSemi                // 鍗婃垚鍝�
+	ProductTypeFinished            // 鎴愬搧
+)
+
+type ProductStatus int
+
+const (
+	ProductStatusCreate   ProductStatus = iota // 鏂板缓
+	ProductStatusActive                        // 鍚敤
+	ProductStatusInactive = -1                 // 鍋滅敤
+)
+
+// PurchaseType 閲囪喘绫诲瀷
+type PurchaseType int
+
+const (
+	PurchaseTypeOutSource PurchaseType = iota + 1 // 閲囪喘
+	PurchaseTypeSelf                              // 鑷埗
+	PurchaseTypeEntrust                           // 濮斿
+)
+
+func (t PurchaseType) Valid() bool {
+	if t < PurchaseTypeOutSource ||
+		t > PurchaseTypeEntrust {
+		return false
+	}
+	return true
+}
+
+// LocationType 浣嶇疆绫诲瀷
+type LocationType int
+
+const (
+	LocationTypeVendor        LocationType = iota + 1 // 渚涘簲鍟嗕綅缃�
+	LocationTypeView                                  // 瑙嗗浘
+	LocationTypeInternal                              // 鍐呴儴浣嶇疆
+	LocationTypeCustomer                              // 瀹㈡埛浣嶇疆
+	LocationTypeInventoryLoss                         // 搴撳瓨鎹熷け
+	LocationTypeProduction                            // 鐢熶骇
+	LocationTypeTransit                               // 涓浆浣嶇疆
+)
+
+func (t LocationType) Valid() bool {
+	return t >= LocationTypeVendor && t <= LocationTypeTransit
+}
+
+type ForceRemovalStrategy int
+
+const (
+	ForceRemovalStrategyFIFO ForceRemovalStrategy = iota + 1
+	ForceRemovalStrategyLIFO
+	ForceRemovalStrategyClosestLocation
+)
+
+func (t ForceRemovalStrategy) Valid() bool {
+	return t >= ForceRemovalStrategyFIFO && t <= ForceRemovalStrategyClosestLocation
+}
+
+type CostingMethod int
+
+const (
+	CostingMethodStandardPrice CostingMethod = iota + 1 //鏍囧噯浠锋牸
+	CostingMethodFIFO                                   //鍏堣繘鍏堝嚭
+	CostingMethodAverageCost                            //
+)
+
+func (t CostingMethod) Valid() bool {
+	return t >= CostingMethodStandardPrice && t <= CostingMethodAverageCost
+}
+
+type InventoryValuation int
+
+const (
+	InventoryValuationManual InventoryValuation = iota + 1 //鎵嬪姩
+	InventoryValuationAuto                                 //鑷姩
+)
+
+func (t InventoryValuation) Valid() bool {
+	return t >= InventoryValuationManual && t <= InventoryValuationAuto
+}

--
Gitblit v1.8.0