sale.go 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package models
  2. type SaleOrder struct {
  3. ID *string `json:"id" db:"id" id_type:"UUID"`
  4. Code *string `json:"code" db:"code"`
  5. CustomerId *string `json:"customerId" db:"customer_id"`
  6. ManagerId *int64 `json:"managerId" db:"manager_id"`
  7. IncomePrice *float64 `json:"incomePrice" db:"income_price"`
  8. FreePrice *float64 `json:"freePrice" db:"free_price"`
  9. ActualPrice *float64 `json:"actualPrice" db:"actual_price"`
  10. CreateTime *string `json:"createTime" db:"create_time"`
  11. Status *string `json:"status" db:"status"`
  12. PlanReceiveDate *string `json:"planReceiveDate" db:"plan_receive_date"`
  13. ActualReceiveDate *string `json:"actualReceiveDate" db:"actual_receive_date"`
  14. DeliveryDate *string `json:"deliveryDate" db:"delivery_date"`
  15. DeliveryAddress *string `json:"deliveryAddress" db:"delivery_address"`
  16. ContractNo *string `json:"contractNo" db:"contract_no"`
  17. OrderDate *string `json:"orderDate" db:"order_date"`
  18. Remark *string `json:"remark" db:"remark"`
  19. TenantId *string `json:"tenantId" db:"tenant_id"`
  20. CreateId *int64 `json:"createId" db:"create_id"`
  21. UpdateId *int64 `json:"updateId" db:"update_id"`
  22. UpdateTime *string `json:"updateTime" db:"update_time"`
  23. ManagerName *string `json:"managerName" db:"-"`
  24. CustomerName *string `json:"customerName" db:"-"`
  25. EmptyField *[]string `json:"emptyField" db:"-"`
  26. FileList *[]MinioFile `json:"fileList" db:"-"`
  27. ChildrenList *[]SaleOrderDetail `json:"childrenList" db:"-"`
  28. }
  29. type SaleOrderDetail struct {
  30. ID *string `json:"id" db:"id" id_type:"UUID"`
  31. MaterialCode *string `json:"materialCode" db:"material_code"`
  32. MaterialQuantity *int32 `json:"materialQuantity" db:"material_quantity"`
  33. OrderId *string `json:"orderId" db:"order_id"`
  34. CreateTime *string `json:"createTime" db:"create_time"`
  35. MaterialPrice *float64 `json:"materialPrice" db:"material_price"`
  36. Material *ProductMaterial `json:"material" db:"-"`
  37. BomList *[]ProductBom `json:"bomList" db:"-"`
  38. WarehouseMaterialList *[]WarehouseMaterial `json:"warehouseMaterialList" db:"-"`
  39. }
  40. type SalePlan struct {
  41. ID *string `json:"id" db:"id" id_type:"UUID"`
  42. Code *string `json:"code" db:"code"`
  43. Name *string `json:"name" db:"name"`
  44. Type *string `json:"type" db:"type"`
  45. ParentId *string `json:"parentId" db:"parent_id"`
  46. BeginDate *string `json:"beginDate" db:"begin_date"`
  47. EndDate *string `json:"endDate" db:"end_date"`
  48. SaleAmount *float64 `json:"saleAmount" db:"sale_amount"`
  49. CreateTime *string `json:"createTime" db:"create_time"`
  50. Remark *string `json:"remark" db:"remark"`
  51. TenantId *string `json:"tenantId" db:"tenant_id"`
  52. CreateId *int64 `json:"createId" db:"create_id"`
  53. UpdateId *int64 `json:"updateId" db:"update_id"`
  54. UpdateTime *string `json:"updateTime" db:"update_time"`
  55. EmptyField *[]string `json:"emptyField" db:"-"`
  56. FileList *[]MinioFile `json:"fileList" db:"-"`
  57. TotalActualPrice *float64 `json:"totalActualPrice" db:"-"`
  58. }
  59. type SalePriceByDay struct {
  60. Date *string `json:"date" db:"date"`
  61. DateStr *string `json:"date2" db:"datestr"`
  62. Price *float64 `json:"price" db:"price"`
  63. }
  64. type SalePerformance struct {
  65. PlanSalePriceByMonth *float64 `json:"planSalePriceByMonth" db:"plan_sale_price_by_month"`
  66. PlanSalePriceByYear *float64 `json:"planSalePriceByYear" db:"plan_sale_price_by_year"`
  67. ActualSalePriceByMonth *float64 `json:"actualSalePriceByMonth" db:"actual_sale_price_by_month"`
  68. ActualSalePriceByYear *float64 `json:"actualSalePriceByYear" db:"actual_sale_price_by_year"`
  69. PlanList *[]SalePriceByDay `json:"planList" db:"-"`
  70. ActualList *[]SalePriceByDay `json:"actualList" db:"-"`
  71. }