Add refund order
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type CashierSessionDB struct {
|
||||
ID int64 `gorm:"primaryKey"`
|
||||
CashierID int64 `gorm:"not null"`
|
||||
OpenedAt time.Time `gorm:"not null"`
|
||||
ClosedAt *time.Time
|
||||
OpeningAmount float64 `gorm:"not null"`
|
||||
ClosingAmount *float64
|
||||
ExpectedAmount *float64
|
||||
Notes *string
|
||||
Status string `gorm:"not null"`
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
func (CashierSessionDB) TableName() string {
|
||||
return "cashier_sessions"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type CategoryDB struct {
|
||||
ID int64 `gorm:"primaryKey;autoIncrement"`
|
||||
PartnerID int64 `gorm:"not null"`
|
||||
Name string `gorm:"type:varchar(255);not null"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
DeletedAt *time.Time
|
||||
}
|
||||
|
||||
func (CategoryDB) TableName() string {
|
||||
return "categories"
|
||||
}
|
||||
@@ -5,24 +5,26 @@ import (
|
||||
)
|
||||
|
||||
type OrderDB struct {
|
||||
ID int64 `gorm:"primaryKey;column:id"`
|
||||
PartnerID int64 `gorm:"column:partner_id"`
|
||||
CustomerID *int64 `gorm:"column:customer_id"`
|
||||
InquiryID *string `gorm:"column:inquiry_id"`
|
||||
Status string `gorm:"column:status"`
|
||||
Amount float64 `gorm:"column:amount"`
|
||||
Tax float64 `gorm:"column:tax"`
|
||||
Total float64 `gorm:"column:total"`
|
||||
PaymentType string `gorm:"column:payment_type"`
|
||||
Source string `gorm:"column:source"`
|
||||
CreatedBy int64 `gorm:"column:created_by"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
OrderItems []OrderItemDB `gorm:"foreignKey:OrderID"`
|
||||
OrderType string `gorm:"column:order_type"`
|
||||
TableNumber string `gorm:"column:table_number"`
|
||||
PaymentProvider string `gorm:"column:payment_provider"`
|
||||
CustomerName string `gorm:"column:customer_name"`
|
||||
ID int64 `gorm:"primaryKey;column:id"`
|
||||
PartnerID int64 `gorm:"column:partner_id"`
|
||||
CustomerID *int64 `gorm:"column:customer_id"`
|
||||
InquiryID *string `gorm:"column:inquiry_id"`
|
||||
Status string `gorm:"column:status"`
|
||||
Amount float64 `gorm:"column:amount"`
|
||||
Tax float64 `gorm:"column:tax"`
|
||||
Total float64 `gorm:"column:total"`
|
||||
PaymentType string `gorm:"column:payment_type"`
|
||||
Source string `gorm:"column:source"`
|
||||
CreatedBy int64 `gorm:"column:created_by"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
OrderItems []OrderItemDB `gorm:"foreignKey:OrderID"`
|
||||
OrderType string `gorm:"column:order_type"`
|
||||
TableNumber string `gorm:"column:table_number"`
|
||||
PaymentProvider string `gorm:"column:payment_provider"`
|
||||
CustomerName string `gorm:"column:customer_name"`
|
||||
CashierSessionID int64 `gorm:"column:cashier_session_id"`
|
||||
Description string `gorm:"column:description"`
|
||||
}
|
||||
|
||||
func (OrderDB) TableName() string {
|
||||
@@ -68,6 +70,7 @@ type OrderInquiryDB struct {
|
||||
PaymentProvider string `gorm:"column:payment_provider"`
|
||||
TableNumber string `gorm:"column:table_number"`
|
||||
OrderType string `gorm:"column:order_type"`
|
||||
CashierSessionID int64 `gorm:"column:cashier_session_id"`
|
||||
}
|
||||
|
||||
func (OrderInquiryDB) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user