package model import ( "git.getensh.com/common/gopkgsv2/database" "gorm.io/gorm" ) type Ads10Model interface{ Get(db *gorm.DB) (*Ads10, error) } type Ads10 struct { ID int64 `gorm:"column:id" json:"id"` Vin string `gorm:"column:vin" json:"vin"` CertificateNumber string `gorm:"column:certificate_number" json:"certificate_number"` CertificateDate string `gorm:"column:certificate_date" json:"certificate_date"` VehicleManufacturer string `gorm:"column:vehicle_manufacturer" json:"vehicle_manufacturer"` BrandName string `gorm:"column:brand_name" json:"brand_name"` ModelNo string `gorm:"column:model_no" json:"model_no"` VehicleBodyColorDetail string `gorm:"column:vehicle_body_color_detail" json:"vehicle_body_color_detail"` ChassisModel string `gorm:"column:chassis_model" json:"chassis_model"` ChassisId string `gorm:"column:chassis_id" json:"chassis_id"` ChassisCertificateNumber string `gorm:"column:chassis_certificate_number" json:"chassis_certificate_number"` EngineType string `gorm:"column:engine_type" json:"engine_type"` EngineNo string `gorm:"column:engine_no" json:"engine_no"` FuelTypeDetail string `gorm:"column:fuel_type_detail" json:"fuel_type_detail"` Displacement string `gorm:"column:displacement" json:"displacement"` DisplacementL string `gorm:"column:displacement_l" json:"displacement_l"` RatedPower string `gorm:"column:rated_power" json:"rated_power"` EmissionStandard string `gorm:"column:emission_standard" json:"emission_standard"` OilWear string `gorm:"column:oil_wear" json:"oil_wear"` Long string `gorm:"column:long" json:"long"` Wide string `gorm:"column:wide" json:"wide"` High string `gorm:"column:high" json:"high"` CargoLong string `gorm:"column:cargo_long" json:"cargo_long"` CargoWide string `gorm:"column:cargo_wide" json:"cargo_wide"` CargoHigh string `gorm:"column:cargo_high" json:"cargo_high"` NumberOfLeafSprings string `gorm:"column:number_of_leaf_springs" json:"number_of_leaf_springs"` TyreNumber string `gorm:"column:tyre_number" json:"tyre_number"` TyreSize string `gorm:"column:tyre_size" json:"tyre_size"` FrontWheelDistance string `gorm:"column:front_wheel_distance" json:"front_wheel_distance"` BackWheelDistance string `gorm:"column:back_wheel_distance" json:"back_wheel_distance"` WheelBase string `gorm:"column:wheel_base" json:"wheel_base"` AxleWeight string `gorm:"column:axle_weight" json:"axle_weight"` AxleNumber string `gorm:"column:axle_number" json:"axle_number"` SteeringMode string `gorm:"column:steering_mode" json:"steering_mode"` GrossMass string `gorm:"column:gross_mass" json:"gross_mass"` UnladenMass string `gorm:"column:unladen_mass" json:"unladen_mass"` ApprovedLoad string `gorm:"column:approved_load" json:"approved_load"` LoadMassCoefficient string `gorm:"column:load_mass_coefficient" json:"load_mass_coefficient"` TractionMass string `gorm:"column:traction_mass" json:"traction_mass"` SemitrailerSaddleMaxAllowGrossMass string `gorm:"column:semitrailer_saddle_max_allow_gross_mass" json:"semitrailer_saddle_max_allow_gross_mass"` NumberOfPassengers string `gorm:"column:number_of_passengers" json:"number_of_passengers"` ApprovedNumber string `gorm:"column:approved_number" json:"approved_number"` TopSpeed string `gorm:"column:top_speed" json:"top_speed"` ReleaseDate string `gorm:"column:release_date" json:"release_date"` CreatedAt int64 `gorm:"column:created_at" json:"created_at"` UpdatedAt int64 `gorm:"column:updated_at" json:"updated_at"` } type defalutAds10Model struct { tableName string } func NewAds10Model() Ads10Model { return &defalutAds10Model{ "db_adm_ads.t_adm_ads10", } } func (d *defalutAds10Model) Get(db *gorm.DB) (*Ads10, error) { var res Ads10 err := database.Get(db, &res, database.Option{ TableName: d.tableName, }) return &res, err }