Update template email
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type CustomerDB struct {
|
||||
ID int64 `gorm:"primaryKey;column:id"`
|
||||
Name string `gorm:"column:name"`
|
||||
Email string `gorm:"column:email"`
|
||||
Phone string `gorm:"column:phone"`
|
||||
Points int `gorm:"column:points"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
}
|
||||
|
||||
func (CustomerDB) TableName() string {
|
||||
return "customers"
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
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"`
|
||||
Fee float64 `gorm:"column:fee"`
|
||||
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"`
|
||||
}
|
||||
|
||||
func (OrderDB) TableName() string {
|
||||
return "orders"
|
||||
}
|
||||
|
||||
type OrderItemDB struct {
|
||||
ID int64 `gorm:"primaryKey;column:order_item_id"`
|
||||
OrderID int64 `gorm:"column:order_id"`
|
||||
ItemID int64 `gorm:"column:item_id"`
|
||||
ItemType string `gorm:"column:item_type"`
|
||||
Price float64 `gorm:"column:price"`
|
||||
Quantity int `gorm:"column:quantity"`
|
||||
CreatedBy int64 `gorm:"column:created_by"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
}
|
||||
|
||||
func (OrderItemDB) TableName() string {
|
||||
return "order_items"
|
||||
}
|
||||
|
||||
type OrderInquiryDB struct {
|
||||
ID string `gorm:"primaryKey;column:id"`
|
||||
PartnerID int64 `gorm:"column:partner_id"`
|
||||
CustomerID *int64 `gorm:"column:customer_id"`
|
||||
CustomerName string `gorm:"column:customer_name"`
|
||||
CustomerEmail string `gorm:"column:customer_email"`
|
||||
CustomerPhoneNumber string `gorm:"column:customer_phone_number"`
|
||||
Status string `gorm:"column:status"`
|
||||
Amount float64 `gorm:"column:amount"`
|
||||
Fee float64 `gorm:"column:fee"`
|
||||
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"`
|
||||
ExpiresAt time.Time `gorm:"column:expires_at"`
|
||||
InquiryItems []InquiryItemDB `gorm:"foreignKey:InquiryID"`
|
||||
}
|
||||
|
||||
func (OrderInquiryDB) TableName() string {
|
||||
return "order_inquiries"
|
||||
}
|
||||
|
||||
type InquiryItemDB struct {
|
||||
ID int64 `gorm:"primaryKey;column:id"`
|
||||
InquiryID string `gorm:"column:inquiry_id"`
|
||||
ItemID int64 `gorm:"column:item_id"`
|
||||
ItemType string `gorm:"column:item_type"`
|
||||
Price float64 `gorm:"column:price"`
|
||||
Quantity int `gorm:"column:quantity"`
|
||||
CreatedBy int64 `gorm:"column:created_by"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
}
|
||||
|
||||
func (InquiryItemDB) TableName() string {
|
||||
return "inquiry_items"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type ProductDB struct {
|
||||
ID int64 `gorm:"primaryKey;column:id"`
|
||||
SiteID int64 `gorm:"column:site_id"`
|
||||
PartnerID int64 `gorm:"column:partner_id"`
|
||||
Name string `gorm:"column:name"`
|
||||
Description string `gorm:"column:description"`
|
||||
Price float64 `gorm:"column:price"`
|
||||
Type string `gorm:"column:type"`
|
||||
Status string `gorm:"column:status"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
}
|
||||
|
||||
func (ProductDB) TableName() string {
|
||||
return "products"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type TransactionDB struct {
|
||||
ID string `gorm:"primaryKey;column:id"`
|
||||
OrderID int64 `gorm:"column:order_id"`
|
||||
Amount float64 `gorm:"column:amount"`
|
||||
PaymentMethod string `gorm:"column:payment_method"`
|
||||
Status string `gorm:"column:status"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
PartnerID int64 `gorm:"column:partner_id"`
|
||||
TransactionType string `gorm:"column:transaction_type"`
|
||||
}
|
||||
|
||||
func (TransactionDB) TableName() string {
|
||||
return "transactions"
|
||||
}
|
||||
Reference in New Issue
Block a user