| | |
| | | QuotationId int `json:"quotationId" gorm:"column:quotation_id;type:int;comment:报价单id"` |
| | | Quotation Quotation `json:"quotation" gorm:"foreignKey:QuotationId;references:Id"` |
| | | StatusId int `json:"statusId" gorm:"column:status_id;type:int;comment:合同状态"` |
| | | ServiceContractStatus ServiceContractStatus `json:"serviceContractStatus" gorm:"foreignKey:StatusId;references:Id"` |
| | | File string `json:"file" gorm:"column:file;type:varchar(255);comment:合同文件"` |
| | | CreatedAt *CustomTime `json:"created_at" gorm:"column:created_at;type:datetime;comment:创建时间"` |
| | | gormModel |
| | |
| | | db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize) |
| | | } |
| | | |
| | | err := db.Preload("Client").Preload("Member").Preload("Quotation").Order("id desc").Find(&records).Error |
| | | err := db.Preload("ServiceContractStatus").Preload("Client").Preload("Member").Preload("Quotation").Order("id desc").Find(&records).Error |
| | | return records, total, err |
| | | } |
| | | |