sy_style.go 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. package model
  2. import (
  3. "git.getensh.com/common/gopkgsv2/database"
  4. "gorm.io/gorm"
  5. )
  6. type SyStyleModel interface {
  7. Update(db *gorm.DB, values interface{}) error
  8. List(db *gorm.DB, pagination *Pagination, join bool) ([]StyleList, error)
  9. Count(db *gorm.DB, join bool) (int64, error)
  10. Get(db *gorm.DB) (*DipSyStyle, error)
  11. StyleList(db *gorm.DB, fields string, limit int) ([]DipSyStyle, error)
  12. StyleListByMap(db *gorm.DB, fields string, limit int) ([]map[string]interface{}, error)
  13. }
  14. type DipSyStyle struct {
  15. ID int64 `gorm:"column:id" json:"id" form:"id"`
  16. Initial string `gorm:"column:initial" json:"initial" form:"initial"`
  17. BrandId string `gorm:"column:brand_id" json:"brand_id" form:"brand_id"`
  18. BrandName string `gorm:"column:brand_name" json:"brand_name" form:"brand_name"`
  19. SeriesId string `gorm:"column:series_id" json:"series_id" form:"series_id"`
  20. SeriesName string `gorm:"column:series_name" json:"series_name" form:"series_name"`
  21. StyleId string `gorm:"column:style_id" json:"style_id" form:"style_id"`
  22. StyleName string `gorm:"column:style_name" json:"style_name" form:"style_name"`
  23. Level string `gorm:"column:level" json:"level" form:"level"`
  24. Maker string `gorm:"column:maker" json:"maker" form:"maker"`
  25. MakerId string `gorm:"column:maker_id" json:"maker_id" form:"maker_id"`
  26. OnSale string `gorm:"column:on_sale" json:"on_sale" form:"on_sale"`
  27. ModelYear string `gorm:"column:model_year" json:"model_year" form:"model_year"`
  28. MarketTime string `gorm:"column:market_time" json:"market_time" form:"market_time"`
  29. PriceYuan string `gorm:"column:price_yuan" json:"price_yuan" form:"price_yuan"`
  30. Price string `gorm:"column:price" json:"price" form:"price"`
  31. SubLevel string `gorm:"column:sub_level" json:"sub_level" form:"sub_level"`
  32. FuelTypeDetail1 string `gorm:"column:fuel_type_detail1" json:"fuel_type_detail1" form:"fuel_type_detail1"`
  33. EmissionStandard string `gorm:"column:emission_standard" json:"emission_standard" form:"emission_standard"`
  34. FastChargingTime string `gorm:"column:fast_charging_time" json:"fast_charging_time" form:"fast_charging_time"`
  35. SlowChargingTime string `gorm:"column:slow_charging_time" json:"slow_charging_time" form:"slow_charging_time"`
  36. FastChargeAmount string `gorm:"column:fast_charge_amount" json:"fast_charge_amount" form:"fast_charge_amount"`
  37. MaximumPower string `gorm:"column:maximum_power" json:"maximum_power" form:"maximum_power"`
  38. MaximumTorque string `gorm:"column:maximum_torque" json:"maximum_torque" form:"maximum_torque"`
  39. Engine string `gorm:"column:engine" json:"engine" form:"engine"`
  40. Alternator string `gorm:"column:alternator" json:"alternator" form:"alternator"`
  41. GearboxDesc string `gorm:"column:gearbox_desc" json:"gearbox_desc" form:"gearbox_desc"`
  42. Lwh string `gorm:"column:lwh" json:"lwh" form:"lwh"`
  43. VehicleStructure string `gorm:"column:vehicle_structure" json:"vehicle_structure" form:"vehicle_structure"`
  44. MaximumSpeed string `gorm:"column:maximum_speed" json:"maximum_speed" form:"maximum_speed"`
  45. HundredAccelerate string `gorm:"column:hundred_accelerate" json:"hundred_accelerate" form:"hundred_accelerate"`
  46. HundredAccelerateMeasure string `gorm:"column:hundred_accelerate_measure" json:"hundred_accelerate_measure" form:"hundred_accelerate_measure"`
  47. BrakingDistanceMeasure string `gorm:"column:braking_distance_measure" json:"braking_distance_measure" form:"braking_distance_measure"`
  48. MaximumSimulationMilageMeasure string `gorm:"column:maximum_simulation_milage_measure" json:"maximum_simulation_milage_measure" form:"maximum_simulation_milage_measure"`
  49. OilWearComrehensive string `gorm:"column:oil_wear_comrehensive" json:"oil_wear_comrehensive" form:"oil_wear_comrehensive"`
  50. OilWearMeasure string `gorm:"column:oil_wear_measure" json:"oil_wear_measure" form:"oil_wear_measure"`
  51. VehicleWarranty string `gorm:"column:vehicle_warranty" json:"vehicle_warranty" form:"vehicle_warranty"`
  52. Long string `gorm:"column:long" json:"long" form:"long"`
  53. Wide string `gorm:"column:wide" json:"wide" form:"wide"`
  54. High string `gorm:"column:high" json:"high" form:"high"`
  55. Wheelbase string `gorm:"column:wheelbase" json:"wheelbase" form:"wheelbase"`
  56. FrontWheelDistance string `gorm:"column:front_wheel_distance" json:"front_wheel_distance" form:"front_wheel_distance"`
  57. BackWheelDistance string `gorm:"column:back_wheel_distance" json:"back_wheel_distance" form:"back_wheel_distance"`
  58. MinimumGroundClearance string `gorm:"column:minimum_ground_clearance" json:"minimum_ground_clearance" form:"minimum_ground_clearance"`
  59. DoorNumber string `gorm:"column:door_number" json:"door_number" form:"door_number"`
  60. SeatNumber string `gorm:"column:seat_number" json:"seat_number" form:"seat_number"`
  61. OilboxVolume string `gorm:"column:oilbox_volume" json:"oilbox_volume" form:"oilbox_volume"`
  62. TrunkVolume string `gorm:"column:trunk_volume" json:"trunk_volume" form:"trunk_volume"`
  63. UnladenMass string `gorm:"column:unladen_mass" json:"unladen_mass" form:"unladen_mass"`
  64. EngineType string `gorm:"column:engine_type" json:"engine_type" form:"engine_type"`
  65. Displacement string `gorm:"column:displacement" json:"displacement" form:"displacement"`
  66. DisplacementL string `gorm:"column:displacement_l" json:"displacement_l" form:"displacement_l"`
  67. AirIntakForm string `gorm:"column:air_intak_form" json:"air_intak_form" form:"air_intak_form"`
  68. AirIntakFormDetail string `gorm:"column:air_intak_form_detail" json:"air_intak_form_detail" form:"air_intak_form_detail"`
  69. CylinderArrangement string `gorm:"column:cylinder_arrangement" json:"cylinder_arrangement" form:"cylinder_arrangement"`
  70. CylinderNumber string `gorm:"column:cylinder_number" json:"cylinder_number" form:"cylinder_number"`
  71. CylinderValveNumber string `gorm:"column:cylinder_valve_number" json:"cylinder_valve_number" form:"cylinder_valve_number"`
  72. ReductionRatio string `gorm:"column:reduction_ratio" json:"reduction_ratio" form:"reduction_ratio"`
  73. ValveMechanism string `gorm:"column:valve_mechanism" json:"valve_mechanism" form:"valve_mechanism"`
  74. CylinderDiameter string `gorm:"column:cylinder_diameter" json:"cylinder_diameter" form:"cylinder_diameter"`
  75. PistonStroke string `gorm:"column:piston_stroke" json:"piston_stroke" form:"piston_stroke"`
  76. MaximumHorsepower string `gorm:"column:maximum_horsepower" json:"maximum_horsepower" form:"maximum_horsepower"`
  77. MaximumPowerRpm string `gorm:"column:maximum_power_rpm" json:"maximum_power_rpm" form:"maximum_power_rpm"`
  78. Rpm string `gorm:"column:rpm" json:"rpm" form:"rpm"`
  79. EngineTechnology string `gorm:"column:engine_technology" json:"engine_technology" form:"engine_technology"`
  80. FuelTypeDetail string `gorm:"column:fuel_type_detail" json:"fuel_type_detail" form:"fuel_type_detail"`
  81. FuelLable string `gorm:"column:fuel_lable" json:"fuel_lable" form:"fuel_lable"`
  82. OilSupplyMode string `gorm:"column:oil_supply_mode" json:"oil_supply_mode" form:"oil_supply_mode"`
  83. CylinderHeadMaterial string `gorm:"column:cylinder_head_material" json:"cylinder_head_material" form:"cylinder_head_material"`
  84. CylinderMaterial string `gorm:"column:cylinder_material" json:"cylinder_material" form:"cylinder_material"`
  85. MotorType string `gorm:"column:motor_type" json:"motor_type" form:"motor_type"`
  86. TotalMotorPower string `gorm:"column:total_motor_power" json:"total_motor_power" form:"total_motor_power"`
  87. TotalMotorTorque string `gorm:"column:total_motor_torque" json:"total_motor_torque" form:"total_motor_torque"`
  88. FrontElectricMaximumPower string `gorm:"column:front_electric_maximum_power" json:"front_electric_maximum_power" form:"front_electric_maximum_power"`
  89. FrontElectricTorque string `gorm:"column:front_electric_torque" json:"front_electric_torque" form:"front_electric_torque"`
  90. BackElectricMaximumPower string `gorm:"column:back_electric_maximum_power" json:"back_electric_maximum_power" form:"back_electric_maximum_power"`
  91. BackElectricTorque string `gorm:"column:back_electric_torque" json:"back_electric_torque" form:"back_electric_torque"`
  92. SystemIntegratedPower string `gorm:"column:system_integrated_power" json:"system_integrated_power" form:"system_integrated_power"`
  93. SystemIntegratedTorque string `gorm:"column:system_integrated_torque" json:"system_integrated_torque" form:"system_integrated_torque"`
  94. MotorNumber string `gorm:"column:motor_number" json:"motor_number" form:"motor_number"`
  95. MotorLayout string `gorm:"column:motor_layout" json:"motor_layout" form:"motor_layout"`
  96. BatteryType string `gorm:"column:battery_type" json:"battery_type" form:"battery_type"`
  97. MaximumSimulationMilage string `gorm:"column:maximum_simulation_milage" json:"maximum_simulation_milage" form:"maximum_simulation_milage"`
  98. BatteryEnergy string `gorm:"column:battery_energy" json:"battery_energy" form:"battery_energy"`
  99. HundredElectricityConsumption string `gorm:"column:hundred_electricity_consumption" json:"hundred_electricity_consumption" form:"hundred_electricity_consumption"`
  100. BatteryPackWarranty string `gorm:"column:battery_pack_warranty" json:"battery_pack_warranty" form:"battery_pack_warranty"`
  101. GearNumber string `gorm:"column:gear_number" json:"gear_number" form:"gear_number"`
  102. GearboxType string `gorm:"column:gearbox_type" json:"gearbox_type" form:"gearbox_type"`
  103. DriveType string `gorm:"column:drive_type" json:"drive_type" form:"drive_type"`
  104. FrontSuspentionType string `gorm:"column:front_suspention_type" json:"front_suspention_type" form:"front_suspention_type"`
  105. BackSuspentionType string `gorm:"column:back_suspention_type" json:"back_suspention_type" form:"back_suspention_type"`
  106. AssistType string `gorm:"column:assist_type" json:"assist_type" form:"assist_type"`
  107. BodyStructure string `gorm:"column:body_structure" json:"body_structure" form:"body_structure"`
  108. FrontBrakeType string `gorm:"column:front_brake_type" json:"front_brake_type" form:"front_brake_type"`
  109. BackBrakeType string `gorm:"column:back_brake_type" json:"back_brake_type" form:"back_brake_type"`
  110. ParkingBrakeType string `gorm:"column:parking_brake_type" json:"parking_brake_type" form:"parking_brake_type"`
  111. FrontWheelSpecification string `gorm:"column:front_wheel_specification" json:"front_wheel_specification" form:"front_wheel_specification"`
  112. BackWheelSpecification string `gorm:"column:back_wheel_specification" json:"back_wheel_specification" form:"back_wheel_specification"`
  113. SpareWheelSpecification string `gorm:"column:spare_wheel_specification" json:"spare_wheel_specification" form:"spare_wheel_specification"`
  114. MainSeatAirbag string `gorm:"column:main_seat_airbag" json:"main_seat_airbag" form:"main_seat_airbag"`
  115. AuxiliarySeatAirbag string `gorm:"column:auxiliary_seat_airbag" json:"auxiliary_seat_airbag" form:"auxiliary_seat_airbag"`
  116. FrontSideAirbag string `gorm:"column:front_side_airbag" json:"front_side_airbag" form:"front_side_airbag"`
  117. BackSideAirbag string `gorm:"column:back_side_airbag" json:"back_side_airbag" form:"back_side_airbag"`
  118. FontHeadAirbag string `gorm:"column:font_head_airbag" json:"font_head_airbag" form:"font_head_airbag"`
  119. BackHeadAirbag string `gorm:"column:back_head_airbag" json:"back_head_airbag" form:"back_head_airbag"`
  120. KneeAirbag string `gorm:"column:knee_airbag" json:"knee_airbag" form:"knee_airbag"`
  121. PassengerSeatCushionAirbag string `gorm:"column:passenger_seat_cushion_airbag" json:"passenger_seat_cushion_airbag" form:"passenger_seat_cushion_airbag"`
  122. FrontMiddleAirbag string `gorm:"column:front_middle_airbag" json:"front_middle_airbag" form:"front_middle_airbag"`
  123. BackBeltAirbag string `gorm:"column:back_belt_airbag" json:"back_belt_airbag" form:"back_belt_airbag"`
  124. RearSeatAntiSlideAirbag string `gorm:"column:rear_seat_anti_slide_airbag" json:"rear_seat_anti_slide_airbag" form:"rear_seat_anti_slide_airbag"`
  125. RearCentralAirbag string `gorm:"column:rear_central_airbag" json:"rear_central_airbag" form:"rear_central_airbag"`
  126. PassivePedestrianProtection string `gorm:"column:passive_pedestrian_protection" json:"passive_pedestrian_protection" form:"passive_pedestrian_protection"`
  127. TirePresureMonitor string `gorm:"column:tire_presure_monitor" json:"tire_presure_monitor" form:"tire_presure_monitor"`
  128. RunFlatTire string `gorm:"column:run_flat_tire" json:"run_flat_tire" form:"run_flat_tire"`
  129. SeatBeltWarning string `gorm:"column:seat_belt_warning" json:"seat_belt_warning" form:"seat_belt_warning"`
  130. IsoFix string `gorm:"column:iso_fix" json:"iso_fix" form:"iso_fix"`
  131. Abs string `gorm:"column:abs" json:"abs" form:"abs"`
  132. EbdCbc string `gorm:"column:ebd_cbc" json:"ebd_cbc" form:"ebd_cbc"`
  133. EbaBasBa string `gorm:"column:eba_bas_ba" json:"eba_bas_ba" form:"eba_bas_ba"`
  134. AsrTcsTrc string `gorm:"column:asr_tcs_trc" json:"asr_tcs_trc" form:"asr_tcs_trc"`
  135. Esp string `gorm:"column:esp" json:"esp" form:"esp"`
  136. ParallelAuxiliary string `gorm:"column:parallel_auxiliary" json:"parallel_auxiliary" form:"parallel_auxiliary"`
  137. LaneDepartureWarningSystem string `gorm:"column:lane_departure_warning_system" json:"lane_departure_warning_system" form:"lane_departure_warning_system"`
  138. LaneKeeping string `gorm:"column:lane_keeping" json:"lane_keeping" form:"lane_keeping"`
  139. RoadTrafficSignRecognition string `gorm:"column:road_traffic_sign_recognition" json:"road_traffic_sign_recognition" form:"road_traffic_sign_recognition"`
  140. ActiveBrake string `gorm:"column:active_brake" json:"active_brake" form:"active_brake"`
  141. NightVision string `gorm:"column:night_vision" json:"night_vision" form:"night_vision"`
  142. FatigueDrivingWarning string `gorm:"column:fatigue_driving_warning" json:"fatigue_driving_warning" form:"fatigue_driving_warning"`
  143. FrontParkingRador string `gorm:"column:front_parking_rador" json:"front_parking_rador" form:"front_parking_rador"`
  144. BackParkingRador string `gorm:"column:back_parking_rador" json:"back_parking_rador" form:"back_parking_rador"`
  145. AutomaticDrivingAssistance string `gorm:"column:automatic_driving_assistance" json:"automatic_driving_assistance" form:"automatic_driving_assistance"`
  146. ReverseVehicleSideWarningSystem string `gorm:"column:reverse_vehicle_side_warning_system" json:"reverse_vehicle_side_warning_system" form:"reverse_vehicle_side_warning_system"`
  147. CruiseSystem string `gorm:"column:cruise_system" json:"cruise_system" form:"cruise_system"`
  148. DrivingModeSelection string `gorm:"column:driving_mode_selection" json:"driving_mode_selection" form:"driving_mode_selection"`
  149. AutomaticParking string `gorm:"column:automatic_parking" json:"automatic_parking" form:"automatic_parking"`
  150. EngineStartStopTechnology string `gorm:"column:engine_start_stop_technology" json:"engine_start_stop_technology" form:"engine_start_stop_technology"`
  151. AutoHold string `gorm:"column:auto_hold" json:"auto_hold" form:"auto_hold"`
  152. AscentAssist string `gorm:"column:ascent_assist" json:"ascent_assist" form:"ascent_assist"`
  153. Hdc string `gorm:"column:hdc" json:"hdc" form:"hdc"`
  154. VariableSuspension string `gorm:"column:variable_suspension" json:"variable_suspension" form:"variable_suspension"`
  155. AirSuspension string `gorm:"column:air_suspension" json:"air_suspension" form:"air_suspension"`
  156. EInductionSuspension string `gorm:"column:e_induction_suspension" json:"e_induction_suspension" form:"e_induction_suspension"`
  157. VariableSteeringRatio string `gorm:"column:variable_steering_ratio" json:"variable_steering_ratio" form:"variable_steering_ratio"`
  158. CentralDiffLock string `gorm:"column:central_diff_lock" json:"central_diff_lock" form:"central_diff_lock"`
  159. OverallActiveSteeringSystem string `gorm:"column:overall_active_steering_system" json:"overall_active_steering_system" form:"overall_active_steering_system"`
  160. Edl string `gorm:"column:edl" json:"edl" form:"edl"`
  161. WadeSensingSystem string `gorm:"column:wade_sensing_system" json:"wade_sensing_system" form:"wade_sensing_system"`
  162. SkylightType string `gorm:"column:skylight_type" json:"skylight_type" form:"skylight_type"`
  163. SportsAppearanceKit string `gorm:"column:sports_appearance_kit" json:"sports_appearance_kit" form:"sports_appearance_kit"`
  164. Tail string `gorm:"column:tail" json:"tail" form:"tail"`
  165. RimMaterial string `gorm:"column:rim_material" json:"rim_material" form:"rim_material"`
  166. Eosd string `gorm:"column:eosd" json:"eosd" form:"eosd"`
  167. FramelessDesignDoor string `gorm:"column:frameless_design_door" json:"frameless_design_door" form:"frameless_design_door"`
  168. SideSlidingDoor string `gorm:"column:side_sliding_door" json:"side_sliding_door" form:"side_sliding_door"`
  169. ElectricTrunk string `gorm:"column:electric_trunk" json:"electric_trunk" form:"electric_trunk"`
  170. InductiveTrunk string `gorm:"column:inductive_trunk" json:"inductive_trunk" form:"inductive_trunk"`
  171. RearCompartmentPositionMemory string `gorm:"column:rear_compartment_position_memory" json:"rear_compartment_position_memory" form:"rear_compartment_position_memory"`
  172. TheTailgateGlassOpensIndependently string `gorm:"column:the_tailgate_glass_opens_independently" json:"the_tailgate_glass_opens_independently" form:"the_tailgate_glass_opens_independently"`
  173. RoofLuggageRack string `gorm:"column:roof_luggage_rack" json:"roof_luggage_rack" form:"roof_luggage_rack"`
  174. ElectronicAntiTheft string `gorm:"column:electronic_anti_theft" json:"electronic_anti_theft" form:"electronic_anti_theft"`
  175. CentralControlLock string `gorm:"column:central_control_lock" json:"central_control_lock" form:"central_control_lock"`
  176. KeyType string `gorm:"column:key_type" json:"key_type" form:"key_type"`
  177. KeylessStartSystem string `gorm:"column:keyless_start_system" json:"keyless_start_system" form:"keyless_start_system"`
  178. KeylessEntrySystem string `gorm:"column:keyless_entry_system" json:"keyless_entry_system" form:"keyless_entry_system"`
  179. HideElectricDoorHandle string `gorm:"column:hide_electric_door_handle" json:"hide_electric_door_handle" form:"hide_electric_door_handle"`
  180. ActiveIntakeGrille string `gorm:"column:active_intake_grille" json:"active_intake_grille" form:"active_intake_grille"`
  181. RemoteStart string `gorm:"column:remote_start" json:"remote_start" form:"remote_start"`
  182. OutsidePedal string `gorm:"column:outside_pedal" json:"outside_pedal" form:"outside_pedal"`
  183. BatteryPreHeating string `gorm:"column:battery_pre_heating" json:"battery_pre_heating" form:"battery_pre_heating"`
  184. SteeringWheelMaterial string `gorm:"column:steering_wheel_material" json:"steering_wheel_material" form:"steering_wheel_material"`
  185. SteeringWheelAdjustment string `gorm:"column:steering_wheel_adjustment" json:"steering_wheel_adjustment" form:"steering_wheel_adjustment"`
  186. MultiFunctionalSteeringWheel string `gorm:"column:multi_functional_steering_wheel" json:"multi_functional_steering_wheel" form:"multi_functional_steering_wheel"`
  187. SteeringWheelShift string `gorm:"column:steering_wheel_shift" json:"steering_wheel_shift" form:"steering_wheel_shift"`
  188. SteeringWheelHeating string `gorm:"column:steering_wheel_heating" json:"steering_wheel_heating" form:"steering_wheel_heating"`
  189. SteeringWheelRemember string `gorm:"column:steering_wheel_remember" json:"steering_wheel_remember" form:"steering_wheel_remember"`
  190. DrivingComputerDisplay string `gorm:"column:driving_computer_display" json:"driving_computer_display" form:"driving_computer_display"`
  191. FullLcdDashboard string `gorm:"column:full_lcd_dashboard" json:"full_lcd_dashboard" form:"full_lcd_dashboard"`
  192. FullLcdDashboardSize string `gorm:"column:full_lcd_dashboard_size" json:"full_lcd_dashboard_size" form:"full_lcd_dashboard_size"`
  193. HudRisingNumberDisplay string `gorm:"column:hud_rising_number_display" json:"hud_rising_number_display" form:"hud_rising_number_display"`
  194. CarDrivingRecorder string `gorm:"column:car_driving_recorder" json:"car_driving_recorder" form:"car_driving_recorder"`
  195. ActiveNoiseReduction string `gorm:"column:active_noise_reduction" json:"active_noise_reduction" form:"active_noise_reduction"`
  196. MobilePhoneWirelessCharging string `gorm:"column:mobile_phone_wireless_charging" json:"mobile_phone_wireless_charging" form:"mobile_phone_wireless_charging"`
  197. ElectricallyAdjustablePedal string `gorm:"column:electrically_adjustable_pedal" json:"electrically_adjustable_pedal" form:"electrically_adjustable_pedal"`
  198. SeatMaterial string `gorm:"column:seat_material" json:"seat_material" form:"seat_material"`
  199. SportSeat string `gorm:"column:sport_seat" json:"sport_seat" form:"sport_seat"`
  200. MainSeatAdjustmentMode string `gorm:"column:main_seat_adjustment_mode" json:"main_seat_adjustment_mode" form:"main_seat_adjustment_mode"`
  201. AuxiliarySeatAdjustmentMode string `gorm:"column:auxiliary_seat_adjustment_mode" json:"auxiliary_seat_adjustment_mode" form:"auxiliary_seat_adjustment_mode"`
  202. MainElectricAdust string `gorm:"column:main_electric_adust" json:"main_electric_adust" form:"main_electric_adust"`
  203. AuxiliaryElectricAdust string `gorm:"column:auxiliary_electric_adust" json:"auxiliary_electric_adust" form:"auxiliary_electric_adust"`
  204. FrontSeatFunction string `gorm:"column:front_seat_function" json:"front_seat_function" form:"front_seat_function"`
  205. ElectricSeatRemeber string `gorm:"column:electric_seat_remeber" json:"electric_seat_remeber" form:"electric_seat_remeber"`
  206. AuxiliaryAdjustableButton string `gorm:"column:auxiliary_adjustable_button" json:"auxiliary_adjustable_button" form:"auxiliary_adjustable_button"`
  207. SecondRowSeatAdjustment string `gorm:"column:second_row_seat_adjustment" json:"second_row_seat_adjustment" form:"second_row_seat_adjustment"`
  208. RearSeatElectricAdjustment string `gorm:"column:rear_seat_electric_adjustment" json:"rear_seat_electric_adjustment" form:"rear_seat_electric_adjustment"`
  209. RearSeatFunction string `gorm:"column:rear_seat_function" json:"rear_seat_function" form:"rear_seat_function"`
  210. BackFoldTable string `gorm:"column:back_fold_table" json:"back_fold_table" form:"back_fold_table"`
  211. SecondIndependent string `gorm:"column:second_independent" json:"second_independent" form:"second_independent"`
  212. SeatLayoutForm string `gorm:"column:seat_layout_form" json:"seat_layout_form" form:"seat_layout_form"`
  213. BackDownType string `gorm:"column:back_down_type" json:"back_down_type" form:"back_down_type"`
  214. RearSeatPowerDown string `gorm:"column:rear_seat_power_down" json:"rear_seat_power_down" form:"rear_seat_power_down"`
  215. FrontHandrail string `gorm:"column:front_handrail" json:"front_handrail" form:"front_handrail"`
  216. BackHandrail string `gorm:"column:back_handrail" json:"back_handrail" form:"back_handrail"`
  217. BackCupHolder string `gorm:"column:back_cup_holder" json:"back_cup_holder" form:"back_cup_holder"`
  218. HeatingCoolingCupHolder string `gorm:"column:heating_cooling_cup_holder" json:"heating_cooling_cup_holder" form:"heating_cooling_cup_holder"`
  219. CentralColourScreen string `gorm:"column:central_colour_screen" json:"central_colour_screen" form:"central_colour_screen"`
  220. CenterConsoleLargeScreenSize string `gorm:"column:center_console_large_screen_size" json:"center_console_large_screen_size" form:"center_console_large_screen_size"`
  221. Gps string `gorm:"column:gps" json:"gps" form:"gps"`
  222. NavigationTrafficInformationDisplay string `gorm:"column:navigation_traffic_information_display" json:"navigation_traffic_information_display" form:"navigation_traffic_information_display"`
  223. RoadRescueCall string `gorm:"column:road_rescue_call" json:"road_rescue_call" form:"road_rescue_call"`
  224. CentralLcdSplitScreen string `gorm:"column:central_lcd_split_screen" json:"central_lcd_split_screen" form:"central_lcd_split_screen"`
  225. CarPhone string `gorm:"column:car_phone" json:"car_phone" form:"car_phone"`
  226. MobileInternet string `gorm:"column:mobile_internet" json:"mobile_internet" form:"mobile_internet"`
  227. VoiceControl string `gorm:"column:voice_control" json:"voice_control" form:"voice_control"`
  228. GestureControl string `gorm:"column:gesture_control" json:"gesture_control" form:"gesture_control"`
  229. FaceRecognition string `gorm:"column:face_recognition" json:"face_recognition" form:"face_recognition"`
  230. CarInternet string `gorm:"column:car_internet" json:"car_internet" form:"car_internet"`
  231. Ota string `gorm:"column:ota" json:"ota" form:"ota"`
  232. CarTv string `gorm:"column:car_tv" json:"car_tv" form:"car_tv"`
  233. BackLcd string `gorm:"column:back_lcd" json:"back_lcd" form:"back_lcd"`
  234. RearControlMultimedia string `gorm:"column:rear_control_multimedia" json:"rear_control_multimedia" form:"rear_control_multimedia"`
  235. ChargingInterface string `gorm:"column:charging_interface" json:"charging_interface" form:"charging_interface"`
  236. NumberOfInterfaces string `gorm:"column:number_of_interfaces" json:"number_of_interfaces" form:"number_of_interfaces"`
  237. CdDvd string `gorm:"column:cd_dvd" json:"cd_dvd" form:"cd_dvd"`
  238. PowerOf220v string `gorm:"column:power_of220v" json:"power_of220v" form:"power_of220v"`
  239. InterfaceOf12v string `gorm:"column:interface_of12v" json:"interface_of12v" form:"interface_of12v"`
  240. SpeakerBrand string `gorm:"column:speaker_brand" json:"speaker_brand" form:"speaker_brand"`
  241. SpeakerNumber string `gorm:"column:speaker_number" json:"speaker_number" form:"speaker_number"`
  242. Near string `gorm:"column:near" json:"near" form:"near"`
  243. Far string `gorm:"column:far" json:"far" form:"far"`
  244. LightingFeatures string `gorm:"column:lighting_features" json:"lighting_features" form:"lighting_features"`
  245. Daytime string `gorm:"column:daytime" json:"daytime" form:"daytime"`
  246. AdaptiveFarNear string `gorm:"column:adaptive_far_near" json:"adaptive_far_near" form:"adaptive_far_near"`
  247. AutoHead string `gorm:"column:auto_head" json:"auto_head" form:"auto_head"`
  248. SteeringAssistLamp string `gorm:"column:steering_assist_lamp" json:"steering_assist_lamp" form:"steering_assist_lamp"`
  249. SideTurn string `gorm:"column:side_turn" json:"side_turn" form:"side_turn"`
  250. Fog string `gorm:"column:fog" json:"fog" form:"fog"`
  251. HeadlampRainFogMode string `gorm:"column:headlamp_rain_fog_mode" json:"headlamp_rain_fog_mode" form:"headlamp_rain_fog_mode"`
  252. HeightAdjustable string `gorm:"column:height_adjustable" json:"height_adjustable" form:"height_adjustable"`
  253. Clean string `gorm:"column:clean" json:"clean" form:"clean"`
  254. HeadlampDelayOff string `gorm:"column:headlamp_delay_off" json:"headlamp_delay_off" form:"headlamp_delay_off"`
  255. TouchReadingLamp string `gorm:"column:touch_reading_lamp" json:"touch_reading_lamp" form:"touch_reading_lamp"`
  256. Atmosphere string `gorm:"column:atmosphere" json:"atmosphere" form:"atmosphere"`
  257. FrontElectricWindow string `gorm:"column:front_electric_window" json:"front_electric_window" form:"front_electric_window"`
  258. BackElectricWindow string `gorm:"column:back_electric_window" json:"back_electric_window" form:"back_electric_window"`
  259. WindowOneKey string `gorm:"column:window_one_key" json:"window_one_key" form:"window_one_key"`
  260. AntiPinchHand string `gorm:"column:anti_pinch_hand" json:"anti_pinch_hand" form:"anti_pinch_hand"`
  261. MultilayerSoundInsulationGlass string `gorm:"column:multilayer_sound_insulation_glass" json:"multilayer_sound_insulation_glass" form:"multilayer_sound_insulation_glass"`
  262. ExteriorRearviewMirrorFunction string `gorm:"column:exterior_rearview_mirror_function" json:"exterior_rearview_mirror_function" form:"exterior_rearview_mirror_function"`
  263. InteriorRearviewMirrorFunction string `gorm:"column:interior_rearview_mirror_function" json:"interior_rearview_mirror_function" form:"interior_rearview_mirror_function"`
  264. BackSunshade string `gorm:"column:back_sunshade" json:"back_sunshade" form:"back_sunshade"`
  265. BackSideSunshade string `gorm:"column:back_side_sunshade" json:"back_side_sunshade" form:"back_side_sunshade"`
  266. BackSidePrivacy string `gorm:"column:back_side_privacy" json:"back_side_privacy" form:"back_side_privacy"`
  267. Cosmetic string `gorm:"column:cosmetic" json:"cosmetic" form:"cosmetic"`
  268. BackWiper string `gorm:"column:back_wiper" json:"back_wiper" form:"back_wiper"`
  269. FrontWiper string `gorm:"column:front_wiper" json:"front_wiper" form:"front_wiper"`
  270. HeatableSprayNozzle string `gorm:"column:heatable_spray_nozzle" json:"heatable_spray_nozzle" form:"heatable_spray_nozzle"`
  271. AirconditionControlType string `gorm:"column:aircondition_control_type" json:"aircondition_control_type" form:"aircondition_control_type"`
  272. RearIndependentAirConditioner string `gorm:"column:rear_independent_air_conditioner" json:"rear_independent_air_conditioner" form:"rear_independent_air_conditioner"`
  273. RearSeatAirOutlet string `gorm:"column:rear_seat_air_outlet" json:"rear_seat_air_outlet" form:"rear_seat_air_outlet"`
  274. TemperatureZoneControl string `gorm:"column:temperature_zone_control" json:"temperature_zone_control" form:"temperature_zone_control"`
  275. CarAirPurifier string `gorm:"column:car_air_purifier" json:"car_air_purifier" form:"car_air_purifier"`
  276. Pm25Device string `gorm:"column:pm25_device" json:"pm25_device" form:"pm25_device"`
  277. NegativeIonGenerator string `gorm:"column:negative_ion_generator" json:"negative_ion_generator" form:"negative_ion_generator"`
  278. FragranceSystem string `gorm:"column:fragrance_system" json:"fragrance_system" form:"fragrance_system"`
  279. Refrigerator string `gorm:"column:refrigerator" json:"refrigerator" form:"refrigerator"`
  280. AuxiliaryDrivingChip string `gorm:"column:auxiliary_driving_chip" json:"auxiliary_driving_chip" form:"auxiliary_driving_chip"`
  281. ChipComputingPower string `gorm:"column:chip_computing_power" json:"chip_computing_power" form:"chip_computing_power"`
  282. NumberOfCameras string `gorm:"column:number_of_cameras" json:"number_of_cameras" form:"number_of_cameras"`
  283. NumberOfUltrasonicRadars string `gorm:"column:number_of_ultrasonic_radars" json:"number_of_ultrasonic_radars" form:"number_of_ultrasonic_radars"`
  284. NumberOfMillimeterWaveRadars string `gorm:"column:number_of_millimeter_wave_radars" json:"number_of_millimeter_wave_radars" form:"number_of_millimeter_wave_radars"`
  285. NumberOfLidars string `gorm:"column:number_of_lidars" json:"number_of_lidars" form:"number_of_lidars"`
  286. BodyColour string `gorm:"column:body_colour" json:"body_colour" form:"body_colour"`
  287. InteriorColor string `gorm:"column:interior_color" json:"interior_color" form:"interior_color"`
  288. IsOn int64 `gorm:"column:is_on" json:"is_on" form:"is_on"`
  289. CreatedAt int64 `gorm:"column:created_at" json:"created_at" form:"created_at"`
  290. UpdatedAt int64 `gorm:"column:updated_at" json:"updated_at" form:"updated_at"`
  291. }
  292. type StyleList struct {
  293. ID int64 `gorm:"column:id" json:"id" form:"id"`
  294. BrandId string `gorm:"column:brand_id" json:"brand_id" form:"brand_id"`
  295. BrandName string `gorm:"column:brand_name" json:"brand_name" form:"brand_name"`
  296. SeriesId string `gorm:"column:series_id" json:"series_id" form:"series_id"`
  297. SeriesName string `gorm:"column:series_name" json:"series_name" form:"series_name"`
  298. StyleId string `gorm:"column:style_id" json:"style_id" form:"style_id"`
  299. StyleName string `gorm:"column:style_name" json:"style_name" form:"style_name"`
  300. Maker string `gorm:"column:maker" json:"maker" form:"maker"`
  301. IsOn int64 `gorm:"column:is_on" json:"is_on" form:"is_on"`
  302. MaintainId int64 `gorm:"column:maintain_id" json:"maintain_id" form:"maintain_id"`
  303. }
  304. type defalutSyStyleModel struct {
  305. tableName string
  306. }
  307. func NewSyStyleModel() SyStyleModel {
  308. return &defalutSyStyleModel{
  309. tableName: "db_adm_ads.t_adm_ads5",
  310. }
  311. }
  312. func (d *defalutSyStyleModel) Update(db *gorm.DB, values interface{}) error {
  313. return database.Update(db, values, database.Option{
  314. TableName: d.tableName,
  315. })
  316. }
  317. func (d *defalutSyStyleModel) List(db *gorm.DB, pagination *Pagination, join bool) ([]StyleList, error) {
  318. var res []StyleList
  319. option := database.Option{
  320. TableName: d.tableName + " AS t1",
  321. Joins: []string{"LEFT JOIN db_adm_ads.t_adm_ads13 AS t2 ON t1.style_id = t2.style_id"},
  322. Fields: "t1.id, brand_name, series_id, series_name, t1.style_id, style_name, maker, is_on, t2.id AS maintain_id",
  323. Limit: pagination.Limit,
  324. OffSet: pagination.Offset,
  325. }
  326. if join {
  327. option.Joins = []string{}
  328. }
  329. err := database.List(db, &res, option)
  330. return res, err
  331. }
  332. func (d *defalutSyStyleModel) Count(db *gorm.DB, join bool) (int64, error) {
  333. option := database.Option{}
  334. if join {
  335. option = database.Option{
  336. TableName: d.tableName + " AS t1",
  337. Joins: []string{"LEFT JOIN db_adm_ads.t_adm_ads13 AS t2 ON t1.style_id = t2.style_id"},
  338. }
  339. } else {
  340. option = database.Option{
  341. TableName: d.tableName + " AS t1",
  342. }
  343. }
  344. return database.Count(db, option)
  345. }
  346. func (d *defalutSyStyleModel) Get(db *gorm.DB) (*DipSyStyle, error) {
  347. var res DipSyStyle
  348. err := database.Get(db, &res, database.Option{
  349. TableName: d.tableName,
  350. })
  351. return &res, err
  352. }
  353. func (d *defalutSyStyleModel) StyleList(db *gorm.DB, fields string, limit int) ([]DipSyStyle, error) {
  354. var res []DipSyStyle
  355. if fields == "" {
  356. fields = "*"
  357. }
  358. err := database.List(db, &res, database.Option{
  359. TableName: d.tableName,
  360. Fields: fields,
  361. Limit: limit,
  362. })
  363. return res, err
  364. }
  365. func (d *defalutSyStyleModel) StyleListByMap(db *gorm.DB, fields string, limit int) ([]map[string]interface{}, error) {
  366. var res []map[string]interface{}
  367. if fields == "" {
  368. fields = "*"
  369. }
  370. err := database.List(db, &res, database.Option{
  371. TableName: d.tableName,
  372. Fields: fields,
  373. Limit: limit,
  374. })
  375. return res, err
  376. }