structs.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. package structs
  2. import "zhiyuan/services/structs/calc"
  3. type MaterialItemCalcParam struct {
  4. Name string `json:"name" label:"变量名称"`
  5. Value float64 `json:"value" label:"变量值"`
  6. HoleHeight float64 `json:"hole_height" label:"门洞高度"`
  7. WallHeight float64 `json:"wall_height" label:"墙面高度"`
  8. WindowHeight float64 `json:"window_height" label:"窗户高度"`
  9. LossRate float64 `json:"loss_rate" label:"损耗系数"`
  10. FixNum float64 `json:"fix_num" label:"固定数"`
  11. RoomNum int `json:"room_num"`
  12. ToiletNum int `json:"toilet_num"`
  13. KitchenNum int `json:"kitchen_num"`
  14. RestaurantNum int `json:"restaurant_num"`
  15. BaseMoney float64 `json:"base_money"`
  16. AddRoomMoney float64 `json:"add_room_money"`
  17. AddToiletMoney float64 `json:"add_toilet_money"`
  18. AddKitchenMoney float64 `json:"add_kitchen_money"`
  19. AddRestaurantMoney float64 `json:"add_restaurant__money"`
  20. }
  21. type MaterialBidCalcSetting struct {
  22. RoomNum int `json:"roomNum"`
  23. ToiletNum int `json:"toilet_num"`
  24. KitchenNum int `json:"kitchen_num"`
  25. RestaurantNum int `json:"restaurant_num"`
  26. KitchenHole float64 `json:"kitchen_hole"`
  27. BalconyArea float64 `json:"balcony_area"`
  28. BalconyHole float64 `json:"balcony_hole"`
  29. BalconyRound float64 `json:"balcony_round"`
  30. BalconyWindow float64 `json:"balcony_window"`
  31. KitchenWallArea float64 `json:"kitchen_wall_area"`
  32. ToiletWallArea float64 `json:"toilet_wall_area"`
  33. }
  34. type MaterialBidOrderItem struct {
  35. ID int `json:"id"`
  36. BidName string `json:"bid_name"`
  37. Price float64 `json:"price"`
  38. }
  39. type MaterialBidOrderParam struct {
  40. RoomType int `json:"room_type" label:"房屋类型" binding:"gt=0"`
  41. RoomName string `json:"room_name" label:"房屋" binding:"required"`
  42. Area float64 `json:"area" label:"面积" binding:"gt=0"`
  43. Round float64 `json:"round" label:"周长" binding:"gt=0"`
  44. Hole float64 `json:"hole" label:"门洞" binding:"gte=0"`
  45. Window float64 `json:"window" label:"窗宽" binding:"gte=0"`
  46. Items []MaterialBidOrderItem `json:"items"`
  47. }
  48. type MaterialPkgList struct {
  49. ID int `json:"id"`
  50. PkgName string `json:"pkg_name"`
  51. TransportRate float64 `json:"transport_rate"`
  52. ManageRate float64 `json:"manage_rate"`
  53. DesignFee float64 `json:"design_fee"`
  54. SanitationRate float64 `json:"sanitation_rate"`
  55. PackageRate float64 `json:"package_rate"`
  56. ProfitRate float64 `json:"profit_rate"`
  57. BuildCustomizeRate float64 `json:"build_customize_rate"`
  58. MaterialCustomizeRate float64 `json:"material_customize_rate"`
  59. MinDiscount float64 `json:"min_discount"`
  60. DiscountRate float64 `json:"discount_rate"`
  61. DiscountRate100 float64 `json:"discount_rate100"`
  62. ToiletRate float64 `json:"toilet_rate"`
  63. RoomPics string `json:"room_pics"`
  64. ShowHome int `json:"show_home"`
  65. RoomPicsDecode map[int]string `json:"room_pics_decode"`
  66. Outline string `json:"outline"`
  67. OutlineDecode calc.Outline `json:"outline_decode"`
  68. CreatedAt string `json:"created_at"`
  69. }
  70. type MaterialBidList struct {
  71. ID int `json:"id"`
  72. Category int `json:"category"`
  73. CategoryName string `json:"category_name"`
  74. PkgID int `json:"pkg_id"`
  75. BidName string `json:"bid_name"`
  76. CalcType int `json:"calc_type"`
  77. CalcTypeName string `json:"calc_type_name"`
  78. TypeID int `json:"type_id"`
  79. TypeIDs string `json:"type_ids"`
  80. TypeNames string `json:"type_names"`
  81. CalcParam string `json:"calc_param"`
  82. Unit int `json:"unit"`
  83. UnitName string `json:"unit_name"`
  84. Level int `json:"level"`
  85. Price float64 `json:"price"`
  86. CalcParamDecode MaterialItemCalcParam `json:"calc_param_decode"`
  87. RoomType int `json:"room_type"`
  88. RoomTypeName string `json:"room_type_name"`
  89. Description string `json:"description"`
  90. }
  91. type MaterialBidCustomize struct {
  92. ID int `json:"id"`
  93. Num float64 `json:"num"`
  94. Price float64 `json:"price"`
  95. Total float64 `json:"total"`
  96. RoomTypeName string `json:"room_type_name"`
  97. CategoryName string `json:"category_name"`
  98. BidName string `json:"bid_name"`
  99. UnitName string `json:"unit_name"`
  100. }
  101. type HouseStyle struct {
  102. Num int `json:"num"`
  103. Type int `json:"type"`
  104. }
  105. type MaterialBidOrderAuth struct {
  106. Finish bool `json:"finish"`
  107. Edit bool `json:"edit"`
  108. }
  109. type MaterialBidOrderList struct {
  110. ID int `json:"id"`
  111. Type int `json:"type"`
  112. PkgID int `json:"pkg_id"`
  113. PkgName string `json:"pkg_name"`
  114. CustomerName string `json:"customer_name"`
  115. CustomerPhone string `json:"customer_phone"`
  116. HouseAddress string `json:"house_address"`
  117. HouseArea float64 `json:"house_area"`
  118. HouseStyle string `json:"house_style"`
  119. HouseStyleDecode []HouseStyle `json:"house_style_decode"`
  120. RoomText string `json:"room_text"`
  121. Param string `json:"param"`
  122. ParamDecode []MaterialBidOrderParam `json:"param_decode"`
  123. Customize string `json:"customize"`
  124. CustomizeDecode map[int][]MaterialBidCustomize `json:"customize_decode"`
  125. PackagePrice float64 `json:"package_price"`
  126. PackagePriceDetail string `json:"package_price_detail"`
  127. PackagePriceDecode calc.PackagePrice `json:"package_price_decode"`
  128. CustomizePrice float64 `json:"customize_price"`
  129. CustomizePriceDetail string `json:"customize_price_detail"`
  130. CustomizePriceDecode calc.CustomizePrice `json:"customize_price_decode"`
  131. InclusivePrice float64 `json:"inclusive_price"`
  132. InclusivePriceDetail string `json:"inclusive_price_detail"`
  133. InclusivePriceDecode calc.InclusivePrice `json:"inclusive_price_decode"`
  134. InclusiveCost float64 `json:"inclusive_cost"`
  135. InclusiveCostDetail string `json:"inclusive_cost_detail"`
  136. InclusiveCostDecode calc.InclusiveCost `json:"inclusive_cost_decode"`
  137. ToiletPrice float64 `json:"toilet_price"`
  138. ToiletPriceDetail string `json:"toilet_price_detail"`
  139. ToiletPriceDecode calc.PackagePrice `json:"toilet_price_decode"`
  140. OutlinePriceDecode calc.OutlinePrice `json:"outline_price_decode"`
  141. TotalPrice float64 `json:"total_price"`
  142. BaseDiscount float64 `json:"base_discount"`
  143. BaseInterestRate float64 `json:"base_interest_rate"`
  144. InterestRate float64 `json:"interest_rate"`
  145. ProfitRate float64 `json:"profit_rate"`
  146. State int `json:"state"`
  147. StateName string `json:"state_name"`
  148. StateColor string `json:"state_color"`
  149. IsElevator int `json:"is_elevator"`
  150. FloorNum int `json:"floor_num"`
  151. InclusiveArea int `json:"inclusive_area"`
  152. TransportRate float64 `json:"transport_rate"`
  153. AdminID int `json:"admin_id"`
  154. AdminName string `json:"admin_name"`
  155. Remarks string `json:"remarks"`
  156. Auth MaterialBidOrderAuth `json:"auth"`
  157. CreatedAt string `json:"created_at"`
  158. UpdatedAt string `json:"updated_at"`
  159. DeletedAt string `json:"deleted_at"`
  160. }
  161. type MatPickWorkList struct {
  162. ID int `json:"id"`
  163. RoomType int `json:"room_type"`
  164. ItemType int `json:"item_type"`
  165. ItemTypeName string `json:"item_type_name"`
  166. Standard string `json:"standard"`
  167. Cycle string `json:"cycle"`
  168. ConfirmType string `json:"confirm_type"`
  169. PickName string `json:"pick_name"`
  170. }
  171. type MaterialPickList struct {
  172. ID int `json:"id"`
  173. RoomType int `json:"room_type"`
  174. ItemType int `json:"item_type"`
  175. ItemTypeName string `json:"item_type_name"`
  176. Standard string `json:"standard"`
  177. Cycle string `json:"cycle"`
  178. ConfirmType string `json:"confirm_type"`
  179. Level int `json:"level"`
  180. PickName string `json:"pick_name"`
  181. }
  182. type MaterialPickOrderContent struct {
  183. RoomType int `json:"room_type"`
  184. RoomName string `json:"room_name"`
  185. Picks []struct {
  186. PickID int `json:"pick_id"`
  187. PickName string `json:"pick_name"`
  188. ItemID int `json:"item_id"`
  189. ItemName string `json:"item_name"`
  190. BrandID int `json:"brand_id"`
  191. BrandName string `json:"brand_name"`
  192. UnitName string `json:"unit_name"`
  193. Level int `json:"level"`
  194. Remarks string `json:"remarks"`
  195. Color string `json:"color"`
  196. Num int `json:"num"`
  197. } `json:"picks"`
  198. }
  199. type PackageCostExtra struct {
  200. Direct float64 `json:"direct"`
  201. Valve float64 `json:"value"`
  202. Hole float64 `json:"hole"`
  203. HoleBase float64 `json:"hole_base"`
  204. HoleExtra float64 `json:"hole_extra"`
  205. KitchenPipe float64 `json:"kitchen_pipe"`
  206. ToiletTopPipe float64 `json:"toilet_pipe"`
  207. ToiletWaterPipe float64 `json:"toilet_water_pipe"`
  208. }
  209. type HouseList struct {
  210. ID int `json:"id"`
  211. UserID int `json:"user_id"`
  212. District int `json:"district"`
  213. DistrictName string `json:"district_name"`
  214. Address string `json:"address"`
  215. PkgID int `json:"pkg_id"`
  216. LinkName string `json:"link_name"`
  217. LinkPhone string `json:"link_phone"`
  218. ShopID int `json:"shop_id"`
  219. Designer int `json:"designer"`
  220. DesignerName string `json:"designer_name"`
  221. Supervisor int `json:"supervisor"`
  222. SupervisorName string `json:"supervisor_name"`
  223. Salesman int `json:"salesman"`
  224. ProjectManager int `json:"project_manager"`
  225. ProjectManagerName string `json:"project_manager_name"`
  226. ProjectLeader int `json:"project_leader"`
  227. ProjectLeaderName string `json:"project_leader_name"`
  228. ProjectStart string `json:"project_start"`
  229. ProjectEnd string `json:"project_end"`
  230. WarrantyStart string `json:"warranty_start"`
  231. WarrantyMark string `json:"warranty_mark"`
  232. CreatedAt string `json:"created_at"`
  233. WarrantyType []*WarrantyType `json:"warranty_type"`
  234. WarrantyPeriodBase int `json:"warranty_period_base"`
  235. WarrantyPeriodMaterial int `json:"warranty_period_material"`
  236. WarrantyPeriodElectric int `json:"warranty_period_electric"`
  237. WarrantyPeriodBaseAddDate int `json:"warranty_period_base_adddate"`
  238. WarrantyPeriodMaterialAddDate int `json:"warranty_period_material_adddate"`
  239. WarrantyPeriodElectricAddDate int `json:"warranty_period_electric_adddate"`
  240. Pictures string `json:"pictures"`
  241. Mark string `json:"mark"`
  242. }
  243. type WarrantyType struct {
  244. ID int `json:"id"`
  245. Name string `json:"type_name"`
  246. LeftDate int `json:"left_date"`
  247. InWarranty int `json:"in_warranty"`
  248. WarrantyEnd int `json:"warranty_end"`
  249. WarrantyPeriod int `json:"warranty_period"`
  250. WarrantyPeriodAddDate int `json:"warranty_period_adddate"`
  251. }
  252. type QuoteOrderItemReturn struct {
  253. ID int64 `json:"id"`
  254. Category int64 `json:"category"`
  255. Name string `json:"name"`
  256. Price float64 `json:"price"`
  257. Description string `json:"description"`
  258. Total float64 `json:"total"`
  259. }
  260. type QuoteOrderReturn struct {
  261. RoomType int64 `json:"room_type" label:"房屋类型"`
  262. RoomName string `json:"room_name" label:"房屋"`
  263. Categorys map[int64]float64 `json:"categorys"`
  264. Total float64 `json:"total"`
  265. Items []QuoteOrderItemReturn `json:"items"`
  266. }
  267. type QuoteReturn struct {
  268. Rooms []QuoteOrderReturn `json:"rooms"`
  269. Categorys map[int64]float64 `json:"categorys"`
  270. Total float64 `json:"total"`
  271. }