sy_style.go 49 KB

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