Contracts for buyer

This commit is contained in:
Nedim
2023-10-03 18:26:57 +02:00
parent 7df0c64d15
commit 2cfac4a023
9 changed files with 283 additions and 70 deletions

View File

@@ -27,9 +27,33 @@ type Invoice struct {
InvoiceDueDate time.Time
ContractID uint
InvoiceItem [] InvoiceItem
Status string
}
type ListInvoiceResponse struct {
Status KeyValue `json:"Status"`
Buyer CompanyShortResponse `json:"Buyer"`
ContractID int
DateCreated time.Time
DueDate time.Time
Amount string
}
type KeyValue struct {
Key string
Value string
}
func GetInvoiceStatuses() []Status {
return []Status{
{Key: "Insurance claimed", Value: "insurance_claimed"},
{Key: "Invoice issued", Value: "invoice_issued"},
}
}
func (Invoice) Update() (bool, error) {
return false, nil