From 3369456ac6de01e8703a9b38537406ec7c550bc5 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期五, 25 八月 2023 11:05:45 +0800
Subject: [PATCH] fix
---
model/serviceCollectionPlan.go | 31 +++++++++++++++----------------
1 files changed, 15 insertions(+), 16 deletions(-)
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