43 lines
688 B
Go
43 lines
688 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/jinzhu/gorm"
|
|
)
|
|
|
|
type Invoice struct {
|
|
gorm.Model
|
|
BuyerID uint
|
|
BuyerName string
|
|
BuyerAddress string
|
|
BuyerEmail string
|
|
BuyerPhone string
|
|
SellerID uint
|
|
SellerName string
|
|
SellerAddress string
|
|
SellerEmail string
|
|
SellerPhone string
|
|
PriceCents int64 `gorm:"column:price_cents"`
|
|
Discount int64
|
|
Tax int64
|
|
TermsAndConditions string
|
|
InvoiceName string
|
|
InvoiceDate time.Time
|
|
InvoiceDueDate time.Time
|
|
ContractID uint
|
|
InvoiceItem [] InvoiceItem
|
|
}
|
|
|
|
|
|
|
|
func (Invoice) Update() (bool, error) {
|
|
return false, nil
|
|
}
|
|
func (Invoice) Create() (bool, error) {
|
|
return false, nil
|
|
}
|
|
func (Invoice) Delete() (bool, error) {
|
|
return false, nil
|
|
}
|