zhangqian
2023-08-13 6e87a1f6795af50133b10fa853fd6c2d14bb698c
model/receipt.go
@@ -17,13 +17,16 @@
      SourceType    constvar.ReceiptSourceType `gorm:"column:source_type;type:int;not null;default 0;comment:来源类型(1销售明细单2服务合同3销售发票4收款计划5出库单)" json:"sourceType"` // 来源类型(1销售明细单2服务合同3销售发票4收款计划5出库单)
      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:负责人id" json:"principalId"`                         // 负责人id
      Principal     User                       `gorm:"foreignKey:PrincipalId" json:"principal"`                                                                  // 负责人id
      ReceiptDate   string                     `gorm:"column:receipt_date;type:varchar(255);not null;default '';comment:收款日期" json:"receiptDate"`                // 收款日期
      MoneyType     string                     `gorm:"column:money_type;type:varchar(255);not null;default '';comment:币种" json:"moneyType"`                      // 币种
      Amount        decimal.Decimal            `gorm:"column:amount;type:decimal(12,2);not null;default '0.00';comment:收款金额" json:"amount"`                      // 收款金额
      PaymentTypeId int                        `gorm:"column:payment_type_id;type:int;not null;default 0;comment:收款方式ID" json:"paymentTypeId"`                   // 收款方式ID
      BankAccountId int                        `gorm:"column:bank_account_id;type:int;not null;default 0;comment:账户id" json:"bankAccountId"`                     // 账户id
      Remark        string                     `gorm:"column:remark;type:varchar(255);not null;default '';comment:备注" json:"remark"`                             // 备注
      FileId        int                        `gorm:"column:file_id;type:int;not null;default 0;comment:附件id" json:"fileId"`                                    // 附件id
      PaymentType   PaymentType                `gorm:"foreignKey:PaymentTypeId" json:"paymentType"`
      BankAccountId int                        `gorm:"column:bank_account_id;type:int;not null;default 0;comment:账户id" json:"bankAccountId"` // 账户id
      BankAccount   BankAccount                `gorm:"foreignKey:BankAccountId" json:"bankAccount"`
      Remark        string                     `gorm:"column:remark;type:varchar(255);not null;default '';comment:备注" json:"remark"` // 备注
      FileId        int                        `gorm:"column:file_id;type:int;not null;default 0;comment:附件id" json:"fileId"`        // 附件id
      gorm.Model    `json:"-"`
   }