zhangqian
2023-08-11 f13912640b945a91b028e9f29d0c50e35c768b93
Merge branch 'master' into zq
1个文件已添加
1个文件已修改
17 ■■■■■ 已修改文件
model/interface.go 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceContract.go 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/interface.go
New file
@@ -0,0 +1,13 @@
package model
import (
    "github.com/shopspring/decimal"
    "gorm.io/gorm"
)
type MoneyAdder interface {
    AmountReceivableAdd(*gorm.DB, decimal.Decimal)
    AmountReceivedAdd(*gorm.DB, decimal.Decimal)
    AmountInvoicedAdd(*gorm.DB, decimal.Decimal)
    AmountNotInvoicedAdd(*gorm.DB, decimal.Decimal)
}
model/serviceContract.go
@@ -18,6 +18,7 @@
        Number                  string                `json:"number" gorm:"column:number;type:varchar(255);comment:合同编号"`
        MemberId                int                   `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"`
        ContactId               int                   `json:"contactId" gorm:"column:contact_id;type:int;comment:联系人id"`
        Contact                 Contact               `json:"contact" gorm:"foreignKey:ContactId"`
        SaleChanceId            int                   `json:"saleChanceId" gorm:"column:sale_chance_id;type:int;comment:销售机会id"`
        SaleChance              SaleChance            `json:"SaleChance" gorm:"foreignKey:SaleChanceId"`
        SalesDetailsId          int                   `json:"salesDetailsId" gorm:"column:sales_details_id;type:int;comment:合同订单id"`
@@ -115,7 +116,8 @@
            Preload("Products").
            Preload("Client").
            Preload("ServiceContractType").
            Preload("ServiceContractStatus")
            Preload("ServiceContractStatus").
            Preload("Contact")
    }
    return db