niki/domain/order/entity/order.go

50 lines
1.1 KiB
Go

package entity
import (
"git.gocasts.ir/ebhomengo/niki/types"
"time"
)
type Order struct {
ID types.ID
UserID types.ID
TotalAmount types.Price
TotalDiscount types.Price
ShippingID types.ID
PaymentMethod PaymentMethod
ProcessStatus ProcessStatus
PaymentStatus PaymentStatus
AddressID types.ID
CreatedAt time.Time
UpdatedAt time.Time
}
type PaymentMethod string
const (
Online PaymentMethod = "online"
Wallet = "wallet"
Cart = "cart"
)
type ProcessStatus string
const (
WaitingToPay ProcessStatus = "waiting-to-pay"
Processing = "processing"
Accepted = "accepted"
Preparing = "preparing"
Prepared = "prepared"
GivenToPost = "given-to-post"
Delivered = "delivered"
Cancelled = "cancelled"
SystemCancellation = "system-cancellation"
)
type PaymentStatus string
const (
Paid PaymentStatus = "paid"
UnPaid = "unpaid"
)