From 06c0b03df2955475fe39ff2a793a5f151f4da99f Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 17 八月 2023 19:25:30 +0800
Subject: [PATCH] Merge branch 'master' into fly
---
api/v1/serviceCollectionPlan.go | 2 +-
model/index.go | 1 +
docs/swagger.yaml | 4 ++++
docs/docs.go | 8 ++++++++
docs/swagger.json | 8 ++++++++
model/serviceCollectionPlan.go | 31 +++++++++++++++----------------
6 files changed, 37 insertions(+), 17 deletions(-)
diff --git a/api/v1/serviceCollectionPlan.go b/api/v1/serviceCollectionPlan.go
index 346aec8..2a7b060 100644
--- a/api/v1/serviceCollectionPlan.go
+++ b/api/v1/serviceCollectionPlan.go
@@ -31,7 +31,7 @@
if plan.SourceType == 0 ||
plan.SourceId == 0 ||
plan.CollectionType == 0 ||
- plan.CollectionDate.IsZero() ||
+ plan.CollectionDate == "" ||
plan.Amount.IsZero() ||
plan.Percent.IsZero() ||
plan.PrincipalId == 0 {
diff --git a/docs/docs.go b/docs/docs.go
index 1eecb37..b27e16a 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -12810,6 +12810,14 @@
"description": "鏈嶅姟鍚堝悓id",
"type": "integer"
},
+ "serviceMan": {
+ "description": "鏈嶅姟浜哄憳",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.User"
+ }
+ ]
+ },
"serviceManId": {
"description": "鏈嶅姟浜哄憳",
"type": "integer"
diff --git a/docs/swagger.json b/docs/swagger.json
index 5a1c7c1..2da091d 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -12798,6 +12798,14 @@
"description": "鏈嶅姟鍚堝悓id",
"type": "integer"
},
+ "serviceMan": {
+ "description": "鏈嶅姟浜哄憳",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.User"
+ }
+ ]
+ },
"serviceManId": {
"description": "鏈嶅姟浜哄憳",
"type": "integer"
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 2252a9b..d250e2d 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1833,6 +1833,10 @@
serviceContractId:
description: 鏈嶅姟鍚堝悓id
type: integer
+ serviceMan:
+ allOf:
+ - $ref: '#/definitions/model.User'
+ description: 鏈嶅姟浜哄憳
serviceManId:
description: 鏈嶅姟浜哄憳
type: integer
diff --git a/model/index.go b/model/index.go
index 8ea162c..a2f7c3a 100644
--- a/model/index.go
+++ b/model/index.go
@@ -87,6 +87,7 @@
ContactInformation{},
SalesReturn{},
SalesRefund{},
+ ServiceCollectionPlan{},
)
return err
}
diff --git a/model/serviceCollectionPlan.go b/model/serviceCollectionPlan.go
index cfe065c..cd72dee 100644
--- a/model/serviceCollectionPlan.go
+++ b/model/serviceCollectionPlan.go
@@ -7,28 +7,27 @@
"fmt"
"github.com/shopspring/decimal"
"gorm.io/gorm"
- "time"
)
type (
// ServiceCollectionPlan 鏀舵璁″垝
ServiceCollectionPlan struct {
Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
- CollectionType int `gorm:"collection_type" json:"collectionType"` // 绫诲瀷锛�1 璁″垝鏀舵鏃ユ湡 2 椤圭洰鐘舵�侊級
- SourceType constvar.CollectionSourceType `gorm:"source_type" json:"sourceType"` // 婧愬崟绫诲瀷锛�1閿�鍞槑缁�2鏈嶅姟鍚堝悓3閿�鍞彂绁級
- SourceId int `gorm:"source_id" json:"sourceId"` // 婧愬崟id
- PrincipalId int `gorm:"principal_id" json:"principalId"` // 鏀舵璐熻矗浜篒D
- Term int `gorm:"term" json:"term"` // 鏈熸
- Percent decimal.Decimal `gorm:"percent" json:"percent"` // 姣斾緥
- Amount decimal.Decimal `gorm:"amount" json:"amount"` // 閲戦
- MoneyType string `gorm:"money_type" json:"moneyType"` // 甯佺
- CollectionDate time.Time `gorm:"collection_date" json:"collectionDate"` // 璁″垝鏀舵鏃ユ湡
- Remark string `gorm:"remark" json:"remark"` // 澶囨敞
- Status constvar.CollectionStatus `gorm:"status" json:"status"` // 鐘舵�侊紙1鏈敹2閮ㄥ垎宸叉敹3宸叉敹锛�
- AmountReceivable decimal.Decimal `gorm:"column:amount_receivable;type:decimal(12,2);comment:搴旀敹閲戦" json:"amountReceivable"` // 搴旀敹閲戦
- AmountReceived decimal.Decimal `gorm:"column:amount_received;type:decimal(12,2);comment:宸叉敹閲戦" json:"amountReceived"` // 宸叉敹閲戦
- AmountTotal decimal.Decimal `gorm:"column:amount_total;type:decimal(12,2);comment:鎬婚" json:"amountTotal"` // 鎬婚
- FileId int `gorm:"file_id" json:"fileId"` // 闄勪欢id
+ CollectionType int `gorm:"column:collection_type;type:tinyint;not null;default 0;comment:绫诲瀷锛�1 璁″垝鏀舵鏃ユ湡 2 椤圭洰鐘舵�侊級" json:"collectionType"` // 绫诲瀷锛�1 璁″垝鏀舵鏃ユ湡 2 椤圭洰鐘舵�侊級
+ SourceType constvar.CollectionSourceType `gorm:"column:source_type;type:tinyint;not null;default 0;comment:婧愬崟绫诲瀷锛�1閿�鍞槑缁�2鏈嶅姟鍚堝悓3閿�鍞彂绁級" json:"sourceType"` // 婧愬崟绫诲瀷锛�1閿�鍞槑缁�2鏈嶅姟鍚堝悓3閿�鍞彂绁級
+ SourceId int `gorm:"column:source_id;type:int;not null;default 0;comment:婧愬崟id" json:"sourceId"` // 婧愬崟id
+ PrincipalId int `gorm:"column:principal_id;type:int;not null;default 0;comment:鏀舵璐熻矗浜篒D" json:"principalId"` // 鏀舵璐熻矗浜篒D
+ Term int `gorm:"column:term;type:tinyint;not null;default 0;comment:鏈熸" json:"term"` // 鏈熸
+ Percent decimal.Decimal `gorm:"column:percent;type:decimal(5,2);not null;default 0.00;comment:鏀舵姣斾緥" gorm:"" json:"percent"` // 姣斾緥
+ Amount decimal.Decimal `gorm:"column:amount;type:decimal(12,2);not null;default '0.00';comment:閲戦" gorm:"" json:"amount"` // 閲戦
+ MoneyType string `gorm:"column:money_type;type:varchar(255);not null;default '';comment:甯佺" json:"moneyType"` // 甯佺
+ CollectionDate string `gorm:"column:collection_date;type:varchar(255);not null;default '';comment:璁″垝鏀舵鏃ユ湡" json:"collectionDate"` // 璁″垝鏀舵鏃ユ湡
+ Remark string `gorm:"column:remark;type:varchar(512);not null;default '';comment:澶囨敞" json:"remark"` // 澶囨敞
+ Status constvar.CollectionStatus `gorm:"column:status;type:tinyint;not null;default '';comment:鐘舵�侊紙1鏈敹2閮ㄥ垎宸叉敹3宸叉敹锛�" json:"status"` // 鐘舵�侊紙1鏈敹2閮ㄥ垎宸叉敹3宸叉敹锛�
+ AmountReceivable decimal.Decimal `gorm:"column:amount_receivable;type:decimal(12,2);comment:搴旀敹閲戦" json:"amountReceivable"` // 搴旀敹閲戦
+ AmountReceived decimal.Decimal `gorm:"column:amount_received;type:decimal(12,2);comment:宸叉敹閲戦" json:"amountReceived"` // 宸叉敹閲戦
+ AmountTotal decimal.Decimal `gorm:"column:amount_total;type:decimal(12,2);comment:鎬婚" json:"amountTotal"` // 鎬婚
+ FileId int `gorm:"column:file_id;type:int;comment:闄勪欢id" json:"fileId"` // 闄勪欢id
}
// ServiceCollectionPlanSearch 鏀舵璁″垝鎼滅储鏉′欢
--
Gitblit v1.8.0