Upstream sync
This commit is contained in:
@@ -3,34 +3,28 @@ package models
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
type InvoiceItem struct {
|
||||
gorm.Model
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt sql.NullTime `json:"deletedAt" gorm:"index"`
|
||||
Description string `json:"description"`
|
||||
Quantity int64 `json:"quantity"`
|
||||
Unit string `json:"unit"`
|
||||
PriceCents int64 `json:"priceCents" gorm:"column:price_cents"`
|
||||
InvoiceID uint `json:"invoiceId"`
|
||||
BaseModel
|
||||
Description string `json:"description"`
|
||||
Quantity int64 `json:"quantity"`
|
||||
Unit string `json:"unit"`
|
||||
PriceCents int64 `json:"priceCents" gorm:"column:price_cents"`
|
||||
InvoiceID uint `json:"invoiceId"`
|
||||
}
|
||||
|
||||
type InvoiceItemResponse struct {
|
||||
BaseModel
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt sql.NullTime `json:"deletedAt" gorm:"index"`
|
||||
Description string `json:"description"`
|
||||
Quantity int64 `json:"quantity"`
|
||||
Unit string `json:"unit"`
|
||||
PriceCents int64 `json:"priceCents" gorm:"column:price_cents"`
|
||||
InvoiceID uint `json:"invoiceId"`
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt sql.NullTime `json:"deletedAt" gorm:"index"`
|
||||
Description string `json:"description"`
|
||||
Quantity int64 `json:"quantity"`
|
||||
Unit string `json:"unit"`
|
||||
PriceCents int64 `json:"priceCents" gorm:"column:price_cents"`
|
||||
InvoiceID uint `json:"invoiceId"`
|
||||
}
|
||||
|
||||
// ConvertSliceOfInvoiceItemToResponse converts a slice of InvoiceItem models to a slice of InvoiceItemResponse models
|
||||
@@ -54,9 +48,6 @@ func ConvertInvoiceItemToResponse(items []InvoiceItem) []InvoiceItemResponse {
|
||||
return itemResponses
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
func (InvoiceItem) Update() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
@@ -66,4 +57,3 @@ func (InvoiceItem) Create() (bool, error) {
|
||||
func (InvoiceItem) Delete() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user