Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OrderState order's state machine OrderState = transition.New(&Order{}) // ItemState order item's state machine ItemState = transition.New(&OrderItem{}) )
View Source
var (
DraftState = "draft"
)
View Source
var (
ORDER_TYPES = []string{"配送", "安装", "送装一体", "维修", "清洗", "销售", "物流"}
)
View Source
var (
SOURCES = []string{
"京东物流", "苏宁帮客", "美的安得",
}
)
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct { gorm.Model audited.AuditedModel UserID *uint User users.User PaymentAmount float32 PaymentTotal float32 AbandonedReason string DiscountValue uint DeliveryMethodID uint `form:"delivery-method"` DeliveryMethod DeliveryMethod PaymentMethod string TrackingNumber *string ShippedAt *time.Time ReturnedAt *time.Time CancelledAt *time.Time ShippingAddressID uint `form:"shippingaddress"` ShippingAddress users.Address BillingAddressID uint `form:"billingaddress"` BillingAddress users.Address OrderItems []OrderItem // AmazonAddressAccessToken string // AmazonOrderReferenceID string // AmazonAuthorizationID string // AmazonCaptureID string // AmazonRefundID string PaymentLog string `gorm:"size:655250"` // 订单来源 0 自家商城, 1 京东 Source string // 订单号 面单号 OrderNo string `gorm:"unique;not null"` // -- ORDER_TYPE starts with Q 退货的取件单 OrderType string // 客户信息, 从京东后台导入或者扫描枪扫入的 CustomerAddress string CustomerName string CustomerPhone string // 预约配送时间 ReserverdDeliveryTime string // 预约安装时间 ReserverdSetupTime string // 预约取件时间 ReserverdPickupTime string // 是否送装一体(这个jd页面抓下来的是什么就存什么, 但是实际上有的订单是非送装一体,如果客户要求,也需要派人安装的,有些订单是取件单) // 所以这个字段保持和京东抓下来的一致,另外还要个OrderType, 根据规则或者人工去改OrderType IsDeliveryAndSetup string // 应收款项 Receivables float32 // 配送员 ManToDeliverID string `l10n:"sync"` ManToDeliver users.User `l10n:"sync"` // 配送员 ManToSetupID string ManToSetup users.User `l10n:"sync"` // 取件员 ManToPickupID string `l10n:"sync"` ManToPickup users.User `l10n:"sync"` // 取件费 PickupFee float32 // 配送费 ShippingFee float32 // 安装费 SetupFee float32 transition.Transition }
func (Order) DeliveryFee ¶
DeliveryFee delivery fee
func (Order) ExternalID ¶
func (Order) UniqueExternalID ¶
type OrderFollowUp ¶
type OrderFollowUp struct { gorm.Model audited.AuditedModel transition.Transition // OrderID uint OrderNo string `json:"order_no"` // 对配送时效是否满意 SatisfactionOfTimeliness string `json:"satisfaction_of_timeliness"` // 对服务态度是否满意 SatisfactionOfServices string `json:"satisfaction_of_services"` // 是否有开箱验货 InspectTheGoods string `json:"inspect_the_goods"` // 师傅是否邀评 RequestFeedback string `json:"request_feedback"` // 是否有留下联系方式 方便后期有问题联系 LeaveContactInfomation string `json:"leave_contact_information"` // 师傅是否有介绍延保 IntroduceWarrantyExtension string `json:"introduce_warranty_extension"` // 是否有把商品放到指定位置 PositionProperly string `json:"position_properly"` // 有无问题要反馈 Feedback string `json:"feedback"` // 异常处理结果 ExceptionHandling string `json:"exception_handling"` }
OrderFollowUp 订单回访
type OrderItem ¶
type OrderItem struct { gorm.Model OrderID uint SizeVariationID uint `cartitem:"SizeVariationID"` SizeVariation *products.SizeVariation ColorVariationID uint `cartitem:"ColorVariationID"` ColorVariation *products.ColorVariation Quantity uint `cartitem:"Quantity"` Price float32 DiscountRate uint transition.Transition ProductNo string `json:"product_no"` OrderNo string `json:"order_no"` ItemName string `json:"product_name"` Install string `json:"install"` }
func (*OrderItem) ProductName ¶
ProductName order item's color name
func (*OrderItem) ProductPath ¶
ProductPath order item's product name
func (*OrderItem) SellingPrice ¶
SellingPrice order item's selling price
type PaymentMethod ¶
type PaymentMethod = string
const ( COD PaymentMethod = "COD" AmazonPay PaymentMethod = "AmazonPay" CreditCard PaymentMethod = "CreditCard" )
Click to show internal directories.
Click to hide internal directories.