caipin 4 rokov pred
rodič
commit
a293157bb6
3 zmenil súbory, kde vykonal 20 pridanie a 28 odobranie
  1. 6 6
      models/cm_contracts.go
  2. 1 1
      models/cm_tree.go
  3. 13 21
      models/cm_tree_contracts.go

+ 6 - 6
models/cm_contracts.go

@@ -7,7 +7,7 @@ import (
 type CmContracts struct {
 	Id            int       `xorm:"not null pk autoincr comment('自增ID') INT(11)"`
 	TreeId        int       `xorm:"not null default 0 comment('树ID') INT(11)"`
-	ContractsType int       `xorm:"not null default 1 comment('合同类型(1收入2支出)') TINYINT(1)"`
+	ContractsType int       `xorm:"not null default 1 comment('合同类型(1收入2支出) 1') TINYINT(1)"`
 	ProjectId     int       `xorm:"not null default 0 comment('项目ID') INT(11)"`
 	BidsectionId  int       `xorm:"default 0 comment('标段ID') INT(11)"`
 	Name          string    `xorm:"not null comment('合同名称') VARCHAR(64)"`
@@ -19,11 +19,11 @@ type CmContracts struct {
 	PartyBSigner  string    `xorm:"comment('乙方签约人') VARCHAR(32)"`
 	SignerTime    time.Time `xorm:"comment('签约日期') DATETIME"`
 	Remarks       string    `xorm:"comment('备注') VARCHAR(1024)"`
-	Price         string    `xorm:"not null default 0.00 comment('合同金额') DECIMAL(12,2)"`
-	Returned      string    `xorm:"not null default 0.00 comment('回款总金额') DECIMAL(12,2)"`
-	Paid          string    `xorm:"not null default 0.00 comment('合同已支付总金额') DECIMAL(12,2)"`
-	Status        int       `xorm:"not null default 0 comment('合同状态(0履行中1待关闭2已关闭)') TINYINT(1)"`
-	Locking       int       `xorm:"not null default 0 comment('锁定(0未锁定1锁定)') TINYINT(1)"`
+	Price         string    `xorm:"not null default 0.00 comment('合同金额 0') DECIMAL(12,2)"`
+	Returned      string    `xorm:"not null default 0.00 comment('回款总金额 0') DECIMAL(12,2)"`
+	Paid          string    `xorm:"not null default 0.00 comment('合同已支付总金额 0') DECIMAL(12,2)"`
+	Status        int       `xorm:"not null default 0 comment('合同状态(0履行中1待关闭2已关闭) 0') TINYINT(1)"`
+	Locking       int       `xorm:"not null default 0 comment('锁定(0未锁定1锁定) 0') TINYINT(1)"`
 	CreateTime    time.Time `xorm:"comment('创建时间') DATETIME"`
 	UpdateTime    time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
 }

+ 1 - 1
models/cm_tree.go

@@ -12,7 +12,7 @@ type CmTree struct {
 	Serial                     int       `xorm:"not null default 0 comment('序号') TINYINT(4)"`
 	Attribution                string    `xorm:"comment('归属') VARCHAR(32)"`
 	Sort                       int       `xorm:"not null default 0 comment('排序') TINYINT(4)"`
-	Isfolder                   int       `xorm:"not null default 1 comment('是否文件夹 1文件夹 0其他') TINYINT(1)"`
+	Isfolder                   int       `xorm:"not null default 1 comment('是否文件夹 1文件夹 0其他 1文件夹0其他') TINYINT(1)"`
 	BidsectionId               int       `xorm:"comment('标段ID') INT(11)"`
 	ParentId                   int       `xorm:"not null default 0 comment('父级ID') INT(11)"`
 	Accounts                   int       `xorm:"not null default 0 comment('账号数') TINYINT(4)"`

+ 13 - 21
models/cm_tree_contracts.go

@@ -5,25 +5,17 @@ import (
 )
 
 type CmTreeContracts struct {
-	Id           int    `xorm:"not null pk autoincr comment('自增ID') INT(11)"`
-	TreeType     int    `xorm:"not null default 0 comment('项目节类型(0收入,1支出)') TINYINT(1)"`
-	TreeId       int    `xorm:"not null comment('树ID') INT(11)"`
-	ParentId     int    `xorm:"not null default 0 comment('父级ID') INT(11)"`
-	Name         string `xorm:"not null comment('名称') VARCHAR(64)"`
-	Code         string `xorm:"comment('项目节编号') VARCHAR(32)"`
-	Depth        int    `xorm:"not null default 0 comment('深度') TINYINT(4)"`
-	Serial       int    `xorm:"not null default 0 comment('序号') INT(11)"`
-	Attribution  string `xorm:"comment('归属') VARCHAR(32)"`
-	Sort         int    `xorm:"not null default 0 comment('排序') TINYINT(4)"`
-	ProjectId    int    `xorm:"not null default 0 comment('项目ID') INT(11)"`
-	BidsectionId int    `xorm:"comment('标段ID') INT(11)"`
-	ContractId   int    `xorm:"not null default 0 comment('合同ID') INT(11)"`
-	ContractName string `xorm:"comment('合同名称') VARCHAR(64)"`
-	// ContractCode     string    `xorm:"comment('合同编号') VARCHAR(32)"`
-	// ContractPrice    string    `xorm:"not null default 0.00 comment('合同金额') DECIMAL(12,2)"`
-	// ContractReturned string    `xorm:"not null default 0.00 comment('回款金额') DECIMAL(12,2)"`
-	// ContractsPaid    string    `xorm:"not null default 0.00 comment('合同已支付金额') DECIMAL(12,2)"`
-	// ContractStatus   int       `xorm:"not null default 0 comment('合同状态(0履行中1待关闭2正常关闭)') TINYINT(1)"`
-	// ContractLocking  int       `xorm:"not null default 0 comment('合同锁定(0未锁定1锁定)') TINYINT(1)"`
-	CreateTime time.Time `xorm:"comment('创建时间') DATETIME"`
+	Id           int       `xorm:"not null pk comment('自增ID') INT(11)"`
+	TreeId       int       `xorm:"not null comment('树ID') INT(11)"`
+	ParentId     int       `xorm:"not null comment('父级ID') INT(11)"`
+	Name         string    `xorm:"not null comment('名称') VARCHAR(64)"`
+	Code         string    `xorm:"comment('项目节编号') VARCHAR(32)"`
+	Depth        int       `xorm:"not null comment('深度') TINYINT(4)"`
+	Serial       int       `xorm:"not null comment('序号') INT(11)"`
+	Attribution  string    `xorm:"comment('归属') VARCHAR(32)"`
+	Sort         int       `xorm:"not null comment('排序') TINYINT(4)"`
+	ContractId   int       `xorm:"not null comment('合同ID') INT(11)"`
+	ContractName string    `xorm:"comment('合同名称') VARCHAR(64)"`
+	ContractCode string    `xorm:"comment('合同编号') VARCHAR(32)"`
+	CreateTime   time.Time `xorm:"comment('创建时间') DATETIME"`
 }