From 9ec329b1d6d6a4b85696846766fd203beaeac144 Mon Sep 17 00:00:00 2001 From: Marek Goc Date: Fri, 27 Mar 2026 23:17:21 +0100 Subject: [PATCH] fix products listing --- app/api/openapi.json | 259 ++++---------- app/db/mariadb.go | 6 +- app/delivery/middleware/auth.go | 5 +- .../web/api/restricted/listProducts.go | 4 +- .../restricted/{meiliSearch.go => search.go} | 67 ++-- app/delivery/web/init.go | 4 +- app/model/customer.go | 2 + app/model/{prestadb => dbmodel}/ps_access.go | 16 +- .../{prestadb => dbmodel}/ps_accessory.go | 16 +- app/model/dbmodel/ps_address.go | 98 ++++++ .../ps_address_format.go | 16 +- .../{prestadb => dbmodel}/ps_admin_filter.go | 26 +- app/model/dbmodel/ps_advice.go | 53 +++ .../{prestadb => dbmodel}/ps_advice_lang.go | 18 +- app/model/{prestadb => dbmodel}/ps_alias.go | 20 +- app/model/dbmodel/ps_attachment.go | 35 ++ .../ps_attachment_lang.go | 20 +- .../{prestadb => dbmodel}/ps_attribute.go | 20 +- .../ps_attribute_group.go | 20 +- .../ps_attribute_group_lang.go | 20 +- .../ps_attribute_group_shop.go | 16 +- .../ps_attribute_impact.go | 22 +- .../ps_attribute_lang.go | 18 +- .../ps_attribute_shop.go | 16 +- .../ps_authorization_role.go | 16 +- app/model/dbmodel/ps_badge.go | 44 +++ app/model/dbmodel/ps_badge_lang.go | 35 ++ app/model/dbmodel/ps_carrier.go | 83 +++++ .../{prestadb => dbmodel}/ps_carrier_group.go | 16 +- .../{prestadb => dbmodel}/ps_carrier_lang.go | 20 +- .../{prestadb => dbmodel}/ps_carrier_shop.go | 16 +- .../ps_carrier_tax_rules_group_shop.go | 18 +- .../{prestadb => dbmodel}/ps_carrier_zone.go | 16 +- app/model/{prestadb => dbmodel}/ps_cart.go | 57 ++- .../ps_cart_cart_rule.go | 16 +- .../{prestadb => dbmodel}/ps_cart_product.go | 27 +- .../{prestadb => dbmodel}/ps_cart_rule.go | 77 +++- .../ps_cart_rule_carrier.go | 16 +- .../ps_cart_rule_combination.go | 16 +- .../ps_cart_rule_country.go | 16 +- .../ps_cart_rule_group.go | 16 +- .../ps_cart_rule_lang.go | 18 +- .../ps_cart_rule_product_rule.go | 18 +- .../ps_cart_rule_product_rule_group.go | 18 +- .../ps_cart_rule_product_rule_value.go | 16 +- .../ps_cart_rule_shop.go | 16 +- .../{prestadb => dbmodel}/ps_category.go | 33 +- .../ps_category_group.go | 16 +- app/model/dbmodel/ps_category_lang.go | 47 +++ .../ps_category_product.go | 18 +- .../{prestadb => dbmodel}/ps_category_shop.go | 18 +- app/model/dbmodel/ps_cms.go | 35 ++ .../{prestadb => dbmodel}/ps_cms_category.go | 25 +- app/model/dbmodel/ps_cms_category_lang.go | 47 +++ .../ps_cms_category_shop.go | 16 +- app/model/dbmodel/ps_cms_lang.go | 47 +++ .../{prestadb => dbmodel}/ps_cms_role.go | 18 +- app/model/dbmodel/ps_cms_role_lang.go | 32 ++ .../{prestadb => dbmodel}/ps_cms_shop.go | 16 +- app/model/dbmodel/ps_condition.go | 59 ++++ .../ps_condition_advice.go | 18 +- .../ps_condition_badge.go | 16 +- .../{prestadb => dbmodel}/ps_configuration.go | 25 +- .../ps_configuration_kpi.go | 25 +- .../ps_configuration_kpi_lang.go | 19 +- .../ps_configuration_lang.go | 19 +- .../{prestadb => dbmodel}/ps_connections.go | 27 +- .../ps_connections_page.go | 19 +- .../ps_connections_source.go | 23 +- app/model/{prestadb => dbmodel}/ps_contact.go | 20 +- app/model/dbmodel/ps_contact_lang.go | 32 ++ .../{prestadb => dbmodel}/ps_contact_shop.go | 16 +- app/model/{prestadb => dbmodel}/ps_country.go | 34 +- .../{prestadb => dbmodel}/ps_country_lang.go | 18 +- .../{prestadb => dbmodel}/ps_country_shop.go | 16 +- app/model/dbmodel/ps_currency.go | 44 +++ .../{prestadb => dbmodel}/ps_currency_lang.go | 20 +- .../{prestadb => dbmodel}/ps_currency_shop.go | 18 +- .../{prestadb => dbmodel}/ps_customer.go | 77 +++- .../ps_customer_group.go | 16 +- app/model/dbmodel/ps_customer_message.go | 59 ++++ .../ps_customer_message_sync_imap.go | 14 +- .../ps_customer_thread.go | 35 +- .../{prestadb => dbmodel}/ps_customization.go | 30 +- .../ps_customization_field.go | 24 +- .../ps_customization_field_lang.go | 20 +- app/model/dbmodel/ps_customized_data.go | 41 +++ .../{prestadb => dbmodel}/ps_date_range.go | 17 +- .../{prestadb => dbmodel}/ps_delivery.go | 28 +- .../ps_dpdpoland_carrier.go | 21 +- .../ps_dpdpoland_country.go | 23 +- .../ps_dpdpoland_manifest.go | 21 +- app/model/dbmodel/ps_dpdpoland_package.go | 86 +++++ app/model/dbmodel/ps_dpdpoland_parcel.go | 56 +++ .../dbmodel/ps_dpdpoland_parcel_product.go | 47 +++ .../ps_dpdpoland_payer_number.go | 23 +- app/model/dbmodel/ps_dpdpoland_price_rule.go | 59 ++++ .../ps_dpdpoland_pudo_cart.go | 16 +- .../dbmodel/ps_dpdpoland_sender_address.go | 59 ++++ .../ps_emailsubscription.go | 29 +- app/model/dbmodel/ps_employee.go | 107 ++++++ .../{prestadb => dbmodel}/ps_employee_shop.go | 16 +- .../ps_export_invoice.go | 18 +- app/model/{prestadb => dbmodel}/ps_feature.go | 16 +- .../{prestadb => dbmodel}/ps_feature_lang.go | 18 +- .../ps_feature_product.go | 18 +- .../{prestadb => dbmodel}/ps_feature_shop.go | 16 +- .../{prestadb => dbmodel}/ps_feature_value.go | 18 +- .../ps_feature_value_lang.go | 18 +- app/model/{prestadb => dbmodel}/ps_gender.go | 16 +- .../{prestadb => dbmodel}/ps_gender_lang.go | 18 +- app/model/{prestadb => dbmodel}/ps_group.go | 23 +- .../{prestadb => dbmodel}/ps_group_lang.go | 18 +- .../ps_group_reduction.go | 20 +- .../{prestadb => dbmodel}/ps_group_shop.go | 16 +- .../ps_gsitemap_sitemap.go | 16 +- app/model/dbmodel/ps_guest.go | 68 ++++ .../{prestadb => dbmodel}/ps_homeslider.go | 16 +- .../ps_homeslider_slides.go | 18 +- .../dbmodel/ps_homeslider_slides_lang.go | 41 +++ app/model/{prestadb => dbmodel}/ps_hook.go | 22 +- .../{prestadb => dbmodel}/ps_hook_alias.go | 18 +- .../{prestadb => dbmodel}/ps_hook_module.go | 20 +- .../ps_hook_module_exceptions.go | 22 +- app/model/{prestadb => dbmodel}/ps_image.go | 20 +- .../{prestadb => dbmodel}/ps_image_lang.go | 18 +- .../{prestadb => dbmodel}/ps_image_shop.go | 20 +- app/model/dbmodel/ps_image_type.go | 47 +++ .../{prestadb => dbmodel}/ps_import_match.go | 20 +- app/model/{prestadb => dbmodel}/ps_info.go | 14 +- app/model/dbmodel/ps_info_lang.go | 32 ++ .../{prestadb => dbmodel}/ps_info_shop.go | 16 +- .../ps_inpost_carrier.go | 24 +- app/model/dbmodel/ps_inpost_cart_choice.go | 35 ++ .../ps_inpost_dispatch_order.go | 25 +- app/model/dbmodel/ps_inpost_dispatch_point.go | 50 +++ .../{prestadb => dbmodel}/ps_inpost_point.go | 17 +- .../ps_inpost_product_template.go | 16 +- app/model/dbmodel/ps_inpost_shipment.go | 95 +++++ .../ps_inpost_shipment_status.go | 16 +- .../ps_inpost_shipment_status_lang.go | 20 +- .../ps_invoice_customer.go | 21 +- app/model/dbmodel/ps_lang.go | 50 +++ .../{prestadb => dbmodel}/ps_lang_shop.go | 16 +- .../ps_layered_category.go | 28 +- .../ps_layered_filter.go | 21 +- .../ps_layered_filter_block.go | 16 +- .../ps_layered_filter_shop.go | 16 +- .../ps_layered_indexable_attribute_group.go | 16 +- ...ed_indexable_attribute_group_lang_value.go | 20 +- ..._layered_indexable_attribute_lang_value.go | 20 +- .../ps_layered_indexable_feature.go | 16 +- ...ps_layered_indexable_feature_lang_value.go | 20 +- ...ered_indexable_feature_value_lang_value.go | 20 +- .../ps_layered_price_index.go | 24 +- .../ps_layered_product_attribute.go | 20 +- app/model/dbmodel/ps_link_block.go | 32 ++ .../ps_link_block_lang.go | 20 +- .../ps_link_block_shop.go | 16 +- .../{prestadb => dbmodel}/ps_linksmenutop.go | 18 +- .../ps_linksmenutop_lang.go | 22 +- app/model/dbmodel/ps_log.go | 50 +++ .../ps_maal_cms_category.go | 25 +- .../dbmodel/ps_maal_cms_category_lang.go | 44 +++ app/model/dbmodel/ps_maal_cms_page.go | 41 +++ app/model/dbmodel/ps_maal_events.go | 44 +++ app/model/dbmodel/ps_maal_events_lang.go | 50 +++ .../ps_maal_invoice_note.go | 17 +- app/model/dbmodel/ps_maal_invoicehelper.go | 44 +++ .../ps_maal_links_blok.go | 16 +- .../ps_maal_links_blok_slides.go | 18 +- .../dbmodel/ps_maal_links_blok_slides_lang.go | 41 +++ .../{prestadb => dbmodel}/ps_maal_slider.go | 16 +- .../ps_maal_slider_slides.go | 18 +- .../dbmodel/ps_maal_slider_slides_lang.go | 41 +++ app/model/{prestadb => dbmodel}/ps_mail.go | 23 +- .../dbmodel/ps_mailalert_customer_oos.go | 38 ++ .../{prestadb => dbmodel}/ps_manufacturer.go | 21 +- app/model/dbmodel/ps_manufacturer_lang.go | 41 +++ .../ps_manufacturer_shop.go | 16 +- .../ps_memcached_servers.go | 20 +- app/model/{prestadb => dbmodel}/ps_message.go | 27 +- .../ps_message_readed.go | 17 +- app/model/{prestadb => dbmodel}/ps_meta.go | 18 +- app/model/dbmodel/ps_meta_lang.go | 41 +++ app/model/{prestadb => dbmodel}/ps_module.go | 20 +- .../{prestadb => dbmodel}/ps_module_access.go | 16 +- .../ps_module_carrier.go | 18 +- .../ps_module_country.go | 18 +- .../ps_module_currency.go | 18 +- .../{prestadb => dbmodel}/ps_module_group.go | 18 +- .../ps_module_history.go | 21 +- .../ps_module_preference.go | 22 +- .../{prestadb => dbmodel}/ps_module_shop.go | 18 +- .../ps_operating_system.go | 16 +- .../{prestadb => dbmodel}/ps_order_carrier.go | 29 +- .../ps_order_cart_rule.go | 28 +- app/model/dbmodel/ps_order_detail.go | 167 +++++++++ .../ps_order_detail_tax.go | 20 +- .../{prestadb => dbmodel}/ps_order_history.go | 21 +- .../{prestadb => dbmodel}/ps_order_invoice.go | 53 ++- .../ps_order_invoice_payment.go | 18 +- .../ps_order_invoice_tax.go | 20 +- .../{prestadb => dbmodel}/ps_order_message.go | 15 +- .../ps_order_message_lang.go | 20 +- app/model/dbmodel/ps_order_notes.go | 41 +++ app/model/dbmodel/ps_order_payment.go | 62 ++++ app/model/dbmodel/ps_order_payu_payments.go | 47 +++ .../{prestadb => dbmodel}/ps_order_return.go | 25 +- .../ps_order_return_detail.go | 20 +- .../ps_order_return_state.go | 16 +- .../ps_order_return_state_lang.go | 18 +- app/model/dbmodel/ps_order_slip.go | 68 ++++ app/model/dbmodel/ps_order_slip_detail.go | 47 +++ .../ps_order_slip_detail_tax.go | 20 +- app/model/dbmodel/ps_order_state.go | 62 ++++ .../ps_order_state_lang.go | 20 +- app/model/{prestadb => dbmodel}/ps_orders.go | 103 +++++- app/model/{prestadb => dbmodel}/ps_pack.go | 20 +- app/model/{prestadb => dbmodel}/ps_page.go | 18 +- .../{prestadb => dbmodel}/ps_page_type.go | 16 +- app/model/dbmodel/ps_page_viewed.go | 35 ++ .../{prestadb => dbmodel}/ps_pagenotfound.go | 23 +- app/model/dbmodel/ps_pocztapolskaen_order.go | 68 ++++ .../dbmodel/ps_pocztapolskaen_order_set.go | 53 +++ .../dbmodel/ps_pocztapolskaen_post_office.go | 41 +++ .../ps_pocztapolskaen_profile_address.go | 56 +++ app/model/dbmodel/ps_product.go | 188 ++++++++++ .../ps_product_attachment.go | 16 +- .../ps_product_attribute.go | 49 ++- .../ps_product_attribute_combination.go | 16 +- .../ps_product_attribute_image.go | 16 +- .../dbmodel/ps_product_attribute_shop.go | 62 ++++ .../ps_product_carrier.go | 18 +- .../ps_product_country_tax.go | 18 +- app/model/dbmodel/ps_product_download.go | 53 +++ .../ps_product_group_reduction_cache.go | 18 +- app/model/dbmodel/ps_product_lang.go | 65 ++++ .../{prestadb => dbmodel}/ps_product_sale.go | 19 +- .../{prestadb => dbmodel}/ps_product_shop.go | 77 +++- .../ps_product_supplier.go | 26 +- .../{prestadb => dbmodel}/ps_product_tag.go | 18 +- app/model/{prestadb => dbmodel}/ps_profile.go | 14 +- .../{prestadb => dbmodel}/ps_profile_lang.go | 18 +- app/model/dbmodel/ps_psgdpr_consent.go | 44 +++ .../ps_psgdpr_consent_lang.go | 20 +- app/model/dbmodel/ps_psgdpr_log.go | 47 +++ .../ps_pshow_pshowproducttabs_hook.go | 18 +- .../{prestadb => dbmodel}/ps_quick_access.go | 18 +- .../ps_quick_access_lang.go | 18 +- .../{prestadb => dbmodel}/ps_range_price.go | 20 +- .../{prestadb => dbmodel}/ps_range_weight.go | 20 +- .../{prestadb => dbmodel}/ps_reassurance.go | 18 +- .../ps_reassurance_lang.go | 18 +- app/model/dbmodel/ps_referrer.go | 68 ++++ .../ps_referrer_cache.go | 16 +- app/model/dbmodel/ps_referrer_shop.go | 50 +++ .../{prestadb => dbmodel}/ps_request_sql.go | 18 +- .../ps_required_field.go | 18 +- app/model/{prestadb => dbmodel}/ps_risk.go | 18 +- .../{prestadb => dbmodel}/ps_risk_lang.go | 18 +- .../{prestadb => dbmodel}/ps_search_engine.go | 18 +- .../{prestadb => dbmodel}/ps_search_index.go | 18 +- .../{prestadb => dbmodel}/ps_search_word.go | 20 +- .../{prestadb => dbmodel}/ps_sekeyword.go | 21 +- app/model/dbmodel/ps_shop.go | 41 +++ app/model/dbmodel/ps_shop_company.go | 68 ++++ app/model/dbmodel/ps_shop_group.go | 41 +++ .../{prestadb => dbmodel}/ps_shop_url.go | 28 +- .../{prestadb => dbmodel}/ps_smarty_cache.go | 21 +- .../ps_smarty_last_flush.go | 15 +- .../ps_smarty_lazy_cache.go | 21 +- .../ps_specific_price.go | 47 ++- .../ps_specific_price_priority.go | 18 +- .../ps_specific_price_rule.go | 37 +- .../ps_specific_price_rule_condition.go | 20 +- .../ps_specific_price_rule_condition_group.go | 16 +- app/model/{prestadb => dbmodel}/ps_state.go | 26 +- .../{prestadb => dbmodel}/ps_statssearch.go | 23 +- app/model/dbmodel/ps_stock.go | 53 +++ .../ps_stock_available.go | 34 +- app/model/dbmodel/ps_stock_mvt.go | 68 ++++ .../ps_stock_mvt_reason.go | 21 +- .../ps_stock_mvt_reason_lang.go | 18 +- app/model/dbmodel/ps_store.go | 62 ++++ app/model/dbmodel/ps_store_lang.go | 41 +++ .../{prestadb => dbmodel}/ps_store_shop.go | 16 +- .../{prestadb => dbmodel}/ps_supplier.go | 21 +- app/model/dbmodel/ps_supplier_lang.go | 38 ++ .../{prestadb => dbmodel}/ps_supplier_shop.go | 16 +- app/model/dbmodel/ps_supply_order.go | 80 +++++ app/model/dbmodel/ps_supply_order_detail.go | 92 +++++ .../ps_supply_order_history.go | 25 +- .../ps_supply_order_receipt_history.go | 27 +- app/model/dbmodel/ps_supply_order_state.go | 41 +++ .../ps_supply_order_state_lang.go | 18 +- app/model/dbmodel/ps_tab.go | 44 +++ .../{prestadb => dbmodel}/ps_tab_advice.go | 16 +- .../{prestadb => dbmodel}/ps_tab_lang.go | 18 +- .../ps_tab_module_preference.go | 20 +- app/model/{prestadb => dbmodel}/ps_tag.go | 18 +- .../{prestadb => dbmodel}/ps_tag_count.go | 22 +- app/model/dbmodel/ps_tax.go | 32 ++ .../{prestadb => dbmodel}/ps_tax_lang.go | 18 +- .../{prestadb => dbmodel}/ps_tax_rule.go | 30 +- .../ps_tax_rules_group.go | 23 +- .../ps_tax_rules_group_shop.go | 16 +- .../{prestadb => dbmodel}/ps_timezone.go | 16 +- .../{prestadb => dbmodel}/ps_translation.go | 24 +- app/model/{prestadb => dbmodel}/ps_unit.go | 16 +- app/model/dbmodel/ps_unit_lang.go | 32 ++ app/model/dbmodel/ps_warehouse.go | 44 +++ .../ps_warehouse_carrier.go | 16 +- .../ps_warehouse_product_location.go | 22 +- .../ps_warehouse_shop.go | 16 +- .../{prestadb => dbmodel}/ps_web_browser.go | 16 +- .../ps_webservice_account.go | 26 +- .../ps_webservice_account_shop.go | 16 +- .../ps_webservice_permission.go | 20 +- app/model/{prestadb => dbmodel}/ps_zone.go | 18 +- .../{prestadb => dbmodel}/ps_zone_shop.go | 16 +- app/model/prestadb/ps_address.go | 45 --- app/model/prestadb/ps_advice.go | 27 -- app/model/prestadb/ps_attachment.go | 21 -- app/model/prestadb/ps_badge.go | 24 -- app/model/prestadb/ps_badge_lang.go | 21 -- app/model/prestadb/ps_carrier.go | 37 -- app/model/prestadb/ps_category_lang.go | 25 -- app/model/prestadb/ps_cms.go | 21 -- app/model/prestadb/ps_cms_category_lang.go | 25 -- app/model/prestadb/ps_cms_lang.go | 25 -- app/model/prestadb/ps_cms_role_lang.go | 20 -- app/model/prestadb/ps_condition.go | 32 -- app/model/prestadb/ps_contact_lang.go | 20 -- app/model/prestadb/ps_currency.go | 24 -- app/model/prestadb/ps_customer_message.go | 32 -- app/model/prestadb/ps_customized_data.go | 23 -- app/model/prestadb/ps_dpdpoland_package.go | 41 --- app/model/prestadb/ps_dpdpoland_parcel.go | 31 -- .../prestadb/ps_dpdpoland_parcel_product.go | 28 -- app/model/prestadb/ps_dpdpoland_price_rule.go | 32 -- .../prestadb/ps_dpdpoland_sender_address.go | 32 -- app/model/prestadb/ps_employee.go | 48 --- app/model/prestadb/ps_guest.go | 32 -- .../prestadb/ps_homeslider_slides_lang.go | 23 -- app/model/prestadb/ps_image_type.go | 25 -- app/model/prestadb/ps_info_lang.go | 20 -- app/model/prestadb/ps_inpost_cart_choice.go | 21 -- .../prestadb/ps_inpost_dispatch_point.go | 26 -- app/model/prestadb/ps_inpost_shipment.go | 44 --- app/model/prestadb/ps_lang.go | 26 -- app/model/prestadb/ps_link_block.go | 20 -- app/model/prestadb/ps_log.go | 29 -- .../prestadb/ps_maal_cms_category_lang.go | 24 -- app/model/prestadb/ps_maal_cms_page.go | 26 -- app/model/prestadb/ps_maal_events.go | 27 -- app/model/prestadb/ps_maal_events_lang.go | 26 -- app/model/prestadb/ps_maal_invoicehelper.go | 27 -- .../ps_maal_links_blok_slides_lang.go | 23 -- .../prestadb/ps_maal_slider_slides_lang.go | 23 -- .../prestadb/ps_mailalert_customer_oos.go | 22 -- app/model/prestadb/ps_manufacturer_lang.go | 23 -- app/model/prestadb/ps_meta_lang.go | 23 -- app/model/prestadb/ps_order_detail.go | 68 ---- app/model/prestadb/ps_order_notes.go | 26 -- app/model/prestadb/ps_order_payment.go | 33 -- app/model/prestadb/ps_order_payu_payments.go | 28 -- app/model/prestadb/ps_order_slip.go | 35 -- app/model/prestadb/ps_order_slip_detail.go | 25 -- app/model/prestadb/ps_order_state.go | 30 -- app/model/prestadb/ps_page_viewed.go | 21 -- app/model/prestadb/ps_pocztapolskaen_order.go | 35 -- .../prestadb/ps_pocztapolskaen_order_set.go | 30 -- .../prestadb/ps_pocztapolskaen_post_office.go | 26 -- .../ps_pocztapolskaen_profile_address.go | 31 -- app/model/prestadb/ps_product.go | 75 ---- .../prestadb/ps_product_attribute_shop.go | 33 -- app/model/prestadb/ps_product_download.go | 30 -- app/model/prestadb/ps_product_lang.go | 31 -- app/model/prestadb/ps_psgdpr_consent.go | 27 -- app/model/prestadb/ps_psgdpr_log.go | 28 -- app/model/prestadb/ps_referrer.go | 35 -- app/model/prestadb/ps_referrer_shop.go | 26 -- app/model/prestadb/ps_shop.go | 23 -- app/model/prestadb/ps_shop_company.go | 35 -- app/model/prestadb/ps_shop_group.go | 23 -- app/model/prestadb/ps_stock.go | 27 -- app/model/prestadb/ps_stock_mvt.go | 35 -- app/model/prestadb/ps_store.go | 33 -- app/model/prestadb/ps_store_lang.go | 23 -- app/model/prestadb/ps_supplier_lang.go | 22 -- app/model/prestadb/ps_supply_order.go | 39 -- app/model/prestadb/ps_supply_order_detail.go | 40 --- app/model/prestadb/ps_supply_order_state.go | 23 -- app/model/prestadb/ps_tab.go | 24 -- app/model/prestadb/ps_tax.go | 20 -- app/model/prestadb/ps_unit_lang.go | 20 -- app/model/prestadb/ps_warehouse.go | 24 -- app/model/productDescription.go | 40 +-- app/repos/attributeRepo/attributeRepo.go | 109 ++++++ app/repos/categoriesRepo/categoriesRepo.go | 35 +- app/repos/categoryRepo/categoryRepo.go | 44 +++ app/repos/featureRepo/featureRepo.go | 95 +++++ .../listProductsRepo/listProductsRepo.go | 41 ++- .../localeSelectorRepo/localeSelectorRepo.go | 18 +- .../productDescriptionRepo.go | 252 +++++++------ app/repos/searchRepo/searchRepo.go | 82 +++++ app/service/authService/auth.go | 27 +- app/service/meiliService/blank.json | 8 - app/service/meiliService/indexation_params.go | 230 ++++++++++++ app/service/meiliService/meiliService.go | 333 +++++++++++------- app/service/searchService/searchService.go | 233 ++++++++++++ app/utils/const_data/consts.go | 3 + app/utils/genModels/genModels.go | 6 +- app/utils/query/query_params/params_query.go | 1 - app/utils/query/query_params/parse_sort.go | 2 +- .../query_params/where_scope_from_query.go | 1 - bruno/api_v1/.gitignore | 9 + bruno/api_v1/Change Locales.yml | 21 ++ bruno/api_v1/Create Search Index.yml | 20 ++ bruno/api_v1/Delete Index - MeiliSearch.yml | 17 + bruno/api_v1/Products List.yml | 36 ++ bruno/api_v1/Search Index Settings.yml | 17 + bruno/api_v1/Search Items.yml | 28 ++ bruno/api_v1/environments/dev.yml | 6 + bruno/api_v1/opencollection.yml | 10 + go.mod | 10 +- go.sum | 15 + .../20260302163122_create_tables.sql | 29 ++ 429 files changed, 9816 insertions(+), 3774 deletions(-) rename app/delivery/web/api/restricted/{meiliSearch.go => search.go} (61%) rename app/model/{prestadb => dbmodel}/ps_access.go (50%) rename app/model/{prestadb => dbmodel}/ps_accessory.go (56%) create mode 100644 app/model/dbmodel/ps_address.go rename app/model/{prestadb => dbmodel}/ps_address_format.go (54%) rename app/model/{prestadb => dbmodel}/ps_admin_filter.go (55%) create mode 100644 app/model/dbmodel/ps_advice.go rename app/model/{prestadb => dbmodel}/ps_advice_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_alias.go (51%) create mode 100644 app/model/dbmodel/ps_attachment.go rename app/model/{prestadb => dbmodel}/ps_attachment_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_attribute.go (52%) rename app/model/{prestadb => dbmodel}/ps_attribute_group.go (51%) rename app/model/{prestadb => dbmodel}/ps_attribute_group_lang.go (54%) rename app/model/{prestadb => dbmodel}/ps_attribute_group_shop.go (59%) rename app/model/{prestadb => dbmodel}/ps_attribute_impact.go (53%) rename app/model/{prestadb => dbmodel}/ps_attribute_lang.go (55%) rename app/model/{prestadb => dbmodel}/ps_attribute_shop.go (58%) rename app/model/{prestadb => dbmodel}/ps_authorization_role.go (57%) create mode 100644 app/model/dbmodel/ps_badge.go create mode 100644 app/model/dbmodel/ps_badge_lang.go create mode 100644 app/model/dbmodel/ps_carrier.go rename app/model/{prestadb => dbmodel}/ps_carrier_group.go (53%) rename app/model/{prestadb => dbmodel}/ps_carrier_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_carrier_shop.go (55%) rename app/model/{prestadb => dbmodel}/ps_carrier_tax_rules_group_shop.go (54%) rename app/model/{prestadb => dbmodel}/ps_carrier_zone.go (53%) rename app/model/{prestadb => dbmodel}/ps_cart.go (52%) rename app/model/{prestadb => dbmodel}/ps_cart_cart_rule.go (55%) rename app/model/{prestadb => dbmodel}/ps_cart_product.go (53%) rename app/model/{prestadb => dbmodel}/ps_cart_rule.go (51%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_carrier.go (54%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_combination.go (58%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_country.go (54%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_group.go (54%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_lang.go (51%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_product_rule.go (54%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_product_rule_group.go (55%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_product_rule_value.go (57%) rename app/model/{prestadb => dbmodel}/ps_cart_rule_shop.go (54%) rename app/model/{prestadb => dbmodel}/ps_category.go (56%) rename app/model/{prestadb => dbmodel}/ps_category_group.go (57%) create mode 100644 app/model/dbmodel/ps_category_lang.go rename app/model/{prestadb => dbmodel}/ps_category_product.go (58%) rename app/model/{prestadb => dbmodel}/ps_category_shop.go (51%) create mode 100644 app/model/dbmodel/ps_cms.go rename app/model/{prestadb => dbmodel}/ps_cms_category.go (50%) create mode 100644 app/model/dbmodel/ps_cms_category_lang.go rename app/model/{prestadb => dbmodel}/ps_cms_category_shop.go (57%) create mode 100644 app/model/dbmodel/ps_cms_lang.go rename app/model/{prestadb => dbmodel}/ps_cms_role.go (53%) create mode 100644 app/model/dbmodel/ps_cms_role_lang.go rename app/model/{prestadb => dbmodel}/ps_cms_shop.go (54%) create mode 100644 app/model/dbmodel/ps_condition.go rename app/model/{prestadb => dbmodel}/ps_condition_advice.go (52%) rename app/model/{prestadb => dbmodel}/ps_condition_badge.go (54%) rename app/model/{prestadb => dbmodel}/ps_configuration.go (51%) rename app/model/{prestadb => dbmodel}/ps_configuration_kpi.go (52%) rename app/model/{prestadb => dbmodel}/ps_configuration_kpi_lang.go (53%) rename app/model/{prestadb => dbmodel}/ps_configuration_lang.go (52%) rename app/model/{prestadb => dbmodel}/ps_connections.go (51%) rename app/model/{prestadb => dbmodel}/ps_connections_page.go (52%) rename app/model/{prestadb => dbmodel}/ps_connections_source.go (53%) rename app/model/{prestadb => dbmodel}/ps_contact.go (50%) create mode 100644 app/model/dbmodel/ps_contact_lang.go rename app/model/{prestadb => dbmodel}/ps_contact_shop.go (55%) rename app/model/{prestadb => dbmodel}/ps_country.go (50%) rename app/model/{prestadb => dbmodel}/ps_country_lang.go (51%) rename app/model/{prestadb => dbmodel}/ps_country_shop.go (55%) create mode 100644 app/model/dbmodel/ps_currency.go rename app/model/{prestadb => dbmodel}/ps_currency_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_currency_shop.go (53%) rename app/model/{prestadb => dbmodel}/ps_customer.go (50%) rename app/model/{prestadb => dbmodel}/ps_customer_group.go (57%) create mode 100644 app/model/dbmodel/ps_customer_message.go rename app/model/{prestadb => dbmodel}/ps_customer_message_sync_imap.go (63%) rename app/model/{prestadb => dbmodel}/ps_customer_thread.go (50%) rename app/model/{prestadb => dbmodel}/ps_customization.go (50%) rename app/model/{prestadb => dbmodel}/ps_customization_field.go (50%) rename app/model/{prestadb => dbmodel}/ps_customization_field_lang.go (53%) create mode 100644 app/model/dbmodel/ps_customized_data.go rename app/model/{prestadb => dbmodel}/ps_date_range.go (53%) rename app/model/{prestadb => dbmodel}/ps_delivery.go (50%) rename app/model/{prestadb => dbmodel}/ps_dpdpoland_carrier.go (52%) rename app/model/{prestadb => dbmodel}/ps_dpdpoland_country.go (51%) rename app/model/{prestadb => dbmodel}/ps_dpdpoland_manifest.go (53%) create mode 100644 app/model/dbmodel/ps_dpdpoland_package.go create mode 100644 app/model/dbmodel/ps_dpdpoland_parcel.go create mode 100644 app/model/dbmodel/ps_dpdpoland_parcel_product.go rename app/model/{prestadb => dbmodel}/ps_dpdpoland_payer_number.go (52%) create mode 100644 app/model/dbmodel/ps_dpdpoland_price_rule.go rename app/model/{prestadb => dbmodel}/ps_dpdpoland_pudo_cart.go (55%) create mode 100644 app/model/dbmodel/ps_dpdpoland_sender_address.go rename app/model/{prestadb => dbmodel}/ps_emailsubscription.go (50%) create mode 100644 app/model/dbmodel/ps_employee.go rename app/model/{prestadb => dbmodel}/ps_employee_shop.go (55%) rename app/model/{prestadb => dbmodel}/ps_export_invoice.go (52%) rename app/model/{prestadb => dbmodel}/ps_feature.go (53%) rename app/model/{prestadb => dbmodel}/ps_feature_lang.go (53%) rename app/model/{prestadb => dbmodel}/ps_feature_product.go (59%) rename app/model/{prestadb => dbmodel}/ps_feature_shop.go (55%) rename app/model/{prestadb => dbmodel}/ps_feature_value.go (53%) rename app/model/{prestadb => dbmodel}/ps_feature_value_lang.go (52%) rename app/model/{prestadb => dbmodel}/ps_gender.go (53%) rename app/model/{prestadb => dbmodel}/ps_gender_lang.go (52%) rename app/model/{prestadb => dbmodel}/ps_group.go (51%) rename app/model/{prestadb => dbmodel}/ps_group_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_group_reduction.go (54%) rename app/model/{prestadb => dbmodel}/ps_group_shop.go (54%) rename app/model/{prestadb => dbmodel}/ps_gsitemap_sitemap.go (53%) create mode 100644 app/model/dbmodel/ps_guest.go rename app/model/{prestadb => dbmodel}/ps_homeslider.go (54%) rename app/model/{prestadb => dbmodel}/ps_homeslider_slides.go (53%) create mode 100644 app/model/dbmodel/ps_homeslider_slides_lang.go rename app/model/{prestadb => dbmodel}/ps_hook.go (50%) rename app/model/{prestadb => dbmodel}/ps_hook_alias.go (53%) rename app/model/{prestadb => dbmodel}/ps_hook_module.go (54%) rename app/model/{prestadb => dbmodel}/ps_hook_module_exceptions.go (53%) rename app/model/{prestadb => dbmodel}/ps_image.go (58%) rename app/model/{prestadb => dbmodel}/ps_image_lang.go (51%) rename app/model/{prestadb => dbmodel}/ps_image_shop.go (54%) create mode 100644 app/model/dbmodel/ps_image_type.go rename app/model/{prestadb => dbmodel}/ps_import_match.go (51%) rename app/model/{prestadb => dbmodel}/ps_info.go (55%) create mode 100644 app/model/dbmodel/ps_info_lang.go rename app/model/{prestadb => dbmodel}/ps_info_shop.go (52%) rename app/model/{prestadb => dbmodel}/ps_inpost_carrier.go (50%) create mode 100644 app/model/dbmodel/ps_inpost_cart_choice.go rename app/model/{prestadb => dbmodel}/ps_inpost_dispatch_order.go (50%) create mode 100644 app/model/dbmodel/ps_inpost_dispatch_point.go rename app/model/{prestadb => dbmodel}/ps_inpost_point.go (53%) rename app/model/{prestadb => dbmodel}/ps_inpost_product_template.go (56%) create mode 100644 app/model/dbmodel/ps_inpost_shipment.go rename app/model/{prestadb => dbmodel}/ps_inpost_shipment_status.go (58%) rename app/model/{prestadb => dbmodel}/ps_inpost_shipment_status_lang.go (52%) rename app/model/{prestadb => dbmodel}/ps_invoice_customer.go (56%) create mode 100644 app/model/dbmodel/ps_lang.go rename app/model/{prestadb => dbmodel}/ps_lang_shop.go (57%) rename app/model/{prestadb => dbmodel}/ps_layered_category.go (53%) rename app/model/{prestadb => dbmodel}/ps_layered_filter.go (51%) rename app/model/{prestadb => dbmodel}/ps_layered_filter_block.go (55%) rename app/model/{prestadb => dbmodel}/ps_layered_filter_shop.go (56%) rename app/model/{prestadb => dbmodel}/ps_layered_indexable_attribute_group.go (57%) rename app/model/{prestadb => dbmodel}/ps_layered_indexable_attribute_group_lang_value.go (53%) rename app/model/{prestadb => dbmodel}/ps_layered_indexable_attribute_lang_value.go (52%) rename app/model/{prestadb => dbmodel}/ps_layered_indexable_feature.go (56%) rename app/model/{prestadb => dbmodel}/ps_layered_indexable_feature_lang_value.go (52%) rename app/model/{prestadb => dbmodel}/ps_layered_indexable_feature_value_lang_value.go (52%) rename app/model/{prestadb => dbmodel}/ps_layered_price_index.go (51%) rename app/model/{prestadb => dbmodel}/ps_layered_product_attribute.go (57%) create mode 100644 app/model/dbmodel/ps_link_block.go rename app/model/{prestadb => dbmodel}/ps_link_block_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_link_block_shop.go (55%) rename app/model/{prestadb => dbmodel}/ps_linksmenutop.go (53%) rename app/model/{prestadb => dbmodel}/ps_linksmenutop_lang.go (58%) create mode 100644 app/model/dbmodel/ps_log.go rename app/model/{prestadb => dbmodel}/ps_maal_cms_category.go (53%) create mode 100644 app/model/dbmodel/ps_maal_cms_category_lang.go create mode 100644 app/model/dbmodel/ps_maal_cms_page.go create mode 100644 app/model/dbmodel/ps_maal_events.go create mode 100644 app/model/dbmodel/ps_maal_events_lang.go rename app/model/{prestadb => dbmodel}/ps_maal_invoice_note.go (54%) create mode 100644 app/model/dbmodel/ps_maal_invoicehelper.go rename app/model/{prestadb => dbmodel}/ps_maal_links_blok.go (55%) rename app/model/{prestadb => dbmodel}/ps_maal_links_blok_slides.go (54%) create mode 100644 app/model/dbmodel/ps_maal_links_blok_slides_lang.go rename app/model/{prestadb => dbmodel}/ps_maal_slider.go (54%) rename app/model/{prestadb => dbmodel}/ps_maal_slider_slides.go (53%) create mode 100644 app/model/dbmodel/ps_maal_slider_slides_lang.go rename app/model/{prestadb => dbmodel}/ps_mail.go (51%) create mode 100644 app/model/dbmodel/ps_mailalert_customer_oos.go rename app/model/{prestadb => dbmodel}/ps_manufacturer.go (51%) create mode 100644 app/model/dbmodel/ps_manufacturer_lang.go rename app/model/{prestadb => dbmodel}/ps_manufacturer_shop.go (56%) rename app/model/{prestadb => dbmodel}/ps_memcached_servers.go (52%) rename app/model/{prestadb => dbmodel}/ps_message.go (51%) rename app/model/{prestadb => dbmodel}/ps_message_readed.go (53%) rename app/model/{prestadb => dbmodel}/ps_meta.go (53%) create mode 100644 app/model/dbmodel/ps_meta_lang.go rename app/model/{prestadb => dbmodel}/ps_module.go (52%) rename app/model/{prestadb => dbmodel}/ps_module_access.go (53%) rename app/model/{prestadb => dbmodel}/ps_module_carrier.go (52%) rename app/model/{prestadb => dbmodel}/ps_module_country.go (52%) rename app/model/{prestadb => dbmodel}/ps_module_currency.go (53%) rename app/model/{prestadb => dbmodel}/ps_module_group.go (51%) rename app/model/{prestadb => dbmodel}/ps_module_history.go (51%) rename app/model/{prestadb => dbmodel}/ps_module_preference.go (52%) rename app/model/{prestadb => dbmodel}/ps_module_shop.go (53%) rename app/model/{prestadb => dbmodel}/ps_operating_system.go (55%) rename app/model/{prestadb => dbmodel}/ps_order_carrier.go (50%) rename app/model/{prestadb => dbmodel}/ps_order_cart_rule.go (50%) create mode 100644 app/model/dbmodel/ps_order_detail.go rename app/model/{prestadb => dbmodel}/ps_order_detail_tax.go (54%) rename app/model/{prestadb => dbmodel}/ps_order_history.go (54%) rename app/model/{prestadb => dbmodel}/ps_order_invoice.go (50%) rename app/model/{prestadb => dbmodel}/ps_order_invoice_payment.go (55%) rename app/model/{prestadb => dbmodel}/ps_order_invoice_tax.go (52%) rename app/model/{prestadb => dbmodel}/ps_order_message.go (56%) rename app/model/{prestadb => dbmodel}/ps_order_message_lang.go (51%) create mode 100644 app/model/dbmodel/ps_order_notes.go create mode 100644 app/model/dbmodel/ps_order_payment.go create mode 100644 app/model/dbmodel/ps_order_payu_payments.go rename app/model/{prestadb => dbmodel}/ps_order_return.go (51%) rename app/model/{prestadb => dbmodel}/ps_order_return_detail.go (50%) rename app/model/{prestadb => dbmodel}/ps_order_return_state.go (55%) rename app/model/{prestadb => dbmodel}/ps_order_return_state_lang.go (54%) create mode 100644 app/model/dbmodel/ps_order_slip.go create mode 100644 app/model/dbmodel/ps_order_slip_detail.go rename app/model/{prestadb => dbmodel}/ps_order_slip_detail_tax.go (54%) create mode 100644 app/model/dbmodel/ps_order_state.go rename app/model/{prestadb => dbmodel}/ps_order_state_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_orders.go (50%) rename app/model/{prestadb => dbmodel}/ps_pack.go (52%) rename app/model/{prestadb => dbmodel}/ps_page.go (53%) rename app/model/{prestadb => dbmodel}/ps_page_type.go (55%) create mode 100644 app/model/dbmodel/ps_page_viewed.go rename app/model/{prestadb => dbmodel}/ps_pagenotfound.go (51%) create mode 100644 app/model/dbmodel/ps_pocztapolskaen_order.go create mode 100644 app/model/dbmodel/ps_pocztapolskaen_order_set.go create mode 100644 app/model/dbmodel/ps_pocztapolskaen_post_office.go create mode 100644 app/model/dbmodel/ps_pocztapolskaen_profile_address.go create mode 100644 app/model/dbmodel/ps_product.go rename app/model/{prestadb => dbmodel}/ps_product_attachment.go (54%) rename app/model/{prestadb => dbmodel}/ps_product_attribute.go (51%) rename app/model/{prestadb => dbmodel}/ps_product_attribute_combination.go (63%) rename app/model/{prestadb => dbmodel}/ps_product_attribute_image.go (57%) create mode 100644 app/model/dbmodel/ps_product_attribute_shop.go rename app/model/{prestadb => dbmodel}/ps_product_carrier.go (52%) rename app/model/{prestadb => dbmodel}/ps_product_country_tax.go (52%) create mode 100644 app/model/dbmodel/ps_product_download.go rename app/model/{prestadb => dbmodel}/ps_product_group_reduction_cache.go (54%) create mode 100644 app/model/dbmodel/ps_product_lang.go rename app/model/{prestadb => dbmodel}/ps_product_sale.go (52%) rename app/model/{prestadb => dbmodel}/ps_product_shop.go (50%) rename app/model/{prestadb => dbmodel}/ps_product_supplier.go (53%) rename app/model/{prestadb => dbmodel}/ps_product_tag.go (54%) rename app/model/{prestadb => dbmodel}/ps_profile.go (56%) rename app/model/{prestadb => dbmodel}/ps_profile_lang.go (51%) create mode 100644 app/model/dbmodel/ps_psgdpr_consent.go rename app/model/{prestadb => dbmodel}/ps_psgdpr_consent_lang.go (51%) create mode 100644 app/model/dbmodel/ps_psgdpr_log.go rename app/model/{prestadb => dbmodel}/ps_pshow_pshowproducttabs_hook.go (54%) rename app/model/{prestadb => dbmodel}/ps_quick_access.go (52%) rename app/model/{prestadb => dbmodel}/ps_quick_access_lang.go (52%) rename app/model/{prestadb => dbmodel}/ps_range_price.go (54%) rename app/model/{prestadb => dbmodel}/ps_range_weight.go (54%) rename app/model/{prestadb => dbmodel}/ps_reassurance.go (52%) rename app/model/{prestadb => dbmodel}/ps_reassurance_lang.go (53%) create mode 100644 app/model/dbmodel/ps_referrer.go rename app/model/{prestadb => dbmodel}/ps_referrer_cache.go (54%) create mode 100644 app/model/dbmodel/ps_referrer_shop.go rename app/model/{prestadb => dbmodel}/ps_request_sql.go (52%) rename app/model/{prestadb => dbmodel}/ps_required_field.go (54%) rename app/model/{prestadb => dbmodel}/ps_risk.go (50%) rename app/model/{prestadb => dbmodel}/ps_risk_lang.go (52%) rename app/model/{prestadb => dbmodel}/ps_search_engine.go (52%) rename app/model/{prestadb => dbmodel}/ps_search_index.go (54%) rename app/model/{prestadb => dbmodel}/ps_search_word.go (54%) rename app/model/{prestadb => dbmodel}/ps_sekeyword.go (51%) create mode 100644 app/model/dbmodel/ps_shop.go create mode 100644 app/model/dbmodel/ps_shop_company.go create mode 100644 app/model/dbmodel/ps_shop_group.go rename app/model/{prestadb => dbmodel}/ps_shop_url.go (54%) rename app/model/{prestadb => dbmodel}/ps_smarty_cache.go (54%) rename app/model/{prestadb => dbmodel}/ps_smarty_last_flush.go (58%) rename app/model/{prestadb => dbmodel}/ps_smarty_lazy_cache.go (51%) rename app/model/{prestadb => dbmodel}/ps_specific_price.go (57%) rename app/model/{prestadb => dbmodel}/ps_specific_price_priority.go (55%) rename app/model/{prestadb => dbmodel}/ps_specific_price_rule.go (51%) rename app/model/{prestadb => dbmodel}/ps_specific_price_rule_condition.go (55%) rename app/model/{prestadb => dbmodel}/ps_specific_price_rule_condition_group.go (57%) rename app/model/{prestadb => dbmodel}/ps_state.go (50%) rename app/model/{prestadb => dbmodel}/ps_statssearch.go (50%) create mode 100644 app/model/dbmodel/ps_stock.go rename app/model/{prestadb => dbmodel}/ps_stock_available.go (58%) create mode 100644 app/model/dbmodel/ps_stock_mvt.go rename app/model/{prestadb => dbmodel}/ps_stock_mvt_reason.go (52%) rename app/model/{prestadb => dbmodel}/ps_stock_mvt_reason_lang.go (53%) create mode 100644 app/model/dbmodel/ps_store.go create mode 100644 app/model/dbmodel/ps_store_lang.go rename app/model/{prestadb => dbmodel}/ps_store_shop.go (54%) rename app/model/{prestadb => dbmodel}/ps_supplier.go (50%) create mode 100644 app/model/dbmodel/ps_supplier_lang.go rename app/model/{prestadb => dbmodel}/ps_supplier_shop.go (55%) create mode 100644 app/model/dbmodel/ps_supply_order.go create mode 100644 app/model/dbmodel/ps_supply_order_detail.go rename app/model/{prestadb => dbmodel}/ps_supply_order_history.go (51%) rename app/model/{prestadb => dbmodel}/ps_supply_order_receipt_history.go (51%) create mode 100644 app/model/dbmodel/ps_supply_order_state.go rename app/model/{prestadb => dbmodel}/ps_supply_order_state_lang.go (53%) create mode 100644 app/model/dbmodel/ps_tab.go rename app/model/{prestadb => dbmodel}/ps_tab_advice.go (53%) rename app/model/{prestadb => dbmodel}/ps_tab_lang.go (54%) rename app/model/{prestadb => dbmodel}/ps_tab_module_preference.go (56%) rename app/model/{prestadb => dbmodel}/ps_tag.go (53%) rename app/model/{prestadb => dbmodel}/ps_tag_count.go (52%) create mode 100644 app/model/dbmodel/ps_tax.go rename app/model/{prestadb => dbmodel}/ps_tax_lang.go (50%) rename app/model/{prestadb => dbmodel}/ps_tax_rule.go (52%) rename app/model/{prestadb => dbmodel}/ps_tax_rules_group.go (51%) rename app/model/{prestadb => dbmodel}/ps_tax_rules_group_shop.go (56%) rename app/model/{prestadb => dbmodel}/ps_timezone.go (54%) rename app/model/{prestadb => dbmodel}/ps_translation.go (50%) rename app/model/{prestadb => dbmodel}/ps_unit.go (52%) create mode 100644 app/model/dbmodel/ps_unit_lang.go create mode 100644 app/model/dbmodel/ps_warehouse.go rename app/model/{prestadb => dbmodel}/ps_warehouse_carrier.go (57%) rename app/model/{prestadb => dbmodel}/ps_warehouse_product_location.go (54%) rename app/model/{prestadb => dbmodel}/ps_warehouse_shop.go (57%) rename app/model/{prestadb => dbmodel}/ps_web_browser.go (54%) rename app/model/{prestadb => dbmodel}/ps_webservice_account.go (50%) rename app/model/{prestadb => dbmodel}/ps_webservice_account_shop.go (57%) rename app/model/{prestadb => dbmodel}/ps_webservice_permission.go (58%) rename app/model/{prestadb => dbmodel}/ps_zone.go (50%) rename app/model/{prestadb => dbmodel}/ps_zone_shop.go (54%) delete mode 100644 app/model/prestadb/ps_address.go delete mode 100644 app/model/prestadb/ps_advice.go delete mode 100644 app/model/prestadb/ps_attachment.go delete mode 100644 app/model/prestadb/ps_badge.go delete mode 100644 app/model/prestadb/ps_badge_lang.go delete mode 100644 app/model/prestadb/ps_carrier.go delete mode 100644 app/model/prestadb/ps_category_lang.go delete mode 100644 app/model/prestadb/ps_cms.go delete mode 100644 app/model/prestadb/ps_cms_category_lang.go delete mode 100644 app/model/prestadb/ps_cms_lang.go delete mode 100644 app/model/prestadb/ps_cms_role_lang.go delete mode 100644 app/model/prestadb/ps_condition.go delete mode 100644 app/model/prestadb/ps_contact_lang.go delete mode 100644 app/model/prestadb/ps_currency.go delete mode 100644 app/model/prestadb/ps_customer_message.go delete mode 100644 app/model/prestadb/ps_customized_data.go delete mode 100644 app/model/prestadb/ps_dpdpoland_package.go delete mode 100644 app/model/prestadb/ps_dpdpoland_parcel.go delete mode 100644 app/model/prestadb/ps_dpdpoland_parcel_product.go delete mode 100644 app/model/prestadb/ps_dpdpoland_price_rule.go delete mode 100644 app/model/prestadb/ps_dpdpoland_sender_address.go delete mode 100644 app/model/prestadb/ps_employee.go delete mode 100644 app/model/prestadb/ps_guest.go delete mode 100644 app/model/prestadb/ps_homeslider_slides_lang.go delete mode 100644 app/model/prestadb/ps_image_type.go delete mode 100644 app/model/prestadb/ps_info_lang.go delete mode 100644 app/model/prestadb/ps_inpost_cart_choice.go delete mode 100644 app/model/prestadb/ps_inpost_dispatch_point.go delete mode 100644 app/model/prestadb/ps_inpost_shipment.go delete mode 100644 app/model/prestadb/ps_lang.go delete mode 100644 app/model/prestadb/ps_link_block.go delete mode 100644 app/model/prestadb/ps_log.go delete mode 100644 app/model/prestadb/ps_maal_cms_category_lang.go delete mode 100644 app/model/prestadb/ps_maal_cms_page.go delete mode 100644 app/model/prestadb/ps_maal_events.go delete mode 100644 app/model/prestadb/ps_maal_events_lang.go delete mode 100644 app/model/prestadb/ps_maal_invoicehelper.go delete mode 100644 app/model/prestadb/ps_maal_links_blok_slides_lang.go delete mode 100644 app/model/prestadb/ps_maal_slider_slides_lang.go delete mode 100644 app/model/prestadb/ps_mailalert_customer_oos.go delete mode 100644 app/model/prestadb/ps_manufacturer_lang.go delete mode 100644 app/model/prestadb/ps_meta_lang.go delete mode 100644 app/model/prestadb/ps_order_detail.go delete mode 100644 app/model/prestadb/ps_order_notes.go delete mode 100644 app/model/prestadb/ps_order_payment.go delete mode 100644 app/model/prestadb/ps_order_payu_payments.go delete mode 100644 app/model/prestadb/ps_order_slip.go delete mode 100644 app/model/prestadb/ps_order_slip_detail.go delete mode 100644 app/model/prestadb/ps_order_state.go delete mode 100644 app/model/prestadb/ps_page_viewed.go delete mode 100644 app/model/prestadb/ps_pocztapolskaen_order.go delete mode 100644 app/model/prestadb/ps_pocztapolskaen_order_set.go delete mode 100644 app/model/prestadb/ps_pocztapolskaen_post_office.go delete mode 100644 app/model/prestadb/ps_pocztapolskaen_profile_address.go delete mode 100644 app/model/prestadb/ps_product.go delete mode 100644 app/model/prestadb/ps_product_attribute_shop.go delete mode 100644 app/model/prestadb/ps_product_download.go delete mode 100644 app/model/prestadb/ps_product_lang.go delete mode 100644 app/model/prestadb/ps_psgdpr_consent.go delete mode 100644 app/model/prestadb/ps_psgdpr_log.go delete mode 100644 app/model/prestadb/ps_referrer.go delete mode 100644 app/model/prestadb/ps_referrer_shop.go delete mode 100644 app/model/prestadb/ps_shop.go delete mode 100644 app/model/prestadb/ps_shop_company.go delete mode 100644 app/model/prestadb/ps_shop_group.go delete mode 100644 app/model/prestadb/ps_stock.go delete mode 100644 app/model/prestadb/ps_stock_mvt.go delete mode 100644 app/model/prestadb/ps_store.go delete mode 100644 app/model/prestadb/ps_store_lang.go delete mode 100644 app/model/prestadb/ps_supplier_lang.go delete mode 100644 app/model/prestadb/ps_supply_order.go delete mode 100644 app/model/prestadb/ps_supply_order_detail.go delete mode 100644 app/model/prestadb/ps_supply_order_state.go delete mode 100644 app/model/prestadb/ps_tab.go delete mode 100644 app/model/prestadb/ps_tax.go delete mode 100644 app/model/prestadb/ps_unit_lang.go delete mode 100644 app/model/prestadb/ps_warehouse.go create mode 100644 app/repos/attributeRepo/attributeRepo.go create mode 100644 app/repos/categoryRepo/categoryRepo.go create mode 100644 app/repos/featureRepo/featureRepo.go create mode 100644 app/repos/searchRepo/searchRepo.go delete mode 100644 app/service/meiliService/blank.json create mode 100644 app/service/meiliService/indexation_params.go create mode 100644 app/service/searchService/searchService.go create mode 100644 bruno/api_v1/.gitignore create mode 100644 bruno/api_v1/Change Locales.yml create mode 100644 bruno/api_v1/Create Search Index.yml create mode 100644 bruno/api_v1/Delete Index - MeiliSearch.yml create mode 100644 bruno/api_v1/Products List.yml create mode 100644 bruno/api_v1/Search Index Settings.yml create mode 100644 bruno/api_v1/Search Items.yml create mode 100644 bruno/api_v1/environments/dev.yml create mode 100644 bruno/api_v1/opencollection.yml diff --git a/app/api/openapi.json b/app/api/openapi.json index 4f689bc..caf17fd 100644 --- a/app/api/openapi.json +++ b/app/api/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "b2b API", - "description": "Authentication, user management, and repository time tracking API\n\n## Filter Operators\nAll filter parameters support the following operators by adding a suffix to the parameter name:\n\n| Suffix | Operator | Example |\n|--------|----------|---------|\n| `_eq` | equals | `product_id_eq=12` |\n| `_neq` | not equals | `active_neq=0` |\n| `_gt` | greater than | `price_gt=100` |\n| `_gte` | greater than or equal | `price_gte=10` |\n| `_lt` | less than | `price_lt=500` |\n| `_lte` | less than or equal | `price_lte=500` |\n| `_in` | IN (comma-separated) | `product_id_in=1,2,3,4` |\n\n## Special Filters\n\n| Parameter | Example | Description |\n|-----------|---------|-------------|\n| `name=~text` | `name=~gold` | LIKE search (case-insensitive partial match) |\n| `price=[min,max]` | `price=[100,500]` | BETWEEN range (inclusive) |\n| `sort=field,direction` | `sort=price,desc` | ORDER BY clause (direction: asc/desc, default: desc) |\n| `p` | `p=1` | Page number (1-based, default: 1) |\n| `elems` | `elems=30` | Elements per page (max: 100, default: 30) |", + "description": "Authentication, user management, and repository time tracking API\n\n## Filtering\nAll filter parameters support the following operators by adding a suffix to the parameter name:\n\n### Comparison Operators\n\n| Suffix | Operator | Example | Description |\n|--------|----------|---------|-------------|\n| `_eq` | = | `product_id_eq=12` | Equals |\n| `_neq` | != | `active_neq=0` | Not equals |\n| `_gt` | > | `price_gt=100` | Greater than |\n| `_gte` | >= | `price_gte=10` | Greater than or equal |\n| `_lt` | < | `price_lt=500` | Less than |\n| `_lte` | <= | `price_lte=500` | Less than or equal |\n| `_in` | IN | `product_id_in=1,2,3,4` | IN clause (comma-separated values) |\n\n### Special Filters\n\n| Filter | Example | Description |\n|--------|---------|-------------|\n| `~` prefix | `name=~gold` | LIKE search - case-insensitive partial match on string values |\n| `[min,max]` | `price=[100,500]` | BETWEEN range - filters values between min and max (inclusive) |\n| `sort` | `sort=price,desc` | ORDER BY clause - field name and direction (asc/desc, default: desc) |\n| `p` | `p=1` | Page number - 1-based pagination (default: 1) |\n| `elems` | `elems=30` | Elements per page - results per page (max: 100, default: 30) |\n\n### Available Fields for Filtering\n\n**Products (`/api/v1/restricted/list-products/get-listing`):**\n\n| Field | Type | Example |\n|-------|------|---------|\n| `product_id` | integer | `product_id_eq=12`, `product_id_in=1,2,3` |\n| `name` | string | `name=~gold` (LIKE search) |\n| `reference` | string | `reference=ABC123` |\n| `category_name` | string | `category_name=~electronics` |\n| `id_category` | integer | `id_category_eq=5`, `id_category_in=1,2,3` |\n| `quantity` | integer | `quantity_gt=0` |\n| `variants_number` | integer | `variants_number_gte=1` |", "version": "1.0.0", "contact": { "name": "API Support", @@ -42,7 +42,7 @@ }, { "name": "Search", - "description": "MeiliSearch endpoints (under /api/v1/restricted/meili-search, requires authentication)" + "description": "MeiliSearch endpoints (under /api/v1/restricted/search, requires authentication)" }, { "name": "Locale", @@ -585,27 +585,21 @@ } } }, - "/api/v1/restricted/meili-search/settings": { - "get": { + "/api/v1/restricted/search/settings": { + "post": { "tags": ["Search"], "summary": "Get MeiliSearch settings", - "description": "Returns MeiliSearch configuration and settings. Requires authentication.", + "description": "Returns MeiliSearch index configuration and settings. Requires authentication.", "operationId": "getMeiliSearchSettings", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { "200": { - "description": "Settings retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiResponse" - } - } - } + "description": "Settings retrieved successfully" }, "401": { "description": "Not authenticated", @@ -628,7 +622,8 @@ "operationId": "getMe", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -668,7 +663,8 @@ "operationId": "updateChoice", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -823,18 +819,19 @@ "get": { "tags": ["Products"], "summary": "Get product listing", - "description": "Returns a paginated list of products with their basic information. Supports filtering via query parameters with operators (e.g., product_id_eq=12, name=~wałek). Use sort parameter for ordering. Requires authentication.", + "description": "Returns a paginated list of products with their basic information. Supports filtering via query parameters with operators (e.g., product_id_eq=12, name=~wałek, quantity_gt=0). Use sort parameter for ordering. Requires authentication.\n\n### Filterable Fields\n- `product_id` - Product ID (integer)\n- `name` - Product name (string, supports LIKE with ~ prefix)\n- `reference` - Product reference (string)\n- `category_name` - Category name (string, supports LIKE with ~ prefix)\n- `id_category` - Category ID (integer)\n- `quantity` - Stock quantity (integer)\n- `variants_number` - Number of variants (integer)\n\n### Example Requests\n```\nGET /api/v1/restricted/list-products/get-listing?product_id_eq=12\nGET /api/v1/restricted/list-products/get-listing?name=~wałek&sort=price,asc\nGET /api/v1/restricted/list-products/get-listing?quantity_gt=0&elems=50&p=2\n```", "operationId": "getProductListing", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "parameters": [ { "name": "p", "in": "query", - "description": "Page number (1-based)", + "description": "Page number (1-based, default: 1)", "required": false, "schema": { "type": "integer", @@ -854,66 +851,12 @@ { "name": "sort", "in": "query", - "description": "Sort field and direction. Format: field,direction (e.g., 'product_id,desc' or 'name,asc')", + "description": "Sort order: field,direction (direction: asc/desc, default: desc). Sortable fields: product_id, name, reference, category_name, id_category, quantity, variants_number", "required": false, "schema": { "type": "string", "example": "product_id,desc" } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID. Use suffix _eq, _gt, _gte, _lt, _lte, _neq, _in for operators.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "name", - "in": "query", - "description": "Filter by product name using LIKE (case-insensitive). Use ~ prefix for partial match (e.g., '~wałek')", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "reference", - "in": "query", - "description": "Filter by product reference using LIKE (case-insensitive)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "id_category", - "in": "query", - "description": "Filter by category ID. Use suffix _eq, _gt, _gte, _lt, _lte, _neq, _in for operators.", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "category_name", - "in": "query", - "description": "Filter by category name using LIKE (case-insensitive)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "quantity", - "in": "query", - "description": "Filter by quantity. Use suffix _eq, _gt, _gte, _lt, _lte for operators.", - "required": false, - "schema": { - "type": "integer" - } } ], "responses": { @@ -958,7 +901,8 @@ "operationId": "getProductDescription", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "parameters": [ @@ -1025,7 +969,8 @@ "operationId": "saveProductDescription", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "parameters": [ @@ -1102,7 +1047,8 @@ "operationId": "translateProductDescription", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "parameters": [ @@ -1189,7 +1135,8 @@ "operationId": "getMenu", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -1264,7 +1211,8 @@ "operationId": "getTopMenu", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -1301,81 +1249,35 @@ } } }, - "/api/v1/restricted/meili-search/search": { - "get": { + "/api/v1/restricted/search/search": { + "post": { "tags": ["Search"], "summary": "Search products", - "description": "Searches products using MeiliSearch. Requires authentication.", + "description": "Searches products using MeiliSearch. Requires authentication. Request body should contain MeiliSearch search parameters.", "operationId": "searchProducts", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], - "parameters": [ - { - "name": "query", - "in": "query", - "description": "Search query string", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of results", - "required": true, - "schema": { - "type": "integer", - "format": "uint" - } - }, - { - "name": "id_category", - "in": "query", - "description": "Filter by category ID", - "required": false, - "schema": { - "type": "integer", - "format": "uint" - } - }, - { - "name": "price_lower_bound", - "in": "query", - "description": "Lower price bound", - "required": false, - "schema": { - "type": "number", - "format": "double" - } - }, - { - "name": "price_upper_bound", - "in": "query", - "description": "Upper price bound", - "required": false, - "schema": { - "type": "number", - "format": "double" - } - } - ], - "responses": { - "200": { - "description": "Search results retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiResponse" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "MeiliSearch search parameters (query, limit, filter, etc.)" } } + } + }, + "responses": { + "200": { + "description": "Search results retrieved successfully" }, "400": { - "description": "Invalid request parameters", + "description": "Invalid request body", "content": { "application/json": { "schema": { @@ -1397,7 +1299,7 @@ } } }, - "/api/v1/restricted/meili-search/create-index": { + "/api/v1/restricted/search/create-index": { "get": { "tags": ["Search"], "summary": "Create search index", @@ -1405,7 +1307,8 @@ "operationId": "createSearchIndex", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -1442,51 +1345,6 @@ } } }, - "/api/v1/restricted/meili-search/test": { - "get": { - "tags": ["Search"], - "summary": "Test MeiliSearch", - "description": "Tests the MeiliSearch search. Must be removed before proper release.", - "operationId": "testMeiliSearch", - "security": [ - { - "CookieAuth": [] - } - ], - "responses": { - "200": { - "description": "MeiliSearch test successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiResponse" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Not authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, "/api/v1/restricted/langs-and-countries/get-languages": { "get": { "tags": ["Locale"], @@ -1495,7 +1353,8 @@ "operationId": "getAvailableLanguages", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -1540,7 +1399,8 @@ "operationId": "getCountriesAndCurrencies", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -1585,7 +1445,8 @@ "operationId": "addNewCart", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -1620,7 +1481,8 @@ "operationId": "changeCartName", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "parameters": [ @@ -1685,7 +1547,8 @@ "operationId": "retrieveCartsInfo", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "responses": { @@ -1720,7 +1583,8 @@ "operationId": "retrieveCart", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "parameters": [ @@ -1776,7 +1640,8 @@ "operationId": "addProductToCart", "security": [ { - "CookieAuth": [] + "CookieAuth": [], + "BearerAuth": [] } ], "parameters": [ diff --git a/app/db/mariadb.go b/app/db/mariadb.go index aca8b53..9ab5c47 100644 --- a/app/db/mariadb.go +++ b/app/db/mariadb.go @@ -7,6 +7,7 @@ import ( "git.ma-al.com/goc_daniel/b2b/app/config" + extraClausePlugin "github.com/WinterYukky/gorm-extra-clause-plugin" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/logger" @@ -52,7 +53,10 @@ func newMySQLDB(cfg *config.DatabaseConfig) (*gorm.DB, error) { sqlDB.SetConnMaxLifetime(cfg.ConnMaxLifetime) log.Println("✓ Database connection established successfully") - + err = db.Use(extraClausePlugin.New()) + if err != nil { + panic(err) + } return db, nil } diff --git a/app/delivery/middleware/auth.go b/app/delivery/middleware/auth.go index 7098ebf..2aefce0 100644 --- a/app/delivery/middleware/auth.go +++ b/app/delivery/middleware/auth.go @@ -6,6 +6,7 @@ import ( "git.ma-al.com/goc_daniel/b2b/app/config" "git.ma-al.com/goc_daniel/b2b/app/model" "git.ma-al.com/goc_daniel/b2b/app/service/authService" + constdata "git.ma-al.com/goc_daniel/b2b/app/utils/const_data" "github.com/gofiber/fiber/v3" ) @@ -60,8 +61,8 @@ func AuthMiddleware() fiber.Handler { } // Set user in context - c.Locals("user", user.ToSession()) - c.Locals("userID", user.ID) + c.Locals(constdata.USER_LOCALES_NAME, user.ToSession()) + c.Locals(constdata.USER_LOCALES_ID, user.ID) return c.Next() } diff --git a/app/delivery/web/api/restricted/listProducts.go b/app/delivery/web/api/restricted/listProducts.go index 962fd07..2841761 100644 --- a/app/delivery/web/api/restricted/listProducts.go +++ b/app/delivery/web/api/restricted/listProducts.go @@ -60,8 +60,8 @@ func (h *ListProductsHandler) GetListing(c fiber.Ctx) error { var columnMappingGetListing map[string]string = map[string]string{ "product_id": "ps.id_product", "name": "pl.name", - "reference": "ps.reference", + "reference": "p.reference", "category_name": "cl.name", - "id_category": "cp.id_category", + "category_id": "cp.id_category", "quantity": "sa.quantity", } diff --git a/app/delivery/web/api/restricted/meiliSearch.go b/app/delivery/web/api/restricted/search.go similarity index 61% rename from app/delivery/web/api/restricted/meiliSearch.go rename to app/delivery/web/api/restricted/search.go index 675e53b..ac6abb1 100644 --- a/app/delivery/web/api/restricted/meiliSearch.go +++ b/app/delivery/web/api/restricted/search.go @@ -1,9 +1,11 @@ package restricted import ( - "strconv" + "encoding/json" + "fmt" "git.ma-al.com/goc_daniel/b2b/app/service/meiliService" + searchservice "git.ma-al.com/goc_daniel/b2b/app/service/searchService" "git.ma-al.com/goc_daniel/b2b/app/utils/i18n" "git.ma-al.com/goc_daniel/b2b/app/utils/nullable" "git.ma-al.com/goc_daniel/b2b/app/utils/response" @@ -12,26 +14,23 @@ import ( ) type MeiliSearchHandler struct { - meiliService *meiliService.MeiliService + meiliService *meiliService.MeiliService + searchService *searchservice.SearchService } func NewMeiliSearchHandler() *MeiliSearchHandler { - meiliService := meiliService.New() return &MeiliSearchHandler{ - meiliService: meiliService, + meiliService: meiliService.New(), + searchService: searchservice.New(), } } func MeiliSearchHandlerRoutes(r fiber.Router) fiber.Router { handler := NewMeiliSearchHandler() - // for testing purposes only. Must be removed before proper release. r.Get("/create-index", handler.CreateIndex) - r.Get("/test", handler.Test) - r.Get("/settings", handler.GetSettings) - - // for all users - r.Get("/search", handler.Search) + r.Post("/search", handler.Search) + r.Post("/settings", handler.GetSettings) return r } @@ -45,6 +44,7 @@ func (h *MeiliSearchHandler) CreateIndex(c fiber.Ctx) error { err := h.meiliService.CreateIndex(id_lang) if err != nil { + fmt.Printf("CreateIndex error: %v\n", err) return c.Status(responseErrors.GetErrorStatus(err)). JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, err))) } @@ -53,22 +53,6 @@ func (h *MeiliSearchHandler) CreateIndex(c fiber.Ctx) error { return c.JSON(response.Make(¬hing, 0, i18n.T_(c, response.Message_OK))) } -func (h *MeiliSearchHandler) Test(c fiber.Ctx) error { - id_lang, ok := c.Locals("langID").(uint) - if !ok { - return c.Status(responseErrors.GetErrorStatus(responseErrors.ErrBadAttribute)). - JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrBadAttribute))) - } - - test, err := h.meiliService.Test(id_lang) - if err != nil { - return c.Status(responseErrors.GetErrorStatus(err)). - JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, err))) - } - - return c.JSON(response.Make(&test, 0, i18n.T_(c, response.Message_OK))) -} - func (h *MeiliSearchHandler) Search(c fiber.Ctx) error { id_lang, ok := c.Locals("langID").(uint) if !ok { @@ -76,22 +60,31 @@ func (h *MeiliSearchHandler) Search(c fiber.Ctx) error { JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrBadAttribute))) } - query := c.Query("query") + index := meiliService.GetIndexName(id_lang) - id_category_attribute := c.Query("id_category", "0") - id_category, err := strconv.Atoi(id_category_attribute) - if err != nil { - return c.Status(responseErrors.GetErrorStatus(responseErrors.ErrBadAttribute)). - JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrBadAttribute))) + var body map[string]interface{} + if err := json.Unmarshal(c.Body(), &body); err != nil { + return c.Status(responseErrors.GetErrorStatus(responseErrors.ErrInvalidBody)). + JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrInvalidBody))) } - meili_response, err := h.meiliService.Search(id_lang, query, uint(id_category)) + result, err := h.searchService.Search(index, c.Body(), id_lang) if err != nil { return c.Status(responseErrors.GetErrorStatus(err)). JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, err))) } - return c.JSON(response.Make(&meili_response, 0, i18n.T_(c, response.Message_OK))) + if h.searchService.IsIndexNotFound(result.Body) { + if createErr := h.meiliService.CreateIndex(id_lang); createErr == nil { + result, err = h.searchService.Search(index, c.Body(), id_lang) + if err != nil { + return c.Status(responseErrors.GetErrorStatus(err)). + JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, err))) + } + } + } + + return c.Status(result.StatusCode).Send(result.Body) } func (h *MeiliSearchHandler) GetSettings(c fiber.Ctx) error { @@ -101,11 +94,13 @@ func (h *MeiliSearchHandler) GetSettings(c fiber.Ctx) error { JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrBadAttribute))) } - settings, err := h.meiliService.GetIndexSettings(id_lang) + index := meiliService.GetIndexName(id_lang) + + result, err := h.searchService.GetIndexSettings(index) if err != nil { return c.Status(responseErrors.GetErrorStatus(err)). JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, err))) } - return c.JSON(response.Make(&settings, 0, i18n.T_(c, response.Message_OK))) + return c.Status(result.StatusCode).Send(result.Body) } diff --git a/app/delivery/web/init.go b/app/delivery/web/init.go index f4ecda8..68388b6 100644 --- a/app/delivery/web/init.go +++ b/app/delivery/web/init.go @@ -16,9 +16,7 @@ import ( "git.ma-al.com/goc_daniel/b2b/app/delivery/web/api/restricted" "git.ma-al.com/goc_daniel/b2b/app/delivery/web/general" - // "github.com/gofiber/fiber/v2/middleware/filesystem" "github.com/gofiber/fiber/v3" - // "github.com/gofiber/fiber/v3/middleware/filesystem" "github.com/gofiber/fiber/v3/middleware/logger" "github.com/gofiber/fiber/v3/middleware/recover" ) @@ -110,7 +108,7 @@ func (s *Server) Setup() error { restricted.MenuHandlerRoutes(menu) // meili search (restricted) - meiliSearch := s.restricted.Group("/meili-search") + meiliSearch := s.restricted.Group("/search") restricted.MeiliSearchHandlerRoutes(meiliSearch) // carts (restricted) diff --git a/app/model/customer.go b/app/model/customer.go index 22e7c0c..39c446f 100644 --- a/app/model/customer.go +++ b/app/model/customer.go @@ -79,6 +79,7 @@ type UserSession struct { Role CustomerRole `json:"role"` LangID uint `json:"lang_id"` CountryID uint `json:"country_id"` + IsActive bool `json:"is_active"` } // ToSession converts User to UserSession @@ -89,6 +90,7 @@ func (u *Customer) ToSession() *UserSession { Role: u.Role, LangID: u.LangID, CountryID: u.CountryID, + IsActive: u.IsActive, } } diff --git a/app/model/prestadb/ps_access.go b/app/model/dbmodel/ps_access.go similarity index 50% rename from app/model/prestadb/ps_access.go rename to app/model/dbmodel/ps_access.go index cdd9038..f896995 100644 --- a/app/model/prestadb/ps_access.go +++ b/app/model/dbmodel/ps_access.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAccess = "ps_access" @@ -16,3 +16,11 @@ type PsAccess struct { func (*PsAccess) TableName() string { return TableNamePsAccess } + +var PsAccessCols = struct { + IDProfile gormcol.Field + IDAuthorizationRole gormcol.Field +}{ + IDProfile: gormcol.Field{}.Set((&PsAccess{}).TableName(), "id_profile"), + IDAuthorizationRole: gormcol.Field{}.Set((&PsAccess{}).TableName(), "id_authorization_role"), +} diff --git a/app/model/prestadb/ps_accessory.go b/app/model/dbmodel/ps_accessory.go similarity index 56% rename from app/model/prestadb/ps_accessory.go rename to app/model/dbmodel/ps_accessory.go index b658f74..09977bb 100644 --- a/app/model/prestadb/ps_accessory.go +++ b/app/model/dbmodel/ps_accessory.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAccessory = "ps_accessory" @@ -16,3 +16,11 @@ type PsAccessory struct { func (*PsAccessory) TableName() string { return TableNamePsAccessory } + +var PsAccessoryCols = struct { + IDProduct1 gormcol.Field + IDProduct2 gormcol.Field +}{ + IDProduct1: gormcol.Field{}.Set((&PsAccessory{}).TableName(), "id_product_1"), + IDProduct2: gormcol.Field{}.Set((&PsAccessory{}).TableName(), "id_product_2"), +} diff --git a/app/model/dbmodel/ps_address.go b/app/model/dbmodel/ps_address.go new file mode 100644 index 0000000..7036241 --- /dev/null +++ b/app/model/dbmodel/ps_address.go @@ -0,0 +1,98 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsAddress = "ps_address" + +// PsAddress mapped from table +type PsAddress struct { + IDAddress int32 `gorm:"column:id_address;primaryKey;autoIncrement:true" json:"id_address"` + IDCountry int32 `gorm:"column:id_country;not null;index:id_country,priority:1" json:"id_country"` + IDState *int32 `gorm:"column:id_state;index:id_state,priority:1" json:"id_state"` + IDCustomer int32 `gorm:"column:id_customer;not null;index:address_customer,priority:1" json:"id_customer"` + IDManufacturer int32 `gorm:"column:id_manufacturer;not null;index:id_manufacturer,priority:1" json:"id_manufacturer"` + IDSupplier int32 `gorm:"column:id_supplier;not null;index:id_supplier,priority:1" json:"id_supplier"` + IDWarehouse int32 `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"` + Alias string `gorm:"column:alias;not null" json:"alias"` + Company *string `gorm:"column:company" json:"company"` + Lastname string `gorm:"column:lastname;not null" json:"lastname"` + Firstname string `gorm:"column:firstname;not null" json:"firstname"` + Address1 string `gorm:"column:address1;not null" json:"address1"` + Address2 *string `gorm:"column:address2" json:"address2"` + Postcode *string `gorm:"column:postcode" json:"postcode"` + City string `gorm:"column:city;not null" json:"city"` + Other *string `gorm:"column:other" json:"other"` + Phone *string `gorm:"column:phone" json:"phone"` + PhoneMobile *string `gorm:"column:phone_mobile" json:"phone_mobile"` + VatNumber *string `gorm:"column:vat_number" json:"vat_number"` + Dni *string `gorm:"column:dni" json:"dni"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` + Active bool `gorm:"column:active;not null;default:1" json:"active"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` + IsNovat int32 `gorm:"column:is_novat;not null" json:"is_novat"` +} + +// TableName PsAddress's table name +func (*PsAddress) TableName() string { + return TableNamePsAddress +} + +var PsAddressCols = struct { + IDAddress gormcol.Field + IDCountry gormcol.Field + IDState gormcol.Field + IDCustomer gormcol.Field + IDManufacturer gormcol.Field + IDSupplier gormcol.Field + IDWarehouse gormcol.Field + Alias gormcol.Field + Company gormcol.Field + Lastname gormcol.Field + Firstname gormcol.Field + Address1 gormcol.Field + Address2 gormcol.Field + Postcode gormcol.Field + City gormcol.Field + Other gormcol.Field + Phone gormcol.Field + PhoneMobile gormcol.Field + VatNumber gormcol.Field + Dni gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Active gormcol.Field + Deleted gormcol.Field + IsNovat gormcol.Field +}{ + IDAddress: gormcol.Field{}.Set((&PsAddress{}).TableName(), "id_address"), + IDCountry: gormcol.Field{}.Set((&PsAddress{}).TableName(), "id_country"), + IDState: gormcol.Field{}.Set((&PsAddress{}).TableName(), "id_state"), + IDCustomer: gormcol.Field{}.Set((&PsAddress{}).TableName(), "id_customer"), + IDManufacturer: gormcol.Field{}.Set((&PsAddress{}).TableName(), "id_manufacturer"), + IDSupplier: gormcol.Field{}.Set((&PsAddress{}).TableName(), "id_supplier"), + IDWarehouse: gormcol.Field{}.Set((&PsAddress{}).TableName(), "id_warehouse"), + Alias: gormcol.Field{}.Set((&PsAddress{}).TableName(), "alias"), + Company: gormcol.Field{}.Set((&PsAddress{}).TableName(), "company"), + Lastname: gormcol.Field{}.Set((&PsAddress{}).TableName(), "lastname"), + Firstname: gormcol.Field{}.Set((&PsAddress{}).TableName(), "firstname"), + Address1: gormcol.Field{}.Set((&PsAddress{}).TableName(), "address1"), + Address2: gormcol.Field{}.Set((&PsAddress{}).TableName(), "address2"), + Postcode: gormcol.Field{}.Set((&PsAddress{}).TableName(), "postcode"), + City: gormcol.Field{}.Set((&PsAddress{}).TableName(), "city"), + Other: gormcol.Field{}.Set((&PsAddress{}).TableName(), "other"), + Phone: gormcol.Field{}.Set((&PsAddress{}).TableName(), "phone"), + PhoneMobile: gormcol.Field{}.Set((&PsAddress{}).TableName(), "phone_mobile"), + VatNumber: gormcol.Field{}.Set((&PsAddress{}).TableName(), "vat_number"), + Dni: gormcol.Field{}.Set((&PsAddress{}).TableName(), "dni"), + DateAdd: gormcol.Field{}.Set((&PsAddress{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsAddress{}).TableName(), "date_upd"), + Active: gormcol.Field{}.Set((&PsAddress{}).TableName(), "active"), + Deleted: gormcol.Field{}.Set((&PsAddress{}).TableName(), "deleted"), + IsNovat: gormcol.Field{}.Set((&PsAddress{}).TableName(), "is_novat"), +} diff --git a/app/model/prestadb/ps_address_format.go b/app/model/dbmodel/ps_address_format.go similarity index 54% rename from app/model/prestadb/ps_address_format.go rename to app/model/dbmodel/ps_address_format.go index 963fcaa..5d3ca4b 100644 --- a/app/model/prestadb/ps_address_format.go +++ b/app/model/dbmodel/ps_address_format.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAddressFormat = "ps_address_format" @@ -16,3 +16,11 @@ type PsAddressFormat struct { func (*PsAddressFormat) TableName() string { return TableNamePsAddressFormat } + +var PsAddressFormatCols = struct { + IDCountry gormcol.Field + Format gormcol.Field +}{ + IDCountry: gormcol.Field{}.Set((&PsAddressFormat{}).TableName(), "id_country"), + Format: gormcol.Field{}.Set((&PsAddressFormat{}).TableName(), "format"), +} diff --git a/app/model/prestadb/ps_admin_filter.go b/app/model/dbmodel/ps_admin_filter.go similarity index 55% rename from app/model/prestadb/ps_admin_filter.go rename to app/model/dbmodel/ps_admin_filter.go index e01a8f6..f587fde 100644 --- a/app/model/prestadb/ps_admin_filter.go +++ b/app/model/dbmodel/ps_admin_filter.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAdminFilter = "ps_admin_filter" @@ -21,3 +21,21 @@ type PsAdminFilter struct { func (*PsAdminFilter) TableName() string { return TableNamePsAdminFilter } + +var PsAdminFilterCols = struct { + ID gormcol.Field + Employee gormcol.Field + Shop gormcol.Field + Controller gormcol.Field + Action gormcol.Field + Filter gormcol.Field + FilterID gormcol.Field +}{ + ID: gormcol.Field{}.Set((&PsAdminFilter{}).TableName(), "id"), + Employee: gormcol.Field{}.Set((&PsAdminFilter{}).TableName(), "employee"), + Shop: gormcol.Field{}.Set((&PsAdminFilter{}).TableName(), "shop"), + Controller: gormcol.Field{}.Set((&PsAdminFilter{}).TableName(), "controller"), + Action: gormcol.Field{}.Set((&PsAdminFilter{}).TableName(), "action"), + Filter: gormcol.Field{}.Set((&PsAdminFilter{}).TableName(), "filter"), + FilterID: gormcol.Field{}.Set((&PsAdminFilter{}).TableName(), "filter_id"), +} diff --git a/app/model/dbmodel/ps_advice.go b/app/model/dbmodel/ps_advice.go new file mode 100644 index 0000000..6107629 --- /dev/null +++ b/app/model/dbmodel/ps_advice.go @@ -0,0 +1,53 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsAdvice = "ps_advice" + +// PsAdvice mapped from table +type PsAdvice struct { + IDAdvice int32 `gorm:"column:id_advice;primaryKey;autoIncrement:true" json:"id_advice"` + IDPsAdvice int32 `gorm:"column:id_ps_advice;not null" json:"id_ps_advice"` + IDTab int32 `gorm:"column:id_tab;not null" json:"id_tab"` + IdsTab *string `gorm:"column:ids_tab" json:"ids_tab"` + Validated bool `gorm:"column:validated;not null" json:"validated"` + Hide bool `gorm:"column:hide;not null" json:"hide"` + Location string `gorm:"column:location;not null" json:"location"` + Selector *string `gorm:"column:selector" json:"selector"` + StartDay int32 `gorm:"column:start_day;not null" json:"start_day"` + StopDay int32 `gorm:"column:stop_day;not null" json:"stop_day"` + Weight *int32 `gorm:"column:weight;default:1" json:"weight"` +} + +// TableName PsAdvice's table name +func (*PsAdvice) TableName() string { + return TableNamePsAdvice +} + +var PsAdviceCols = struct { + IDAdvice gormcol.Field + IDPsAdvice gormcol.Field + IDTab gormcol.Field + IdsTab gormcol.Field + Validated gormcol.Field + Hide gormcol.Field + Location gormcol.Field + Selector gormcol.Field + StartDay gormcol.Field + StopDay gormcol.Field + Weight gormcol.Field +}{ + IDAdvice: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "id_advice"), + IDPsAdvice: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "id_ps_advice"), + IDTab: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "id_tab"), + IdsTab: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "ids_tab"), + Validated: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "validated"), + Hide: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "hide"), + Location: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "location"), + Selector: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "selector"), + StartDay: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "start_day"), + StopDay: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "stop_day"), + Weight: gormcol.Field{}.Set((&PsAdvice{}).TableName(), "weight"), +} diff --git a/app/model/prestadb/ps_advice_lang.go b/app/model/dbmodel/ps_advice_lang.go similarity index 50% rename from app/model/prestadb/ps_advice_lang.go rename to app/model/dbmodel/ps_advice_lang.go index b444674..4b78bcf 100644 --- a/app/model/prestadb/ps_advice_lang.go +++ b/app/model/dbmodel/ps_advice_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAdviceLang = "ps_advice_lang" @@ -17,3 +17,13 @@ type PsAdviceLang struct { func (*PsAdviceLang) TableName() string { return TableNamePsAdviceLang } + +var PsAdviceLangCols = struct { + IDAdvice gormcol.Field + IDLang gormcol.Field + HTML gormcol.Field +}{ + IDAdvice: gormcol.Field{}.Set((&PsAdviceLang{}).TableName(), "id_advice"), + IDLang: gormcol.Field{}.Set((&PsAdviceLang{}).TableName(), "id_lang"), + HTML: gormcol.Field{}.Set((&PsAdviceLang{}).TableName(), "html"), +} diff --git a/app/model/prestadb/ps_alias.go b/app/model/dbmodel/ps_alias.go similarity index 51% rename from app/model/prestadb/ps_alias.go rename to app/model/dbmodel/ps_alias.go index 35b177d..4250617 100644 --- a/app/model/prestadb/ps_alias.go +++ b/app/model/dbmodel/ps_alias.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAlias = "ps_alias" @@ -18,3 +18,15 @@ type PsAlias struct { func (*PsAlias) TableName() string { return TableNamePsAlias } + +var PsAliasCols = struct { + IDAlias gormcol.Field + Alias gormcol.Field + Search gormcol.Field + Active gormcol.Field +}{ + IDAlias: gormcol.Field{}.Set((&PsAlias{}).TableName(), "id_alias"), + Alias: gormcol.Field{}.Set((&PsAlias{}).TableName(), "alias"), + Search: gormcol.Field{}.Set((&PsAlias{}).TableName(), "search"), + Active: gormcol.Field{}.Set((&PsAlias{}).TableName(), "active"), +} diff --git a/app/model/dbmodel/ps_attachment.go b/app/model/dbmodel/ps_attachment.go new file mode 100644 index 0000000..82f4968 --- /dev/null +++ b/app/model/dbmodel/ps_attachment.go @@ -0,0 +1,35 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsAttachment = "ps_attachment" + +// PsAttachment mapped from table +type PsAttachment struct { + IDAttachment int32 `gorm:"column:id_attachment;primaryKey;autoIncrement:true" json:"id_attachment"` + File string `gorm:"column:file;not null" json:"file"` + FileName string `gorm:"column:file_name;not null" json:"file_name"` + FileSize int64 `gorm:"column:file_size;not null" json:"file_size"` + Mime string `gorm:"column:mime;not null" json:"mime"` +} + +// TableName PsAttachment's table name +func (*PsAttachment) TableName() string { + return TableNamePsAttachment +} + +var PsAttachmentCols = struct { + IDAttachment gormcol.Field + File gormcol.Field + FileName gormcol.Field + FileSize gormcol.Field + Mime gormcol.Field +}{ + IDAttachment: gormcol.Field{}.Set((&PsAttachment{}).TableName(), "id_attachment"), + File: gormcol.Field{}.Set((&PsAttachment{}).TableName(), "file"), + FileName: gormcol.Field{}.Set((&PsAttachment{}).TableName(), "file_name"), + FileSize: gormcol.Field{}.Set((&PsAttachment{}).TableName(), "file_size"), + Mime: gormcol.Field{}.Set((&PsAttachment{}).TableName(), "mime"), +} diff --git a/app/model/prestadb/ps_attachment_lang.go b/app/model/dbmodel/ps_attachment_lang.go similarity index 50% rename from app/model/prestadb/ps_attachment_lang.go rename to app/model/dbmodel/ps_attachment_lang.go index 9efc9f0..3f22b0d 100644 --- a/app/model/prestadb/ps_attachment_lang.go +++ b/app/model/dbmodel/ps_attachment_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttachmentLang = "ps_attachment_lang" @@ -18,3 +18,15 @@ type PsAttachmentLang struct { func (*PsAttachmentLang) TableName() string { return TableNamePsAttachmentLang } + +var PsAttachmentLangCols = struct { + IDAttachment gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Description gormcol.Field +}{ + IDAttachment: gormcol.Field{}.Set((&PsAttachmentLang{}).TableName(), "id_attachment"), + IDLang: gormcol.Field{}.Set((&PsAttachmentLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsAttachmentLang{}).TableName(), "name"), + Description: gormcol.Field{}.Set((&PsAttachmentLang{}).TableName(), "description"), +} diff --git a/app/model/prestadb/ps_attribute.go b/app/model/dbmodel/ps_attribute.go similarity index 52% rename from app/model/prestadb/ps_attribute.go rename to app/model/dbmodel/ps_attribute.go index bfe870c..761e640 100644 --- a/app/model/prestadb/ps_attribute.go +++ b/app/model/dbmodel/ps_attribute.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttribute = "ps_attribute" @@ -18,3 +18,15 @@ type PsAttribute struct { func (*PsAttribute) TableName() string { return TableNamePsAttribute } + +var PsAttributeCols = struct { + IDAttribute gormcol.Field + IDAttributeGroup gormcol.Field + Color gormcol.Field + Position gormcol.Field +}{ + IDAttribute: gormcol.Field{}.Set((&PsAttribute{}).TableName(), "id_attribute"), + IDAttributeGroup: gormcol.Field{}.Set((&PsAttribute{}).TableName(), "id_attribute_group"), + Color: gormcol.Field{}.Set((&PsAttribute{}).TableName(), "color"), + Position: gormcol.Field{}.Set((&PsAttribute{}).TableName(), "position"), +} diff --git a/app/model/prestadb/ps_attribute_group.go b/app/model/dbmodel/ps_attribute_group.go similarity index 51% rename from app/model/prestadb/ps_attribute_group.go rename to app/model/dbmodel/ps_attribute_group.go index 60d1128..b152793 100644 --- a/app/model/prestadb/ps_attribute_group.go +++ b/app/model/dbmodel/ps_attribute_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttributeGroup = "ps_attribute_group" @@ -18,3 +18,15 @@ type PsAttributeGroup struct { func (*PsAttributeGroup) TableName() string { return TableNamePsAttributeGroup } + +var PsAttributeGroupCols = struct { + IDAttributeGroup gormcol.Field + IsColorGroup gormcol.Field + GroupType gormcol.Field + Position gormcol.Field +}{ + IDAttributeGroup: gormcol.Field{}.Set((&PsAttributeGroup{}).TableName(), "id_attribute_group"), + IsColorGroup: gormcol.Field{}.Set((&PsAttributeGroup{}).TableName(), "is_color_group"), + GroupType: gormcol.Field{}.Set((&PsAttributeGroup{}).TableName(), "group_type"), + Position: gormcol.Field{}.Set((&PsAttributeGroup{}).TableName(), "position"), +} diff --git a/app/model/prestadb/ps_attribute_group_lang.go b/app/model/dbmodel/ps_attribute_group_lang.go similarity index 54% rename from app/model/prestadb/ps_attribute_group_lang.go rename to app/model/dbmodel/ps_attribute_group_lang.go index 4af3bfe..8960025 100644 --- a/app/model/prestadb/ps_attribute_group_lang.go +++ b/app/model/dbmodel/ps_attribute_group_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttributeGroupLang = "ps_attribute_group_lang" @@ -18,3 +18,15 @@ type PsAttributeGroupLang struct { func (*PsAttributeGroupLang) TableName() string { return TableNamePsAttributeGroupLang } + +var PsAttributeGroupLangCols = struct { + IDAttributeGroup gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + PublicName gormcol.Field +}{ + IDAttributeGroup: gormcol.Field{}.Set((&PsAttributeGroupLang{}).TableName(), "id_attribute_group"), + IDLang: gormcol.Field{}.Set((&PsAttributeGroupLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsAttributeGroupLang{}).TableName(), "name"), + PublicName: gormcol.Field{}.Set((&PsAttributeGroupLang{}).TableName(), "public_name"), +} diff --git a/app/model/prestadb/ps_attribute_group_shop.go b/app/model/dbmodel/ps_attribute_group_shop.go similarity index 59% rename from app/model/prestadb/ps_attribute_group_shop.go rename to app/model/dbmodel/ps_attribute_group_shop.go index 37dae4b..6b2ccf6 100644 --- a/app/model/prestadb/ps_attribute_group_shop.go +++ b/app/model/dbmodel/ps_attribute_group_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttributeGroupShop = "ps_attribute_group_shop" @@ -16,3 +16,11 @@ type PsAttributeGroupShop struct { func (*PsAttributeGroupShop) TableName() string { return TableNamePsAttributeGroupShop } + +var PsAttributeGroupShopCols = struct { + IDAttributeGroup gormcol.Field + IDShop gormcol.Field +}{ + IDAttributeGroup: gormcol.Field{}.Set((&PsAttributeGroupShop{}).TableName(), "id_attribute_group"), + IDShop: gormcol.Field{}.Set((&PsAttributeGroupShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_attribute_impact.go b/app/model/dbmodel/ps_attribute_impact.go similarity index 53% rename from app/model/prestadb/ps_attribute_impact.go rename to app/model/dbmodel/ps_attribute_impact.go index 57304e4..a510a36 100644 --- a/app/model/prestadb/ps_attribute_impact.go +++ b/app/model/dbmodel/ps_attribute_impact.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttributeImpact = "ps_attribute_impact" @@ -19,3 +19,17 @@ type PsAttributeImpact struct { func (*PsAttributeImpact) TableName() string { return TableNamePsAttributeImpact } + +var PsAttributeImpactCols = struct { + IDAttributeImpact gormcol.Field + IDProduct gormcol.Field + IDAttribute gormcol.Field + Weight gormcol.Field + Price gormcol.Field +}{ + IDAttributeImpact: gormcol.Field{}.Set((&PsAttributeImpact{}).TableName(), "id_attribute_impact"), + IDProduct: gormcol.Field{}.Set((&PsAttributeImpact{}).TableName(), "id_product"), + IDAttribute: gormcol.Field{}.Set((&PsAttributeImpact{}).TableName(), "id_attribute"), + Weight: gormcol.Field{}.Set((&PsAttributeImpact{}).TableName(), "weight"), + Price: gormcol.Field{}.Set((&PsAttributeImpact{}).TableName(), "price"), +} diff --git a/app/model/prestadb/ps_attribute_lang.go b/app/model/dbmodel/ps_attribute_lang.go similarity index 55% rename from app/model/prestadb/ps_attribute_lang.go rename to app/model/dbmodel/ps_attribute_lang.go index a7c7c2c..9a99653 100644 --- a/app/model/prestadb/ps_attribute_lang.go +++ b/app/model/dbmodel/ps_attribute_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttributeLang = "ps_attribute_lang" @@ -17,3 +17,13 @@ type PsAttributeLang struct { func (*PsAttributeLang) TableName() string { return TableNamePsAttributeLang } + +var PsAttributeLangCols = struct { + IDAttribute gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDAttribute: gormcol.Field{}.Set((&PsAttributeLang{}).TableName(), "id_attribute"), + IDLang: gormcol.Field{}.Set((&PsAttributeLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsAttributeLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_attribute_shop.go b/app/model/dbmodel/ps_attribute_shop.go similarity index 58% rename from app/model/prestadb/ps_attribute_shop.go rename to app/model/dbmodel/ps_attribute_shop.go index e0fcfe5..9acb5e5 100644 --- a/app/model/prestadb/ps_attribute_shop.go +++ b/app/model/dbmodel/ps_attribute_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAttributeShop = "ps_attribute_shop" @@ -16,3 +16,11 @@ type PsAttributeShop struct { func (*PsAttributeShop) TableName() string { return TableNamePsAttributeShop } + +var PsAttributeShopCols = struct { + IDAttribute gormcol.Field + IDShop gormcol.Field +}{ + IDAttribute: gormcol.Field{}.Set((&PsAttributeShop{}).TableName(), "id_attribute"), + IDShop: gormcol.Field{}.Set((&PsAttributeShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_authorization_role.go b/app/model/dbmodel/ps_authorization_role.go similarity index 57% rename from app/model/prestadb/ps_authorization_role.go rename to app/model/dbmodel/ps_authorization_role.go index b7a8a29..ad47f85 100644 --- a/app/model/prestadb/ps_authorization_role.go +++ b/app/model/dbmodel/ps_authorization_role.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsAuthorizationRole = "ps_authorization_role" @@ -16,3 +16,11 @@ type PsAuthorizationRole struct { func (*PsAuthorizationRole) TableName() string { return TableNamePsAuthorizationRole } + +var PsAuthorizationRoleCols = struct { + IDAuthorizationRole gormcol.Field + Slug gormcol.Field +}{ + IDAuthorizationRole: gormcol.Field{}.Set((&PsAuthorizationRole{}).TableName(), "id_authorization_role"), + Slug: gormcol.Field{}.Set((&PsAuthorizationRole{}).TableName(), "slug"), +} diff --git a/app/model/dbmodel/ps_badge.go b/app/model/dbmodel/ps_badge.go new file mode 100644 index 0000000..74d4c1d --- /dev/null +++ b/app/model/dbmodel/ps_badge.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsBadge = "ps_badge" + +// PsBadge mapped from table +type PsBadge struct { + IDBadge int32 `gorm:"column:id_badge;primaryKey;autoIncrement:true" json:"id_badge"` + IDPsBadge int32 `gorm:"column:id_ps_badge;not null" json:"id_ps_badge"` + Type string `gorm:"column:type;not null" json:"type"` + IDGroup int32 `gorm:"column:id_group;not null" json:"id_group"` + GroupPosition int32 `gorm:"column:group_position;not null" json:"group_position"` + Scoring int32 `gorm:"column:scoring;not null" json:"scoring"` + Awb *int32 `gorm:"column:awb" json:"awb"` + Validated bool `gorm:"column:validated;not null" json:"validated"` +} + +// TableName PsBadge's table name +func (*PsBadge) TableName() string { + return TableNamePsBadge +} + +var PsBadgeCols = struct { + IDBadge gormcol.Field + IDPsBadge gormcol.Field + Type gormcol.Field + IDGroup gormcol.Field + GroupPosition gormcol.Field + Scoring gormcol.Field + Awb gormcol.Field + Validated gormcol.Field +}{ + IDBadge: gormcol.Field{}.Set((&PsBadge{}).TableName(), "id_badge"), + IDPsBadge: gormcol.Field{}.Set((&PsBadge{}).TableName(), "id_ps_badge"), + Type: gormcol.Field{}.Set((&PsBadge{}).TableName(), "type"), + IDGroup: gormcol.Field{}.Set((&PsBadge{}).TableName(), "id_group"), + GroupPosition: gormcol.Field{}.Set((&PsBadge{}).TableName(), "group_position"), + Scoring: gormcol.Field{}.Set((&PsBadge{}).TableName(), "scoring"), + Awb: gormcol.Field{}.Set((&PsBadge{}).TableName(), "awb"), + Validated: gormcol.Field{}.Set((&PsBadge{}).TableName(), "validated"), +} diff --git a/app/model/dbmodel/ps_badge_lang.go b/app/model/dbmodel/ps_badge_lang.go new file mode 100644 index 0000000..51c5a04 --- /dev/null +++ b/app/model/dbmodel/ps_badge_lang.go @@ -0,0 +1,35 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsBadgeLang = "ps_badge_lang" + +// PsBadgeLang mapped from table +type PsBadgeLang struct { + IDBadge int32 `gorm:"column:id_badge;primaryKey" json:"id_badge"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Name *string `gorm:"column:name" json:"name"` + Description *string `gorm:"column:description" json:"description"` + GroupName *string `gorm:"column:group_name" json:"group_name"` +} + +// TableName PsBadgeLang's table name +func (*PsBadgeLang) TableName() string { + return TableNamePsBadgeLang +} + +var PsBadgeLangCols = struct { + IDBadge gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Description gormcol.Field + GroupName gormcol.Field +}{ + IDBadge: gormcol.Field{}.Set((&PsBadgeLang{}).TableName(), "id_badge"), + IDLang: gormcol.Field{}.Set((&PsBadgeLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsBadgeLang{}).TableName(), "name"), + Description: gormcol.Field{}.Set((&PsBadgeLang{}).TableName(), "description"), + GroupName: gormcol.Field{}.Set((&PsBadgeLang{}).TableName(), "group_name"), +} diff --git a/app/model/dbmodel/ps_carrier.go b/app/model/dbmodel/ps_carrier.go new file mode 100644 index 0000000..33c0cea --- /dev/null +++ b/app/model/dbmodel/ps_carrier.go @@ -0,0 +1,83 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCarrier = "ps_carrier" + +// PsCarrier mapped from table +type PsCarrier struct { + IDCarrier int32 `gorm:"column:id_carrier;primaryKey;autoIncrement:true" json:"id_carrier"` + IDReference int32 `gorm:"column:id_reference;not null;index:reference,priority:1" json:"id_reference"` + IDTaxRulesGroup *int32 `gorm:"column:id_tax_rules_group;index:id_tax_rules_group,priority:1" json:"id_tax_rules_group"` + Name string `gorm:"column:name;not null" json:"name"` + URL *string `gorm:"column:url" json:"url"` + Active bool `gorm:"column:active;not null;index:deleted,priority:2;index:reference,priority:3" json:"active"` + Deleted bool `gorm:"column:deleted;not null;index:deleted,priority:1;index:reference,priority:2" json:"deleted"` + ShippingHandling bool `gorm:"column:shipping_handling;not null;default:1" json:"shipping_handling"` + RangeBehavior bool `gorm:"column:range_behavior;not null" json:"range_behavior"` + IsModule bool `gorm:"column:is_module;not null" json:"is_module"` + IsFree bool `gorm:"column:is_free;not null" json:"is_free"` + ShippingExternal bool `gorm:"column:shipping_external;not null" json:"shipping_external"` + NeedRange bool `gorm:"column:need_range;not null" json:"need_range"` + ExternalModuleName *string `gorm:"column:external_module_name" json:"external_module_name"` + ShippingMethod int32 `gorm:"column:shipping_method;not null" json:"shipping_method"` + Position int32 `gorm:"column:position;not null" json:"position"` + MaxWidth *int32 `gorm:"column:max_width" json:"max_width"` + MaxHeight *int32 `gorm:"column:max_height" json:"max_height"` + MaxDepth *int32 `gorm:"column:max_depth" json:"max_depth"` + MaxWeight *float64 `gorm:"column:max_weight;default:0.000000" json:"max_weight"` + Grade *int32 `gorm:"column:grade" json:"grade"` +} + +// TableName PsCarrier's table name +func (*PsCarrier) TableName() string { + return TableNamePsCarrier +} + +var PsCarrierCols = struct { + IDCarrier gormcol.Field + IDReference gormcol.Field + IDTaxRulesGroup gormcol.Field + Name gormcol.Field + URL gormcol.Field + Active gormcol.Field + Deleted gormcol.Field + ShippingHandling gormcol.Field + RangeBehavior gormcol.Field + IsModule gormcol.Field + IsFree gormcol.Field + ShippingExternal gormcol.Field + NeedRange gormcol.Field + ExternalModuleName gormcol.Field + ShippingMethod gormcol.Field + Position gormcol.Field + MaxWidth gormcol.Field + MaxHeight gormcol.Field + MaxDepth gormcol.Field + MaxWeight gormcol.Field + Grade gormcol.Field +}{ + IDCarrier: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "id_carrier"), + IDReference: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "id_reference"), + IDTaxRulesGroup: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "id_tax_rules_group"), + Name: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "name"), + URL: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "url"), + Active: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "active"), + Deleted: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "deleted"), + ShippingHandling: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "shipping_handling"), + RangeBehavior: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "range_behavior"), + IsModule: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "is_module"), + IsFree: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "is_free"), + ShippingExternal: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "shipping_external"), + NeedRange: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "need_range"), + ExternalModuleName: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "external_module_name"), + ShippingMethod: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "shipping_method"), + Position: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "position"), + MaxWidth: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "max_width"), + MaxHeight: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "max_height"), + MaxDepth: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "max_depth"), + MaxWeight: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "max_weight"), + Grade: gormcol.Field{}.Set((&PsCarrier{}).TableName(), "grade"), +} diff --git a/app/model/prestadb/ps_carrier_group.go b/app/model/dbmodel/ps_carrier_group.go similarity index 53% rename from app/model/prestadb/ps_carrier_group.go rename to app/model/dbmodel/ps_carrier_group.go index ba50c93..02ca74c 100644 --- a/app/model/prestadb/ps_carrier_group.go +++ b/app/model/dbmodel/ps_carrier_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCarrierGroup = "ps_carrier_group" @@ -16,3 +16,11 @@ type PsCarrierGroup struct { func (*PsCarrierGroup) TableName() string { return TableNamePsCarrierGroup } + +var PsCarrierGroupCols = struct { + IDCarrier gormcol.Field + IDGroup gormcol.Field +}{ + IDCarrier: gormcol.Field{}.Set((&PsCarrierGroup{}).TableName(), "id_carrier"), + IDGroup: gormcol.Field{}.Set((&PsCarrierGroup{}).TableName(), "id_group"), +} diff --git a/app/model/prestadb/ps_carrier_lang.go b/app/model/dbmodel/ps_carrier_lang.go similarity index 50% rename from app/model/prestadb/ps_carrier_lang.go rename to app/model/dbmodel/ps_carrier_lang.go index 528aa52..707b04d 100644 --- a/app/model/prestadb/ps_carrier_lang.go +++ b/app/model/dbmodel/ps_carrier_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCarrierLang = "ps_carrier_lang" @@ -18,3 +18,15 @@ type PsCarrierLang struct { func (*PsCarrierLang) TableName() string { return TableNamePsCarrierLang } + +var PsCarrierLangCols = struct { + IDCarrier gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + Delay gormcol.Field +}{ + IDCarrier: gormcol.Field{}.Set((&PsCarrierLang{}).TableName(), "id_carrier"), + IDShop: gormcol.Field{}.Set((&PsCarrierLang{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsCarrierLang{}).TableName(), "id_lang"), + Delay: gormcol.Field{}.Set((&PsCarrierLang{}).TableName(), "delay"), +} diff --git a/app/model/prestadb/ps_carrier_shop.go b/app/model/dbmodel/ps_carrier_shop.go similarity index 55% rename from app/model/prestadb/ps_carrier_shop.go rename to app/model/dbmodel/ps_carrier_shop.go index c821198..97d44a9 100644 --- a/app/model/prestadb/ps_carrier_shop.go +++ b/app/model/dbmodel/ps_carrier_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCarrierShop = "ps_carrier_shop" @@ -16,3 +16,11 @@ type PsCarrierShop struct { func (*PsCarrierShop) TableName() string { return TableNamePsCarrierShop } + +var PsCarrierShopCols = struct { + IDCarrier gormcol.Field + IDShop gormcol.Field +}{ + IDCarrier: gormcol.Field{}.Set((&PsCarrierShop{}).TableName(), "id_carrier"), + IDShop: gormcol.Field{}.Set((&PsCarrierShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_carrier_tax_rules_group_shop.go b/app/model/dbmodel/ps_carrier_tax_rules_group_shop.go similarity index 54% rename from app/model/prestadb/ps_carrier_tax_rules_group_shop.go rename to app/model/dbmodel/ps_carrier_tax_rules_group_shop.go index bd00637..8765134 100644 --- a/app/model/prestadb/ps_carrier_tax_rules_group_shop.go +++ b/app/model/dbmodel/ps_carrier_tax_rules_group_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCarrierTaxRulesGroupShop = "ps_carrier_tax_rules_group_shop" @@ -17,3 +17,13 @@ type PsCarrierTaxRulesGroupShop struct { func (*PsCarrierTaxRulesGroupShop) TableName() string { return TableNamePsCarrierTaxRulesGroupShop } + +var PsCarrierTaxRulesGroupShopCols = struct { + IDCarrier gormcol.Field + IDTaxRulesGroup gormcol.Field + IDShop gormcol.Field +}{ + IDCarrier: gormcol.Field{}.Set((&PsCarrierTaxRulesGroupShop{}).TableName(), "id_carrier"), + IDTaxRulesGroup: gormcol.Field{}.Set((&PsCarrierTaxRulesGroupShop{}).TableName(), "id_tax_rules_group"), + IDShop: gormcol.Field{}.Set((&PsCarrierTaxRulesGroupShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_carrier_zone.go b/app/model/dbmodel/ps_carrier_zone.go similarity index 53% rename from app/model/prestadb/ps_carrier_zone.go rename to app/model/dbmodel/ps_carrier_zone.go index b7289cf..7ee04b0 100644 --- a/app/model/prestadb/ps_carrier_zone.go +++ b/app/model/dbmodel/ps_carrier_zone.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCarrierZone = "ps_carrier_zone" @@ -16,3 +16,11 @@ type PsCarrierZone struct { func (*PsCarrierZone) TableName() string { return TableNamePsCarrierZone } + +var PsCarrierZoneCols = struct { + IDCarrier gormcol.Field + IDZone gormcol.Field +}{ + IDCarrier: gormcol.Field{}.Set((&PsCarrierZone{}).TableName(), "id_carrier"), + IDZone: gormcol.Field{}.Set((&PsCarrierZone{}).TableName(), "id_zone"), +} diff --git a/app/model/prestadb/ps_cart.go b/app/model/dbmodel/ps_cart.go similarity index 52% rename from app/model/prestadb/ps_cart.go rename to app/model/dbmodel/ps_cart.go index 69302d7..f541d4d 100644 --- a/app/model/prestadb/ps_cart.go +++ b/app/model/dbmodel/ps_cart.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -41,3 +40,53 @@ type PsCart struct { func (*PsCart) TableName() string { return TableNamePsCart } + +var PsCartCols = struct { + IDCart gormcol.Field + IDShopGroup gormcol.Field + IDShop gormcol.Field + IDCarrier gormcol.Field + DeliveryOption gormcol.Field + IDLang gormcol.Field + IDAddressDelivery gormcol.Field + IDAddressInvoice gormcol.Field + IDCurrency gormcol.Field + IDCustomer gormcol.Field + IDGuest gormcol.Field + SecureKey gormcol.Field + Recyclable gormcol.Field + Gift gormcol.Field + GiftMessage gormcol.Field + MobileTheme gormcol.Field + AllowSeperatedPackage gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + CheckoutSessionData gormcol.Field + CustomeShippingPriceNetto gormcol.Field + CustomeShippingPrice gormcol.Field + CustomeShippingTaxRate gormcol.Field +}{ + IDCart: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_cart"), + IDShopGroup: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_shop_group"), + IDShop: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_shop"), + IDCarrier: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_carrier"), + DeliveryOption: gormcol.Field{}.Set((&PsCart{}).TableName(), "delivery_option"), + IDLang: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_lang"), + IDAddressDelivery: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_address_delivery"), + IDAddressInvoice: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_address_invoice"), + IDCurrency: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_currency"), + IDCustomer: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_customer"), + IDGuest: gormcol.Field{}.Set((&PsCart{}).TableName(), "id_guest"), + SecureKey: gormcol.Field{}.Set((&PsCart{}).TableName(), "secure_key"), + Recyclable: gormcol.Field{}.Set((&PsCart{}).TableName(), "recyclable"), + Gift: gormcol.Field{}.Set((&PsCart{}).TableName(), "gift"), + GiftMessage: gormcol.Field{}.Set((&PsCart{}).TableName(), "gift_message"), + MobileTheme: gormcol.Field{}.Set((&PsCart{}).TableName(), "mobile_theme"), + AllowSeperatedPackage: gormcol.Field{}.Set((&PsCart{}).TableName(), "allow_seperated_package"), + DateAdd: gormcol.Field{}.Set((&PsCart{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCart{}).TableName(), "date_upd"), + CheckoutSessionData: gormcol.Field{}.Set((&PsCart{}).TableName(), "checkout_session_data"), + CustomeShippingPriceNetto: gormcol.Field{}.Set((&PsCart{}).TableName(), "custome_shipping_price_netto"), + CustomeShippingPrice: gormcol.Field{}.Set((&PsCart{}).TableName(), "custome_shipping_price"), + CustomeShippingTaxRate: gormcol.Field{}.Set((&PsCart{}).TableName(), "custome_shipping_tax_rate"), +} diff --git a/app/model/prestadb/ps_cart_cart_rule.go b/app/model/dbmodel/ps_cart_cart_rule.go similarity index 55% rename from app/model/prestadb/ps_cart_cart_rule.go rename to app/model/dbmodel/ps_cart_cart_rule.go index 339a781..ed44741 100644 --- a/app/model/prestadb/ps_cart_cart_rule.go +++ b/app/model/dbmodel/ps_cart_cart_rule.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartCartRule = "ps_cart_cart_rule" @@ -16,3 +16,11 @@ type PsCartCartRule struct { func (*PsCartCartRule) TableName() string { return TableNamePsCartCartRule } + +var PsCartCartRuleCols = struct { + IDCart gormcol.Field + IDCartRule gormcol.Field +}{ + IDCart: gormcol.Field{}.Set((&PsCartCartRule{}).TableName(), "id_cart"), + IDCartRule: gormcol.Field{}.Set((&PsCartCartRule{}).TableName(), "id_cart_rule"), +} diff --git a/app/model/prestadb/ps_cart_product.go b/app/model/dbmodel/ps_cart_product.go similarity index 53% rename from app/model/prestadb/ps_cart_product.go rename to app/model/dbmodel/ps_cart_product.go index ed38999..fa8712b 100644 --- a/app/model/prestadb/ps_cart_product.go +++ b/app/model/dbmodel/ps_cart_product.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -26,3 +25,23 @@ type PsCartProduct struct { func (*PsCartProduct) TableName() string { return TableNamePsCartProduct } + +var PsCartProductCols = struct { + IDCart gormcol.Field + IDProduct gormcol.Field + IDAddressDelivery gormcol.Field + IDShop gormcol.Field + IDProductAttribute gormcol.Field + IDCustomization gormcol.Field + Quantity gormcol.Field + DateAdd gormcol.Field +}{ + IDCart: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "id_cart"), + IDProduct: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "id_product"), + IDAddressDelivery: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "id_address_delivery"), + IDShop: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "id_shop"), + IDProductAttribute: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "id_product_attribute"), + IDCustomization: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "id_customization"), + Quantity: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "quantity"), + DateAdd: gormcol.Field{}.Set((&PsCartProduct{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_cart_rule.go b/app/model/dbmodel/ps_cart_rule.go similarity index 51% rename from app/model/prestadb/ps_cart_rule.go rename to app/model/dbmodel/ps_cart_rule.go index addc5be..f3c443b 100644 --- a/app/model/prestadb/ps_cart_rule.go +++ b/app/model/dbmodel/ps_cart_rule.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -51,3 +50,73 @@ type PsCartRule struct { func (*PsCartRule) TableName() string { return TableNamePsCartRule } + +var PsCartRuleCols = struct { + IDCartRule gormcol.Field + IDCustomer gormcol.Field + DateFrom gormcol.Field + DateTo gormcol.Field + Description gormcol.Field + Quantity gormcol.Field + QuantityPerUser gormcol.Field + Priority gormcol.Field + PartialUse gormcol.Field + Code gormcol.Field + MinimumAmount gormcol.Field + MinimumAmountTax gormcol.Field + MinimumAmountCurrency gormcol.Field + MinimumAmountShipping gormcol.Field + CountryRestriction gormcol.Field + CarrierRestriction gormcol.Field + GroupRestriction gormcol.Field + CartRuleRestriction gormcol.Field + ProductRestriction gormcol.Field + ShopRestriction gormcol.Field + FreeShipping gormcol.Field + ReductionPercent gormcol.Field + ReductionAmount gormcol.Field + ReductionTax gormcol.Field + ReductionCurrency gormcol.Field + ReductionProduct gormcol.Field + ReductionExcludeSpecial gormcol.Field + GiftProduct gormcol.Field + GiftProductAttribute gormcol.Field + Highlight gormcol.Field + Active gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDCartRule: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "id_cart_rule"), + IDCustomer: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "id_customer"), + DateFrom: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "date_from"), + DateTo: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "date_to"), + Description: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "description"), + Quantity: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "quantity"), + QuantityPerUser: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "quantity_per_user"), + Priority: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "priority"), + PartialUse: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "partial_use"), + Code: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "code"), + MinimumAmount: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "minimum_amount"), + MinimumAmountTax: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "minimum_amount_tax"), + MinimumAmountCurrency: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "minimum_amount_currency"), + MinimumAmountShipping: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "minimum_amount_shipping"), + CountryRestriction: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "country_restriction"), + CarrierRestriction: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "carrier_restriction"), + GroupRestriction: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "group_restriction"), + CartRuleRestriction: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "cart_rule_restriction"), + ProductRestriction: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "product_restriction"), + ShopRestriction: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "shop_restriction"), + FreeShipping: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "free_shipping"), + ReductionPercent: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "reduction_percent"), + ReductionAmount: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "reduction_amount"), + ReductionTax: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "reduction_tax"), + ReductionCurrency: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "reduction_currency"), + ReductionProduct: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "reduction_product"), + ReductionExcludeSpecial: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "reduction_exclude_special"), + GiftProduct: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "gift_product"), + GiftProductAttribute: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "gift_product_attribute"), + Highlight: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "highlight"), + Active: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "active"), + DateAdd: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCartRule{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_cart_rule_carrier.go b/app/model/dbmodel/ps_cart_rule_carrier.go similarity index 54% rename from app/model/prestadb/ps_cart_rule_carrier.go rename to app/model/dbmodel/ps_cart_rule_carrier.go index fcc4180..06845d3 100644 --- a/app/model/prestadb/ps_cart_rule_carrier.go +++ b/app/model/dbmodel/ps_cart_rule_carrier.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleCarrier = "ps_cart_rule_carrier" @@ -16,3 +16,11 @@ type PsCartRuleCarrier struct { func (*PsCartRuleCarrier) TableName() string { return TableNamePsCartRuleCarrier } + +var PsCartRuleCarrierCols = struct { + IDCartRule gormcol.Field + IDCarrier gormcol.Field +}{ + IDCartRule: gormcol.Field{}.Set((&PsCartRuleCarrier{}).TableName(), "id_cart_rule"), + IDCarrier: gormcol.Field{}.Set((&PsCartRuleCarrier{}).TableName(), "id_carrier"), +} diff --git a/app/model/prestadb/ps_cart_rule_combination.go b/app/model/dbmodel/ps_cart_rule_combination.go similarity index 58% rename from app/model/prestadb/ps_cart_rule_combination.go rename to app/model/dbmodel/ps_cart_rule_combination.go index 46002dd..22e732f 100644 --- a/app/model/prestadb/ps_cart_rule_combination.go +++ b/app/model/dbmodel/ps_cart_rule_combination.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleCombination = "ps_cart_rule_combination" @@ -16,3 +16,11 @@ type PsCartRuleCombination struct { func (*PsCartRuleCombination) TableName() string { return TableNamePsCartRuleCombination } + +var PsCartRuleCombinationCols = struct { + IDCartRule1 gormcol.Field + IDCartRule2 gormcol.Field +}{ + IDCartRule1: gormcol.Field{}.Set((&PsCartRuleCombination{}).TableName(), "id_cart_rule_1"), + IDCartRule2: gormcol.Field{}.Set((&PsCartRuleCombination{}).TableName(), "id_cart_rule_2"), +} diff --git a/app/model/prestadb/ps_cart_rule_country.go b/app/model/dbmodel/ps_cart_rule_country.go similarity index 54% rename from app/model/prestadb/ps_cart_rule_country.go rename to app/model/dbmodel/ps_cart_rule_country.go index f4f1f25..62a9709 100644 --- a/app/model/prestadb/ps_cart_rule_country.go +++ b/app/model/dbmodel/ps_cart_rule_country.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleCountry = "ps_cart_rule_country" @@ -16,3 +16,11 @@ type PsCartRuleCountry struct { func (*PsCartRuleCountry) TableName() string { return TableNamePsCartRuleCountry } + +var PsCartRuleCountryCols = struct { + IDCartRule gormcol.Field + IDCountry gormcol.Field +}{ + IDCartRule: gormcol.Field{}.Set((&PsCartRuleCountry{}).TableName(), "id_cart_rule"), + IDCountry: gormcol.Field{}.Set((&PsCartRuleCountry{}).TableName(), "id_country"), +} diff --git a/app/model/prestadb/ps_cart_rule_group.go b/app/model/dbmodel/ps_cart_rule_group.go similarity index 54% rename from app/model/prestadb/ps_cart_rule_group.go rename to app/model/dbmodel/ps_cart_rule_group.go index f8c2f01..605e24c 100644 --- a/app/model/prestadb/ps_cart_rule_group.go +++ b/app/model/dbmodel/ps_cart_rule_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleGroup = "ps_cart_rule_group" @@ -16,3 +16,11 @@ type PsCartRuleGroup struct { func (*PsCartRuleGroup) TableName() string { return TableNamePsCartRuleGroup } + +var PsCartRuleGroupCols = struct { + IDCartRule gormcol.Field + IDGroup gormcol.Field +}{ + IDCartRule: gormcol.Field{}.Set((&PsCartRuleGroup{}).TableName(), "id_cart_rule"), + IDGroup: gormcol.Field{}.Set((&PsCartRuleGroup{}).TableName(), "id_group"), +} diff --git a/app/model/prestadb/ps_cart_rule_lang.go b/app/model/dbmodel/ps_cart_rule_lang.go similarity index 51% rename from app/model/prestadb/ps_cart_rule_lang.go rename to app/model/dbmodel/ps_cart_rule_lang.go index 49b028e..129483e 100644 --- a/app/model/prestadb/ps_cart_rule_lang.go +++ b/app/model/dbmodel/ps_cart_rule_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleLang = "ps_cart_rule_lang" @@ -17,3 +17,13 @@ type PsCartRuleLang struct { func (*PsCartRuleLang) TableName() string { return TableNamePsCartRuleLang } + +var PsCartRuleLangCols = struct { + IDCartRule gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDCartRule: gormcol.Field{}.Set((&PsCartRuleLang{}).TableName(), "id_cart_rule"), + IDLang: gormcol.Field{}.Set((&PsCartRuleLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsCartRuleLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_cart_rule_product_rule.go b/app/model/dbmodel/ps_cart_rule_product_rule.go similarity index 54% rename from app/model/prestadb/ps_cart_rule_product_rule.go rename to app/model/dbmodel/ps_cart_rule_product_rule.go index f9fcc8b..ddb3ed7 100644 --- a/app/model/prestadb/ps_cart_rule_product_rule.go +++ b/app/model/dbmodel/ps_cart_rule_product_rule.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleProductRule = "ps_cart_rule_product_rule" @@ -17,3 +17,13 @@ type PsCartRuleProductRule struct { func (*PsCartRuleProductRule) TableName() string { return TableNamePsCartRuleProductRule } + +var PsCartRuleProductRuleCols = struct { + IDProductRule gormcol.Field + IDProductRuleGroup gormcol.Field + Type gormcol.Field +}{ + IDProductRule: gormcol.Field{}.Set((&PsCartRuleProductRule{}).TableName(), "id_product_rule"), + IDProductRuleGroup: gormcol.Field{}.Set((&PsCartRuleProductRule{}).TableName(), "id_product_rule_group"), + Type: gormcol.Field{}.Set((&PsCartRuleProductRule{}).TableName(), "type"), +} diff --git a/app/model/prestadb/ps_cart_rule_product_rule_group.go b/app/model/dbmodel/ps_cart_rule_product_rule_group.go similarity index 55% rename from app/model/prestadb/ps_cart_rule_product_rule_group.go rename to app/model/dbmodel/ps_cart_rule_product_rule_group.go index 5c521fc..7cb88b3 100644 --- a/app/model/prestadb/ps_cart_rule_product_rule_group.go +++ b/app/model/dbmodel/ps_cart_rule_product_rule_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleProductRuleGroup = "ps_cart_rule_product_rule_group" @@ -17,3 +17,13 @@ type PsCartRuleProductRuleGroup struct { func (*PsCartRuleProductRuleGroup) TableName() string { return TableNamePsCartRuleProductRuleGroup } + +var PsCartRuleProductRuleGroupCols = struct { + IDProductRuleGroup gormcol.Field + IDCartRule gormcol.Field + Quantity gormcol.Field +}{ + IDProductRuleGroup: gormcol.Field{}.Set((&PsCartRuleProductRuleGroup{}).TableName(), "id_product_rule_group"), + IDCartRule: gormcol.Field{}.Set((&PsCartRuleProductRuleGroup{}).TableName(), "id_cart_rule"), + Quantity: gormcol.Field{}.Set((&PsCartRuleProductRuleGroup{}).TableName(), "quantity"), +} diff --git a/app/model/prestadb/ps_cart_rule_product_rule_value.go b/app/model/dbmodel/ps_cart_rule_product_rule_value.go similarity index 57% rename from app/model/prestadb/ps_cart_rule_product_rule_value.go rename to app/model/dbmodel/ps_cart_rule_product_rule_value.go index 1812f0e..14ebd6e 100644 --- a/app/model/prestadb/ps_cart_rule_product_rule_value.go +++ b/app/model/dbmodel/ps_cart_rule_product_rule_value.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleProductRuleValue = "ps_cart_rule_product_rule_value" @@ -16,3 +16,11 @@ type PsCartRuleProductRuleValue struct { func (*PsCartRuleProductRuleValue) TableName() string { return TableNamePsCartRuleProductRuleValue } + +var PsCartRuleProductRuleValueCols = struct { + IDProductRule gormcol.Field + IDItem gormcol.Field +}{ + IDProductRule: gormcol.Field{}.Set((&PsCartRuleProductRuleValue{}).TableName(), "id_product_rule"), + IDItem: gormcol.Field{}.Set((&PsCartRuleProductRuleValue{}).TableName(), "id_item"), +} diff --git a/app/model/prestadb/ps_cart_rule_shop.go b/app/model/dbmodel/ps_cart_rule_shop.go similarity index 54% rename from app/model/prestadb/ps_cart_rule_shop.go rename to app/model/dbmodel/ps_cart_rule_shop.go index b777b40..a93469c 100644 --- a/app/model/prestadb/ps_cart_rule_shop.go +++ b/app/model/dbmodel/ps_cart_rule_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCartRuleShop = "ps_cart_rule_shop" @@ -16,3 +16,11 @@ type PsCartRuleShop struct { func (*PsCartRuleShop) TableName() string { return TableNamePsCartRuleShop } + +var PsCartRuleShopCols = struct { + IDCartRule gormcol.Field + IDShop gormcol.Field +}{ + IDCartRule: gormcol.Field{}.Set((&PsCartRuleShop{}).TableName(), "id_cart_rule"), + IDShop: gormcol.Field{}.Set((&PsCartRuleShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_category.go b/app/model/dbmodel/ps_category.go similarity index 56% rename from app/model/prestadb/ps_category.go rename to app/model/dbmodel/ps_category.go index 6580d9b..56bcf4e 100644 --- a/app/model/prestadb/ps_category.go +++ b/app/model/dbmodel/ps_category.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -29,3 +28,29 @@ type PsCategory struct { func (*PsCategory) TableName() string { return TableNamePsCategory } + +var PsCategoryCols = struct { + IDCategory gormcol.Field + IDParent gormcol.Field + IDShopDefault gormcol.Field + LevelDepth gormcol.Field + Nleft gormcol.Field + Nright gormcol.Field + Active gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Position gormcol.Field + IsRootCategory gormcol.Field +}{ + IDCategory: gormcol.Field{}.Set((&PsCategory{}).TableName(), "id_category"), + IDParent: gormcol.Field{}.Set((&PsCategory{}).TableName(), "id_parent"), + IDShopDefault: gormcol.Field{}.Set((&PsCategory{}).TableName(), "id_shop_default"), + LevelDepth: gormcol.Field{}.Set((&PsCategory{}).TableName(), "level_depth"), + Nleft: gormcol.Field{}.Set((&PsCategory{}).TableName(), "nleft"), + Nright: gormcol.Field{}.Set((&PsCategory{}).TableName(), "nright"), + Active: gormcol.Field{}.Set((&PsCategory{}).TableName(), "active"), + DateAdd: gormcol.Field{}.Set((&PsCategory{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCategory{}).TableName(), "date_upd"), + Position: gormcol.Field{}.Set((&PsCategory{}).TableName(), "position"), + IsRootCategory: gormcol.Field{}.Set((&PsCategory{}).TableName(), "is_root_category"), +} diff --git a/app/model/prestadb/ps_category_group.go b/app/model/dbmodel/ps_category_group.go similarity index 57% rename from app/model/prestadb/ps_category_group.go rename to app/model/dbmodel/ps_category_group.go index 4da75d6..07a00b0 100644 --- a/app/model/prestadb/ps_category_group.go +++ b/app/model/dbmodel/ps_category_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCategoryGroup = "ps_category_group" @@ -16,3 +16,11 @@ type PsCategoryGroup struct { func (*PsCategoryGroup) TableName() string { return TableNamePsCategoryGroup } + +var PsCategoryGroupCols = struct { + IDCategory gormcol.Field + IDGroup gormcol.Field +}{ + IDCategory: gormcol.Field{}.Set((&PsCategoryGroup{}).TableName(), "id_category"), + IDGroup: gormcol.Field{}.Set((&PsCategoryGroup{}).TableName(), "id_group"), +} diff --git a/app/model/dbmodel/ps_category_lang.go b/app/model/dbmodel/ps_category_lang.go new file mode 100644 index 0000000..cd6ef5c --- /dev/null +++ b/app/model/dbmodel/ps_category_lang.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCategoryLang = "ps_category_lang" + +// PsCategoryLang mapped from table +type PsCategoryLang struct { + IDCategory int32 `gorm:"column:id_category;primaryKey" json:"id_category"` + IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Name string `gorm:"column:name;not null;index:category_name,priority:1" json:"name"` + Description *string `gorm:"column:description" json:"description"` + LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` + MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` + MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` +} + +// TableName PsCategoryLang's table name +func (*PsCategoryLang) TableName() string { + return TableNamePsCategoryLang +} + +var PsCategoryLangCols = struct { + IDCategory gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Description gormcol.Field + LinkRewrite gormcol.Field + MetaTitle gormcol.Field + MetaKeywords gormcol.Field + MetaDescription gormcol.Field +}{ + IDCategory: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "id_category"), + IDShop: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "name"), + Description: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "description"), + LinkRewrite: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "link_rewrite"), + MetaTitle: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "meta_title"), + MetaKeywords: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "meta_keywords"), + MetaDescription: gormcol.Field{}.Set((&PsCategoryLang{}).TableName(), "meta_description"), +} diff --git a/app/model/prestadb/ps_category_product.go b/app/model/dbmodel/ps_category_product.go similarity index 58% rename from app/model/prestadb/ps_category_product.go rename to app/model/dbmodel/ps_category_product.go index d14fcfe..f9f2f25 100644 --- a/app/model/prestadb/ps_category_product.go +++ b/app/model/dbmodel/ps_category_product.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCategoryProduct = "ps_category_product" @@ -17,3 +17,13 @@ type PsCategoryProduct struct { func (*PsCategoryProduct) TableName() string { return TableNamePsCategoryProduct } + +var PsCategoryProductCols = struct { + IDCategory gormcol.Field + IDProduct gormcol.Field + Position gormcol.Field +}{ + IDCategory: gormcol.Field{}.Set((&PsCategoryProduct{}).TableName(), "id_category"), + IDProduct: gormcol.Field{}.Set((&PsCategoryProduct{}).TableName(), "id_product"), + Position: gormcol.Field{}.Set((&PsCategoryProduct{}).TableName(), "position"), +} diff --git a/app/model/prestadb/ps_category_shop.go b/app/model/dbmodel/ps_category_shop.go similarity index 51% rename from app/model/prestadb/ps_category_shop.go rename to app/model/dbmodel/ps_category_shop.go index 764d74e..eafbe0f 100644 --- a/app/model/prestadb/ps_category_shop.go +++ b/app/model/dbmodel/ps_category_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCategoryShop = "ps_category_shop" @@ -17,3 +17,13 @@ type PsCategoryShop struct { func (*PsCategoryShop) TableName() string { return TableNamePsCategoryShop } + +var PsCategoryShopCols = struct { + IDCategory gormcol.Field + IDShop gormcol.Field + Position gormcol.Field +}{ + IDCategory: gormcol.Field{}.Set((&PsCategoryShop{}).TableName(), "id_category"), + IDShop: gormcol.Field{}.Set((&PsCategoryShop{}).TableName(), "id_shop"), + Position: gormcol.Field{}.Set((&PsCategoryShop{}).TableName(), "position"), +} diff --git a/app/model/dbmodel/ps_cms.go b/app/model/dbmodel/ps_cms.go new file mode 100644 index 0000000..992c6df --- /dev/null +++ b/app/model/dbmodel/ps_cms.go @@ -0,0 +1,35 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCm = "ps_cms" + +// PsCm mapped from table +type PsCm struct { + IDCms int32 `gorm:"column:id_cms;primaryKey;autoIncrement:true" json:"id_cms"` + IDCmsCategory int32 `gorm:"column:id_cms_category;not null" json:"id_cms_category"` + Position int32 `gorm:"column:position;not null" json:"position"` + Active bool `gorm:"column:active;not null" json:"active"` + Indexation bool `gorm:"column:indexation;not null;default:1" json:"indexation"` +} + +// TableName PsCm's table name +func (*PsCm) TableName() string { + return TableNamePsCm +} + +var PsCmCols = struct { + IDCms gormcol.Field + IDCmsCategory gormcol.Field + Position gormcol.Field + Active gormcol.Field + Indexation gormcol.Field +}{ + IDCms: gormcol.Field{}.Set((&PsCm{}).TableName(), "id_cms"), + IDCmsCategory: gormcol.Field{}.Set((&PsCm{}).TableName(), "id_cms_category"), + Position: gormcol.Field{}.Set((&PsCm{}).TableName(), "position"), + Active: gormcol.Field{}.Set((&PsCm{}).TableName(), "active"), + Indexation: gormcol.Field{}.Set((&PsCm{}).TableName(), "indexation"), +} diff --git a/app/model/prestadb/ps_cms_category.go b/app/model/dbmodel/ps_cms_category.go similarity index 50% rename from app/model/prestadb/ps_cms_category.go rename to app/model/dbmodel/ps_cms_category.go index 80c8a4f..6238c8e 100644 --- a/app/model/prestadb/ps_cms_category.go +++ b/app/model/dbmodel/ps_cms_category.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -25,3 +24,21 @@ type PsCmsCategory struct { func (*PsCmsCategory) TableName() string { return TableNamePsCmsCategory } + +var PsCmsCategoryCols = struct { + IDCmsCategory gormcol.Field + IDParent gormcol.Field + LevelDepth gormcol.Field + Active gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Position gormcol.Field +}{ + IDCmsCategory: gormcol.Field{}.Set((&PsCmsCategory{}).TableName(), "id_cms_category"), + IDParent: gormcol.Field{}.Set((&PsCmsCategory{}).TableName(), "id_parent"), + LevelDepth: gormcol.Field{}.Set((&PsCmsCategory{}).TableName(), "level_depth"), + Active: gormcol.Field{}.Set((&PsCmsCategory{}).TableName(), "active"), + DateAdd: gormcol.Field{}.Set((&PsCmsCategory{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCmsCategory{}).TableName(), "date_upd"), + Position: gormcol.Field{}.Set((&PsCmsCategory{}).TableName(), "position"), +} diff --git a/app/model/dbmodel/ps_cms_category_lang.go b/app/model/dbmodel/ps_cms_category_lang.go new file mode 100644 index 0000000..d88b86b --- /dev/null +++ b/app/model/dbmodel/ps_cms_category_lang.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCmsCategoryLang = "ps_cms_category_lang" + +// PsCmsCategoryLang mapped from table +type PsCmsCategoryLang struct { + IDCmsCategory int32 `gorm:"column:id_cms_category;primaryKey" json:"id_cms_category"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` + Name string `gorm:"column:name;not null;index:category_name,priority:1" json:"name"` + Description *string `gorm:"column:description" json:"description"` + LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` + MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` + MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` +} + +// TableName PsCmsCategoryLang's table name +func (*PsCmsCategoryLang) TableName() string { + return TableNamePsCmsCategoryLang +} + +var PsCmsCategoryLangCols = struct { + IDCmsCategory gormcol.Field + IDLang gormcol.Field + IDShop gormcol.Field + Name gormcol.Field + Description gormcol.Field + LinkRewrite gormcol.Field + MetaTitle gormcol.Field + MetaKeywords gormcol.Field + MetaDescription gormcol.Field +}{ + IDCmsCategory: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "id_cms_category"), + IDLang: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "id_lang"), + IDShop: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "id_shop"), + Name: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "name"), + Description: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "description"), + LinkRewrite: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "link_rewrite"), + MetaTitle: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "meta_title"), + MetaKeywords: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "meta_keywords"), + MetaDescription: gormcol.Field{}.Set((&PsCmsCategoryLang{}).TableName(), "meta_description"), +} diff --git a/app/model/prestadb/ps_cms_category_shop.go b/app/model/dbmodel/ps_cms_category_shop.go similarity index 57% rename from app/model/prestadb/ps_cms_category_shop.go rename to app/model/dbmodel/ps_cms_category_shop.go index 1371f87..17f8fc9 100644 --- a/app/model/prestadb/ps_cms_category_shop.go +++ b/app/model/dbmodel/ps_cms_category_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCmsCategoryShop = "ps_cms_category_shop" @@ -16,3 +16,11 @@ type PsCmsCategoryShop struct { func (*PsCmsCategoryShop) TableName() string { return TableNamePsCmsCategoryShop } + +var PsCmsCategoryShopCols = struct { + IDCmsCategory gormcol.Field + IDShop gormcol.Field +}{ + IDCmsCategory: gormcol.Field{}.Set((&PsCmsCategoryShop{}).TableName(), "id_cms_category"), + IDShop: gormcol.Field{}.Set((&PsCmsCategoryShop{}).TableName(), "id_shop"), +} diff --git a/app/model/dbmodel/ps_cms_lang.go b/app/model/dbmodel/ps_cms_lang.go new file mode 100644 index 0000000..1cf0979 --- /dev/null +++ b/app/model/dbmodel/ps_cms_lang.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCmsLang = "ps_cms_lang" + +// PsCmsLang mapped from table +type PsCmsLang struct { + IDCms int32 `gorm:"column:id_cms;primaryKey" json:"id_cms"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` + MetaTitle string `gorm:"column:meta_title;not null" json:"meta_title"` + HeadSeoTitle *string `gorm:"column:head_seo_title" json:"head_seo_title"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` + MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` + Content *string `gorm:"column:content" json:"content"` + LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` +} + +// TableName PsCmsLang's table name +func (*PsCmsLang) TableName() string { + return TableNamePsCmsLang +} + +var PsCmsLangCols = struct { + IDCms gormcol.Field + IDLang gormcol.Field + IDShop gormcol.Field + MetaTitle gormcol.Field + HeadSeoTitle gormcol.Field + MetaDescription gormcol.Field + MetaKeywords gormcol.Field + Content gormcol.Field + LinkRewrite gormcol.Field +}{ + IDCms: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "id_cms"), + IDLang: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "id_lang"), + IDShop: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "id_shop"), + MetaTitle: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "meta_title"), + HeadSeoTitle: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "head_seo_title"), + MetaDescription: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "meta_description"), + MetaKeywords: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "meta_keywords"), + Content: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "content"), + LinkRewrite: gormcol.Field{}.Set((&PsCmsLang{}).TableName(), "link_rewrite"), +} diff --git a/app/model/prestadb/ps_cms_role.go b/app/model/dbmodel/ps_cms_role.go similarity index 53% rename from app/model/prestadb/ps_cms_role.go rename to app/model/dbmodel/ps_cms_role.go index 23aaf90..15dc6ee 100644 --- a/app/model/prestadb/ps_cms_role.go +++ b/app/model/dbmodel/ps_cms_role.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCmsRole = "ps_cms_role" @@ -17,3 +17,13 @@ type PsCmsRole struct { func (*PsCmsRole) TableName() string { return TableNamePsCmsRole } + +var PsCmsRoleCols = struct { + IDCmsRole gormcol.Field + Name gormcol.Field + IDCms gormcol.Field +}{ + IDCmsRole: gormcol.Field{}.Set((&PsCmsRole{}).TableName(), "id_cms_role"), + Name: gormcol.Field{}.Set((&PsCmsRole{}).TableName(), "name"), + IDCms: gormcol.Field{}.Set((&PsCmsRole{}).TableName(), "id_cms"), +} diff --git a/app/model/dbmodel/ps_cms_role_lang.go b/app/model/dbmodel/ps_cms_role_lang.go new file mode 100644 index 0000000..063e8c8 --- /dev/null +++ b/app/model/dbmodel/ps_cms_role_lang.go @@ -0,0 +1,32 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCmsRoleLang = "ps_cms_role_lang" + +// PsCmsRoleLang mapped from table +type PsCmsRoleLang struct { + IDCmsRole int32 `gorm:"column:id_cms_role;primaryKey" json:"id_cms_role"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"` + Name *string `gorm:"column:name" json:"name"` +} + +// TableName PsCmsRoleLang's table name +func (*PsCmsRoleLang) TableName() string { + return TableNamePsCmsRoleLang +} + +var PsCmsRoleLangCols = struct { + IDCmsRole gormcol.Field + IDLang gormcol.Field + IDShop gormcol.Field + Name gormcol.Field +}{ + IDCmsRole: gormcol.Field{}.Set((&PsCmsRoleLang{}).TableName(), "id_cms_role"), + IDLang: gormcol.Field{}.Set((&PsCmsRoleLang{}).TableName(), "id_lang"), + IDShop: gormcol.Field{}.Set((&PsCmsRoleLang{}).TableName(), "id_shop"), + Name: gormcol.Field{}.Set((&PsCmsRoleLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_cms_shop.go b/app/model/dbmodel/ps_cms_shop.go similarity index 54% rename from app/model/prestadb/ps_cms_shop.go rename to app/model/dbmodel/ps_cms_shop.go index 1b092ae..a0d142f 100644 --- a/app/model/prestadb/ps_cms_shop.go +++ b/app/model/dbmodel/ps_cms_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCmsShop = "ps_cms_shop" @@ -16,3 +16,11 @@ type PsCmsShop struct { func (*PsCmsShop) TableName() string { return TableNamePsCmsShop } + +var PsCmsShopCols = struct { + IDCms gormcol.Field + IDShop gormcol.Field +}{ + IDCms: gormcol.Field{}.Set((&PsCmsShop{}).TableName(), "id_cms"), + IDShop: gormcol.Field{}.Set((&PsCmsShop{}).TableName(), "id_shop"), +} diff --git a/app/model/dbmodel/ps_condition.go b/app/model/dbmodel/ps_condition.go new file mode 100644 index 0000000..dafdd88 --- /dev/null +++ b/app/model/dbmodel/ps_condition.go @@ -0,0 +1,59 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsCondition = "ps_condition" + +// PsCondition mapped from table +type PsCondition struct { + IDCondition int32 `gorm:"column:id_condition;primaryKey;autoIncrement:true" json:"id_condition"` + IDPsCondition int32 `gorm:"column:id_ps_condition;primaryKey" json:"id_ps_condition"` + Type string `gorm:"column:type;not null" json:"type"` + Request *string `gorm:"column:request" json:"request"` + Operator *string `gorm:"column:operator" json:"operator"` + Value *string `gorm:"column:value" json:"value"` + Result *string `gorm:"column:result" json:"result"` + CalculationType *string `gorm:"column:calculation_type" json:"calculation_type"` + CalculationDetail *string `gorm:"column:calculation_detail" json:"calculation_detail"` + Validated bool `gorm:"column:validated;not null" json:"validated"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsCondition's table name +func (*PsCondition) TableName() string { + return TableNamePsCondition +} + +var PsConditionCols = struct { + IDCondition gormcol.Field + IDPsCondition gormcol.Field + Type gormcol.Field + Request gormcol.Field + Operator gormcol.Field + Value gormcol.Field + Result gormcol.Field + CalculationType gormcol.Field + CalculationDetail gormcol.Field + Validated gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDCondition: gormcol.Field{}.Set((&PsCondition{}).TableName(), "id_condition"), + IDPsCondition: gormcol.Field{}.Set((&PsCondition{}).TableName(), "id_ps_condition"), + Type: gormcol.Field{}.Set((&PsCondition{}).TableName(), "type"), + Request: gormcol.Field{}.Set((&PsCondition{}).TableName(), "request"), + Operator: gormcol.Field{}.Set((&PsCondition{}).TableName(), "operator"), + Value: gormcol.Field{}.Set((&PsCondition{}).TableName(), "value"), + Result: gormcol.Field{}.Set((&PsCondition{}).TableName(), "result"), + CalculationType: gormcol.Field{}.Set((&PsCondition{}).TableName(), "calculation_type"), + CalculationDetail: gormcol.Field{}.Set((&PsCondition{}).TableName(), "calculation_detail"), + Validated: gormcol.Field{}.Set((&PsCondition{}).TableName(), "validated"), + DateAdd: gormcol.Field{}.Set((&PsCondition{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCondition{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_condition_advice.go b/app/model/dbmodel/ps_condition_advice.go similarity index 52% rename from app/model/prestadb/ps_condition_advice.go rename to app/model/dbmodel/ps_condition_advice.go index 6c4d52f..dcfcdf8 100644 --- a/app/model/prestadb/ps_condition_advice.go +++ b/app/model/dbmodel/ps_condition_advice.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsConditionAdvice = "ps_condition_advice" @@ -17,3 +17,13 @@ type PsConditionAdvice struct { func (*PsConditionAdvice) TableName() string { return TableNamePsConditionAdvice } + +var PsConditionAdviceCols = struct { + IDCondition gormcol.Field + IDAdvice gormcol.Field + Display gormcol.Field +}{ + IDCondition: gormcol.Field{}.Set((&PsConditionAdvice{}).TableName(), "id_condition"), + IDAdvice: gormcol.Field{}.Set((&PsConditionAdvice{}).TableName(), "id_advice"), + Display: gormcol.Field{}.Set((&PsConditionAdvice{}).TableName(), "display"), +} diff --git a/app/model/prestadb/ps_condition_badge.go b/app/model/dbmodel/ps_condition_badge.go similarity index 54% rename from app/model/prestadb/ps_condition_badge.go rename to app/model/dbmodel/ps_condition_badge.go index e3d41dd..218acf8 100644 --- a/app/model/prestadb/ps_condition_badge.go +++ b/app/model/dbmodel/ps_condition_badge.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsConditionBadge = "ps_condition_badge" @@ -16,3 +16,11 @@ type PsConditionBadge struct { func (*PsConditionBadge) TableName() string { return TableNamePsConditionBadge } + +var PsConditionBadgeCols = struct { + IDCondition gormcol.Field + IDBadge gormcol.Field +}{ + IDCondition: gormcol.Field{}.Set((&PsConditionBadge{}).TableName(), "id_condition"), + IDBadge: gormcol.Field{}.Set((&PsConditionBadge{}).TableName(), "id_badge"), +} diff --git a/app/model/prestadb/ps_configuration.go b/app/model/dbmodel/ps_configuration.go similarity index 51% rename from app/model/prestadb/ps_configuration.go rename to app/model/dbmodel/ps_configuration.go index 98b443f..73facb9 100644 --- a/app/model/prestadb/ps_configuration.go +++ b/app/model/dbmodel/ps_configuration.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -25,3 +24,21 @@ type PsConfiguration struct { func (*PsConfiguration) TableName() string { return TableNamePsConfiguration } + +var PsConfigurationCols = struct { + IDConfiguration gormcol.Field + IDShopGroup gormcol.Field + IDShop gormcol.Field + Name gormcol.Field + Value gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDConfiguration: gormcol.Field{}.Set((&PsConfiguration{}).TableName(), "id_configuration"), + IDShopGroup: gormcol.Field{}.Set((&PsConfiguration{}).TableName(), "id_shop_group"), + IDShop: gormcol.Field{}.Set((&PsConfiguration{}).TableName(), "id_shop"), + Name: gormcol.Field{}.Set((&PsConfiguration{}).TableName(), "name"), + Value: gormcol.Field{}.Set((&PsConfiguration{}).TableName(), "value"), + DateAdd: gormcol.Field{}.Set((&PsConfiguration{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsConfiguration{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_configuration_kpi.go b/app/model/dbmodel/ps_configuration_kpi.go similarity index 52% rename from app/model/prestadb/ps_configuration_kpi.go rename to app/model/dbmodel/ps_configuration_kpi.go index 88ef241..da6f43f 100644 --- a/app/model/prestadb/ps_configuration_kpi.go +++ b/app/model/dbmodel/ps_configuration_kpi.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -25,3 +24,21 @@ type PsConfigurationKpi struct { func (*PsConfigurationKpi) TableName() string { return TableNamePsConfigurationKpi } + +var PsConfigurationKpiCols = struct { + IDConfigurationKpi gormcol.Field + IDShopGroup gormcol.Field + IDShop gormcol.Field + Name gormcol.Field + Value gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDConfigurationKpi: gormcol.Field{}.Set((&PsConfigurationKpi{}).TableName(), "id_configuration_kpi"), + IDShopGroup: gormcol.Field{}.Set((&PsConfigurationKpi{}).TableName(), "id_shop_group"), + IDShop: gormcol.Field{}.Set((&PsConfigurationKpi{}).TableName(), "id_shop"), + Name: gormcol.Field{}.Set((&PsConfigurationKpi{}).TableName(), "name"), + Value: gormcol.Field{}.Set((&PsConfigurationKpi{}).TableName(), "value"), + DateAdd: gormcol.Field{}.Set((&PsConfigurationKpi{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsConfigurationKpi{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_configuration_kpi_lang.go b/app/model/dbmodel/ps_configuration_kpi_lang.go similarity index 53% rename from app/model/prestadb/ps_configuration_kpi_lang.go rename to app/model/dbmodel/ps_configuration_kpi_lang.go index d9ee3d6..4439c3b 100644 --- a/app/model/prestadb/ps_configuration_kpi_lang.go +++ b/app/model/dbmodel/ps_configuration_kpi_lang.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -22,3 +21,15 @@ type PsConfigurationKpiLang struct { func (*PsConfigurationKpiLang) TableName() string { return TableNamePsConfigurationKpiLang } + +var PsConfigurationKpiLangCols = struct { + IDConfigurationKpi gormcol.Field + IDLang gormcol.Field + Value gormcol.Field + DateUpd gormcol.Field +}{ + IDConfigurationKpi: gormcol.Field{}.Set((&PsConfigurationKpiLang{}).TableName(), "id_configuration_kpi"), + IDLang: gormcol.Field{}.Set((&PsConfigurationKpiLang{}).TableName(), "id_lang"), + Value: gormcol.Field{}.Set((&PsConfigurationKpiLang{}).TableName(), "value"), + DateUpd: gormcol.Field{}.Set((&PsConfigurationKpiLang{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_configuration_lang.go b/app/model/dbmodel/ps_configuration_lang.go similarity index 52% rename from app/model/prestadb/ps_configuration_lang.go rename to app/model/dbmodel/ps_configuration_lang.go index d1f0f6c..0f02e36 100644 --- a/app/model/prestadb/ps_configuration_lang.go +++ b/app/model/dbmodel/ps_configuration_lang.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -22,3 +21,15 @@ type PsConfigurationLang struct { func (*PsConfigurationLang) TableName() string { return TableNamePsConfigurationLang } + +var PsConfigurationLangCols = struct { + IDConfiguration gormcol.Field + IDLang gormcol.Field + Value gormcol.Field + DateUpd gormcol.Field +}{ + IDConfiguration: gormcol.Field{}.Set((&PsConfigurationLang{}).TableName(), "id_configuration"), + IDLang: gormcol.Field{}.Set((&PsConfigurationLang{}).TableName(), "id_lang"), + Value: gormcol.Field{}.Set((&PsConfigurationLang{}).TableName(), "value"), + DateUpd: gormcol.Field{}.Set((&PsConfigurationLang{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_connections.go b/app/model/dbmodel/ps_connections.go similarity index 51% rename from app/model/prestadb/ps_connections.go rename to app/model/dbmodel/ps_connections.go index 4cd625c..c427af5 100644 --- a/app/model/prestadb/ps_connections.go +++ b/app/model/dbmodel/ps_connections.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -26,3 +25,23 @@ type PsConnection struct { func (*PsConnection) TableName() string { return TableNamePsConnection } + +var PsConnectionCols = struct { + IDConnections gormcol.Field + IDShopGroup gormcol.Field + IDShop gormcol.Field + IDGuest gormcol.Field + IDPage gormcol.Field + IPAddress gormcol.Field + DateAdd gormcol.Field + HTTPReferer gormcol.Field +}{ + IDConnections: gormcol.Field{}.Set((&PsConnection{}).TableName(), "id_connections"), + IDShopGroup: gormcol.Field{}.Set((&PsConnection{}).TableName(), "id_shop_group"), + IDShop: gormcol.Field{}.Set((&PsConnection{}).TableName(), "id_shop"), + IDGuest: gormcol.Field{}.Set((&PsConnection{}).TableName(), "id_guest"), + IDPage: gormcol.Field{}.Set((&PsConnection{}).TableName(), "id_page"), + IPAddress: gormcol.Field{}.Set((&PsConnection{}).TableName(), "ip_address"), + DateAdd: gormcol.Field{}.Set((&PsConnection{}).TableName(), "date_add"), + HTTPReferer: gormcol.Field{}.Set((&PsConnection{}).TableName(), "http_referer"), +} diff --git a/app/model/prestadb/ps_connections_page.go b/app/model/dbmodel/ps_connections_page.go similarity index 52% rename from app/model/prestadb/ps_connections_page.go rename to app/model/dbmodel/ps_connections_page.go index 55ea54e..2a95d5b 100644 --- a/app/model/prestadb/ps_connections_page.go +++ b/app/model/dbmodel/ps_connections_page.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -22,3 +21,15 @@ type PsConnectionsPage struct { func (*PsConnectionsPage) TableName() string { return TableNamePsConnectionsPage } + +var PsConnectionsPageCols = struct { + IDConnections gormcol.Field + IDPage gormcol.Field + TimeStart gormcol.Field + TimeEnd gormcol.Field +}{ + IDConnections: gormcol.Field{}.Set((&PsConnectionsPage{}).TableName(), "id_connections"), + IDPage: gormcol.Field{}.Set((&PsConnectionsPage{}).TableName(), "id_page"), + TimeStart: gormcol.Field{}.Set((&PsConnectionsPage{}).TableName(), "time_start"), + TimeEnd: gormcol.Field{}.Set((&PsConnectionsPage{}).TableName(), "time_end"), +} diff --git a/app/model/prestadb/ps_connections_source.go b/app/model/dbmodel/ps_connections_source.go similarity index 53% rename from app/model/prestadb/ps_connections_source.go rename to app/model/dbmodel/ps_connections_source.go index 9939adf..29e640c 100644 --- a/app/model/prestadb/ps_connections_source.go +++ b/app/model/dbmodel/ps_connections_source.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsConnectionsSource struct { func (*PsConnectionsSource) TableName() string { return TableNamePsConnectionsSource } + +var PsConnectionsSourceCols = struct { + IDConnectionsSource gormcol.Field + IDConnections gormcol.Field + HTTPReferer gormcol.Field + RequestURI gormcol.Field + Keywords gormcol.Field + DateAdd gormcol.Field +}{ + IDConnectionsSource: gormcol.Field{}.Set((&PsConnectionsSource{}).TableName(), "id_connections_source"), + IDConnections: gormcol.Field{}.Set((&PsConnectionsSource{}).TableName(), "id_connections"), + HTTPReferer: gormcol.Field{}.Set((&PsConnectionsSource{}).TableName(), "http_referer"), + RequestURI: gormcol.Field{}.Set((&PsConnectionsSource{}).TableName(), "request_uri"), + Keywords: gormcol.Field{}.Set((&PsConnectionsSource{}).TableName(), "keywords"), + DateAdd: gormcol.Field{}.Set((&PsConnectionsSource{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_contact.go b/app/model/dbmodel/ps_contact.go similarity index 50% rename from app/model/prestadb/ps_contact.go rename to app/model/dbmodel/ps_contact.go index 3e5429e..49e600a 100644 --- a/app/model/prestadb/ps_contact.go +++ b/app/model/dbmodel/ps_contact.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsContact = "ps_contact" @@ -18,3 +18,15 @@ type PsContact struct { func (*PsContact) TableName() string { return TableNamePsContact } + +var PsContactCols = struct { + IDContact gormcol.Field + Email gormcol.Field + CustomerService gormcol.Field + Position gormcol.Field +}{ + IDContact: gormcol.Field{}.Set((&PsContact{}).TableName(), "id_contact"), + Email: gormcol.Field{}.Set((&PsContact{}).TableName(), "email"), + CustomerService: gormcol.Field{}.Set((&PsContact{}).TableName(), "customer_service"), + Position: gormcol.Field{}.Set((&PsContact{}).TableName(), "position"), +} diff --git a/app/model/dbmodel/ps_contact_lang.go b/app/model/dbmodel/ps_contact_lang.go new file mode 100644 index 0000000..2d298c9 --- /dev/null +++ b/app/model/dbmodel/ps_contact_lang.go @@ -0,0 +1,32 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsContactLang = "ps_contact_lang" + +// PsContactLang mapped from table +type PsContactLang struct { + IDContact int32 `gorm:"column:id_contact;primaryKey" json:"id_contact"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Name string `gorm:"column:name;not null" json:"name"` + Description *string `gorm:"column:description" json:"description"` +} + +// TableName PsContactLang's table name +func (*PsContactLang) TableName() string { + return TableNamePsContactLang +} + +var PsContactLangCols = struct { + IDContact gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Description gormcol.Field +}{ + IDContact: gormcol.Field{}.Set((&PsContactLang{}).TableName(), "id_contact"), + IDLang: gormcol.Field{}.Set((&PsContactLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsContactLang{}).TableName(), "name"), + Description: gormcol.Field{}.Set((&PsContactLang{}).TableName(), "description"), +} diff --git a/app/model/prestadb/ps_contact_shop.go b/app/model/dbmodel/ps_contact_shop.go similarity index 55% rename from app/model/prestadb/ps_contact_shop.go rename to app/model/dbmodel/ps_contact_shop.go index 677ac1c..13a5e17 100644 --- a/app/model/prestadb/ps_contact_shop.go +++ b/app/model/dbmodel/ps_contact_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsContactShop = "ps_contact_shop" @@ -16,3 +16,11 @@ type PsContactShop struct { func (*PsContactShop) TableName() string { return TableNamePsContactShop } + +var PsContactShopCols = struct { + IDContact gormcol.Field + IDShop gormcol.Field +}{ + IDContact: gormcol.Field{}.Set((&PsContactShop{}).TableName(), "id_contact"), + IDShop: gormcol.Field{}.Set((&PsContactShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_country.go b/app/model/dbmodel/ps_country.go similarity index 50% rename from app/model/prestadb/ps_country.go rename to app/model/dbmodel/ps_country.go index d93db8a..2fef20a 100644 --- a/app/model/prestadb/ps_country.go +++ b/app/model/dbmodel/ps_country.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCountry = "ps_country" @@ -25,3 +25,29 @@ type PsCountry struct { func (*PsCountry) TableName() string { return TableNamePsCountry } + +var PsCountryCols = struct { + IDCountry gormcol.Field + IDZone gormcol.Field + IDCurrency gormcol.Field + IsoCode gormcol.Field + CallPrefix gormcol.Field + Active gormcol.Field + ContainsStates gormcol.Field + NeedIdentificationNumber gormcol.Field + NeedZipCode gormcol.Field + ZipCodeFormat gormcol.Field + DisplayTaxLabel gormcol.Field +}{ + IDCountry: gormcol.Field{}.Set((&PsCountry{}).TableName(), "id_country"), + IDZone: gormcol.Field{}.Set((&PsCountry{}).TableName(), "id_zone"), + IDCurrency: gormcol.Field{}.Set((&PsCountry{}).TableName(), "id_currency"), + IsoCode: gormcol.Field{}.Set((&PsCountry{}).TableName(), "iso_code"), + CallPrefix: gormcol.Field{}.Set((&PsCountry{}).TableName(), "call_prefix"), + Active: gormcol.Field{}.Set((&PsCountry{}).TableName(), "active"), + ContainsStates: gormcol.Field{}.Set((&PsCountry{}).TableName(), "contains_states"), + NeedIdentificationNumber: gormcol.Field{}.Set((&PsCountry{}).TableName(), "need_identification_number"), + NeedZipCode: gormcol.Field{}.Set((&PsCountry{}).TableName(), "need_zip_code"), + ZipCodeFormat: gormcol.Field{}.Set((&PsCountry{}).TableName(), "zip_code_format"), + DisplayTaxLabel: gormcol.Field{}.Set((&PsCountry{}).TableName(), "display_tax_label"), +} diff --git a/app/model/prestadb/ps_country_lang.go b/app/model/dbmodel/ps_country_lang.go similarity index 51% rename from app/model/prestadb/ps_country_lang.go rename to app/model/dbmodel/ps_country_lang.go index 34dfe30..067dc44 100644 --- a/app/model/prestadb/ps_country_lang.go +++ b/app/model/dbmodel/ps_country_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCountryLang = "ps_country_lang" @@ -17,3 +17,13 @@ type PsCountryLang struct { func (*PsCountryLang) TableName() string { return TableNamePsCountryLang } + +var PsCountryLangCols = struct { + IDCountry gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDCountry: gormcol.Field{}.Set((&PsCountryLang{}).TableName(), "id_country"), + IDLang: gormcol.Field{}.Set((&PsCountryLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsCountryLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_country_shop.go b/app/model/dbmodel/ps_country_shop.go similarity index 55% rename from app/model/prestadb/ps_country_shop.go rename to app/model/dbmodel/ps_country_shop.go index b0342bc..9731d6a 100644 --- a/app/model/prestadb/ps_country_shop.go +++ b/app/model/dbmodel/ps_country_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCountryShop = "ps_country_shop" @@ -16,3 +16,11 @@ type PsCountryShop struct { func (*PsCountryShop) TableName() string { return TableNamePsCountryShop } + +var PsCountryShopCols = struct { + IDCountry gormcol.Field + IDShop gormcol.Field +}{ + IDCountry: gormcol.Field{}.Set((&PsCountryShop{}).TableName(), "id_country"), + IDShop: gormcol.Field{}.Set((&PsCountryShop{}).TableName(), "id_shop"), +} diff --git a/app/model/dbmodel/ps_currency.go b/app/model/dbmodel/ps_currency.go new file mode 100644 index 0000000..c52e075 --- /dev/null +++ b/app/model/dbmodel/ps_currency.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCurrency = "ps_currency" + +// PsCurrency mapped from table +type PsCurrency struct { + IDCurrency int32 `gorm:"column:id_currency;primaryKey;autoIncrement:true" json:"id_currency"` + Name string `gorm:"column:name;not null" json:"name"` + IsoCode string `gorm:"column:iso_code;not null;index:currency_iso_code,priority:1;default:0" json:"iso_code"` + NumericIsoCode *string `gorm:"column:numeric_iso_code" json:"numeric_iso_code"` + Precision int32 `gorm:"column:precision;not null;default:6" json:"precision"` + ConversionRate float64 `gorm:"column:conversion_rate;not null" json:"conversion_rate"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` + Active bool `gorm:"column:active;not null;default:1" json:"active"` +} + +// TableName PsCurrency's table name +func (*PsCurrency) TableName() string { + return TableNamePsCurrency +} + +var PsCurrencyCols = struct { + IDCurrency gormcol.Field + Name gormcol.Field + IsoCode gormcol.Field + NumericIsoCode gormcol.Field + Precision gormcol.Field + ConversionRate gormcol.Field + Deleted gormcol.Field + Active gormcol.Field +}{ + IDCurrency: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "id_currency"), + Name: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "name"), + IsoCode: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "iso_code"), + NumericIsoCode: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "numeric_iso_code"), + Precision: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "precision"), + ConversionRate: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "conversion_rate"), + Deleted: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "deleted"), + Active: gormcol.Field{}.Set((&PsCurrency{}).TableName(), "active"), +} diff --git a/app/model/prestadb/ps_currency_lang.go b/app/model/dbmodel/ps_currency_lang.go similarity index 50% rename from app/model/prestadb/ps_currency_lang.go rename to app/model/dbmodel/ps_currency_lang.go index 8344597..46b59b1 100644 --- a/app/model/prestadb/ps_currency_lang.go +++ b/app/model/dbmodel/ps_currency_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCurrencyLang = "ps_currency_lang" @@ -18,3 +18,15 @@ type PsCurrencyLang struct { func (*PsCurrencyLang) TableName() string { return TableNamePsCurrencyLang } + +var PsCurrencyLangCols = struct { + IDCurrency gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Symbol gormcol.Field +}{ + IDCurrency: gormcol.Field{}.Set((&PsCurrencyLang{}).TableName(), "id_currency"), + IDLang: gormcol.Field{}.Set((&PsCurrencyLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsCurrencyLang{}).TableName(), "name"), + Symbol: gormcol.Field{}.Set((&PsCurrencyLang{}).TableName(), "symbol"), +} diff --git a/app/model/prestadb/ps_currency_shop.go b/app/model/dbmodel/ps_currency_shop.go similarity index 53% rename from app/model/prestadb/ps_currency_shop.go rename to app/model/dbmodel/ps_currency_shop.go index 20906d5..7ab2720 100644 --- a/app/model/prestadb/ps_currency_shop.go +++ b/app/model/dbmodel/ps_currency_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCurrencyShop = "ps_currency_shop" @@ -17,3 +17,13 @@ type PsCurrencyShop struct { func (*PsCurrencyShop) TableName() string { return TableNamePsCurrencyShop } + +var PsCurrencyShopCols = struct { + IDCurrency gormcol.Field + IDShop gormcol.Field + ConversionRate gormcol.Field +}{ + IDCurrency: gormcol.Field{}.Set((&PsCurrencyShop{}).TableName(), "id_currency"), + IDShop: gormcol.Field{}.Set((&PsCurrencyShop{}).TableName(), "id_shop"), + ConversionRate: gormcol.Field{}.Set((&PsCurrencyShop{}).TableName(), "conversion_rate"), +} diff --git a/app/model/prestadb/ps_customer.go b/app/model/dbmodel/ps_customer.go similarity index 50% rename from app/model/prestadb/ps_customer.go rename to app/model/dbmodel/ps_customer.go index ed5b5da..32f2ad3 100644 --- a/app/model/prestadb/ps_customer.go +++ b/app/model/dbmodel/ps_customer.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -51,3 +50,73 @@ type PsCustomer struct { func (*PsCustomer) TableName() string { return TableNamePsCustomer } + +var PsCustomerCols = struct { + IDCustomer gormcol.Field + IDShopGroup gormcol.Field + IDShop gormcol.Field + IDGender gormcol.Field + IDDefaultGroup gormcol.Field + IDLang gormcol.Field + IDRisk gormcol.Field + Company gormcol.Field + Siret gormcol.Field + Ape gormcol.Field + Firstname gormcol.Field + Lastname gormcol.Field + Email gormcol.Field + Passwd gormcol.Field + LastPasswdGen gormcol.Field + Birthday gormcol.Field + Newsletter gormcol.Field + IPRegistrationNewsletter gormcol.Field + NewsletterDateAdd gormcol.Field + Optin gormcol.Field + Website gormcol.Field + OutstandingAllowAmount gormcol.Field + ShowPublicPrices gormcol.Field + MaxPaymentDays gormcol.Field + SecureKey gormcol.Field + Note gormcol.Field + Active gormcol.Field + IsGuest gormcol.Field + Deleted gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + ResetPasswordToken gormcol.Field + ResetPasswordValidity gormcol.Field +}{ + IDCustomer: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "id_customer"), + IDShopGroup: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "id_shop_group"), + IDShop: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "id_shop"), + IDGender: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "id_gender"), + IDDefaultGroup: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "id_default_group"), + IDLang: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "id_lang"), + IDRisk: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "id_risk"), + Company: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "company"), + Siret: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "siret"), + Ape: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "ape"), + Firstname: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "firstname"), + Lastname: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "lastname"), + Email: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "email"), + Passwd: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "passwd"), + LastPasswdGen: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "last_passwd_gen"), + Birthday: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "birthday"), + Newsletter: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "newsletter"), + IPRegistrationNewsletter: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "ip_registration_newsletter"), + NewsletterDateAdd: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "newsletter_date_add"), + Optin: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "optin"), + Website: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "website"), + OutstandingAllowAmount: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "outstanding_allow_amount"), + ShowPublicPrices: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "show_public_prices"), + MaxPaymentDays: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "max_payment_days"), + SecureKey: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "secure_key"), + Note: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "note"), + Active: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "active"), + IsGuest: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "is_guest"), + Deleted: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "deleted"), + DateAdd: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "date_upd"), + ResetPasswordToken: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "reset_password_token"), + ResetPasswordValidity: gormcol.Field{}.Set((&PsCustomer{}).TableName(), "reset_password_validity"), +} diff --git a/app/model/prestadb/ps_customer_group.go b/app/model/dbmodel/ps_customer_group.go similarity index 57% rename from app/model/prestadb/ps_customer_group.go rename to app/model/dbmodel/ps_customer_group.go index c5c3be9..4ec0414 100644 --- a/app/model/prestadb/ps_customer_group.go +++ b/app/model/dbmodel/ps_customer_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCustomerGroup = "ps_customer_group" @@ -16,3 +16,11 @@ type PsCustomerGroup struct { func (*PsCustomerGroup) TableName() string { return TableNamePsCustomerGroup } + +var PsCustomerGroupCols = struct { + IDCustomer gormcol.Field + IDGroup gormcol.Field +}{ + IDCustomer: gormcol.Field{}.Set((&PsCustomerGroup{}).TableName(), "id_customer"), + IDGroup: gormcol.Field{}.Set((&PsCustomerGroup{}).TableName(), "id_group"), +} diff --git a/app/model/dbmodel/ps_customer_message.go b/app/model/dbmodel/ps_customer_message.go new file mode 100644 index 0000000..d70cc10 --- /dev/null +++ b/app/model/dbmodel/ps_customer_message.go @@ -0,0 +1,59 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsCustomerMessage = "ps_customer_message" + +// PsCustomerMessage mapped from table +type PsCustomerMessage struct { + IDCustomerMessage int32 `gorm:"column:id_customer_message;primaryKey;autoIncrement:true" json:"id_customer_message"` + IDCustomerThread *int32 `gorm:"column:id_customer_thread;index:id_customer_thread,priority:1" json:"id_customer_thread"` + IDEmployee *int32 `gorm:"column:id_employee;index:id_employee,priority:1" json:"id_employee"` + Message string `gorm:"column:message;not null" json:"message"` + FileName *string `gorm:"column:file_name" json:"file_name"` + IPAddress *string `gorm:"column:ip_address" json:"ip_address"` + UserAgent *string `gorm:"column:user_agent" json:"user_agent"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` + Private int32 `gorm:"column:private;not null" json:"private"` + Read bool `gorm:"column:read;not null" json:"read"` + Product *string `gorm:"column:product" json:"product"` +} + +// TableName PsCustomerMessage's table name +func (*PsCustomerMessage) TableName() string { + return TableNamePsCustomerMessage +} + +var PsCustomerMessageCols = struct { + IDCustomerMessage gormcol.Field + IDCustomerThread gormcol.Field + IDEmployee gormcol.Field + Message gormcol.Field + FileName gormcol.Field + IPAddress gormcol.Field + UserAgent gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Private gormcol.Field + Read gormcol.Field + Product gormcol.Field +}{ + IDCustomerMessage: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "id_customer_message"), + IDCustomerThread: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "id_customer_thread"), + IDEmployee: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "id_employee"), + Message: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "message"), + FileName: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "file_name"), + IPAddress: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "ip_address"), + UserAgent: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "user_agent"), + DateAdd: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "date_upd"), + Private: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "private"), + Read: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "read"), + Product: gormcol.Field{}.Set((&PsCustomerMessage{}).TableName(), "product"), +} diff --git a/app/model/prestadb/ps_customer_message_sync_imap.go b/app/model/dbmodel/ps_customer_message_sync_imap.go similarity index 63% rename from app/model/prestadb/ps_customer_message_sync_imap.go rename to app/model/dbmodel/ps_customer_message_sync_imap.go index 0e0b669..c3f4ac0 100644 --- a/app/model/prestadb/ps_customer_message_sync_imap.go +++ b/app/model/dbmodel/ps_customer_message_sync_imap.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCustomerMessageSyncImap = "ps_customer_message_sync_imap" @@ -15,3 +15,9 @@ type PsCustomerMessageSyncImap struct { func (*PsCustomerMessageSyncImap) TableName() string { return TableNamePsCustomerMessageSyncImap } + +var PsCustomerMessageSyncImapCols = struct { + Md5Header gormcol.Field +}{ + Md5Header: gormcol.Field{}.Set((&PsCustomerMessageSyncImap{}).TableName(), "md5_header"), +} diff --git a/app/model/prestadb/ps_customer_thread.go b/app/model/dbmodel/ps_customer_thread.go similarity index 50% rename from app/model/prestadb/ps_customer_thread.go rename to app/model/dbmodel/ps_customer_thread.go index 795f1ca..88ed2a1 100644 --- a/app/model/prestadb/ps_customer_thread.go +++ b/app/model/dbmodel/ps_customer_thread.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -30,3 +29,31 @@ type PsCustomerThread struct { func (*PsCustomerThread) TableName() string { return TableNamePsCustomerThread } + +var PsCustomerThreadCols = struct { + IDCustomerThread gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + IDContact gormcol.Field + IDCustomer gormcol.Field + IDOrder gormcol.Field + IDProduct gormcol.Field + Status gormcol.Field + Email gormcol.Field + Token gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDCustomerThread: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "id_customer_thread"), + IDShop: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "id_lang"), + IDContact: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "id_contact"), + IDCustomer: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "id_customer"), + IDOrder: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "id_order"), + IDProduct: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "id_product"), + Status: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "status"), + Email: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "email"), + Token: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "token"), + DateAdd: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsCustomerThread{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_customization.go b/app/model/dbmodel/ps_customization.go similarity index 50% rename from app/model/prestadb/ps_customization.go rename to app/model/dbmodel/ps_customization.go index b67ee6c..d6a618e 100644 --- a/app/model/prestadb/ps_customization.go +++ b/app/model/dbmodel/ps_customization.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCustomization = "ps_customization" @@ -23,3 +23,25 @@ type PsCustomization struct { func (*PsCustomization) TableName() string { return TableNamePsCustomization } + +var PsCustomizationCols = struct { + IDCustomization gormcol.Field + IDProductAttribute gormcol.Field + IDAddressDelivery gormcol.Field + IDCart gormcol.Field + IDProduct gormcol.Field + Quantity gormcol.Field + QuantityRefunded gormcol.Field + QuantityReturned gormcol.Field + InCart gormcol.Field +}{ + IDCustomization: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "id_customization"), + IDProductAttribute: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "id_product_attribute"), + IDAddressDelivery: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "id_address_delivery"), + IDCart: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "id_cart"), + IDProduct: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "id_product"), + Quantity: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "quantity"), + QuantityRefunded: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "quantity_refunded"), + QuantityReturned: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "quantity_returned"), + InCart: gormcol.Field{}.Set((&PsCustomization{}).TableName(), "in_cart"), +} diff --git a/app/model/prestadb/ps_customization_field.go b/app/model/dbmodel/ps_customization_field.go similarity index 50% rename from app/model/prestadb/ps_customization_field.go rename to app/model/dbmodel/ps_customization_field.go index af4c584..a1198ee 100644 --- a/app/model/prestadb/ps_customization_field.go +++ b/app/model/dbmodel/ps_customization_field.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCustomizationField = "ps_customization_field" @@ -20,3 +20,19 @@ type PsCustomizationField struct { func (*PsCustomizationField) TableName() string { return TableNamePsCustomizationField } + +var PsCustomizationFieldCols = struct { + IDCustomizationField gormcol.Field + IDProduct gormcol.Field + Type gormcol.Field + Required gormcol.Field + IsModule gormcol.Field + IsDeleted gormcol.Field +}{ + IDCustomizationField: gormcol.Field{}.Set((&PsCustomizationField{}).TableName(), "id_customization_field"), + IDProduct: gormcol.Field{}.Set((&PsCustomizationField{}).TableName(), "id_product"), + Type: gormcol.Field{}.Set((&PsCustomizationField{}).TableName(), "type"), + Required: gormcol.Field{}.Set((&PsCustomizationField{}).TableName(), "required"), + IsModule: gormcol.Field{}.Set((&PsCustomizationField{}).TableName(), "is_module"), + IsDeleted: gormcol.Field{}.Set((&PsCustomizationField{}).TableName(), "is_deleted"), +} diff --git a/app/model/prestadb/ps_customization_field_lang.go b/app/model/dbmodel/ps_customization_field_lang.go similarity index 53% rename from app/model/prestadb/ps_customization_field_lang.go rename to app/model/dbmodel/ps_customization_field_lang.go index 8f843ac..e891172 100644 --- a/app/model/prestadb/ps_customization_field_lang.go +++ b/app/model/dbmodel/ps_customization_field_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsCustomizationFieldLang = "ps_customization_field_lang" @@ -18,3 +18,15 @@ type PsCustomizationFieldLang struct { func (*PsCustomizationFieldLang) TableName() string { return TableNamePsCustomizationFieldLang } + +var PsCustomizationFieldLangCols = struct { + IDCustomizationField gormcol.Field + IDLang gormcol.Field + IDShop gormcol.Field + Name gormcol.Field +}{ + IDCustomizationField: gormcol.Field{}.Set((&PsCustomizationFieldLang{}).TableName(), "id_customization_field"), + IDLang: gormcol.Field{}.Set((&PsCustomizationFieldLang{}).TableName(), "id_lang"), + IDShop: gormcol.Field{}.Set((&PsCustomizationFieldLang{}).TableName(), "id_shop"), + Name: gormcol.Field{}.Set((&PsCustomizationFieldLang{}).TableName(), "name"), +} diff --git a/app/model/dbmodel/ps_customized_data.go b/app/model/dbmodel/ps_customized_data.go new file mode 100644 index 0000000..a7c052a --- /dev/null +++ b/app/model/dbmodel/ps_customized_data.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsCustomizedDatum = "ps_customized_data" + +// PsCustomizedDatum mapped from table +type PsCustomizedDatum struct { + IDCustomization int32 `gorm:"column:id_customization;primaryKey" json:"id_customization"` + Type bool `gorm:"column:type;primaryKey" json:"type"` + Index int32 `gorm:"column:index;primaryKey" json:"index"` + Value string `gorm:"column:value;not null" json:"value"` + IDModule int32 `gorm:"column:id_module;not null" json:"id_module"` + Price float64 `gorm:"column:price;not null;default:0.000000" json:"price"` + Weight float64 `gorm:"column:weight;not null;default:0.000000" json:"weight"` +} + +// TableName PsCustomizedDatum's table name +func (*PsCustomizedDatum) TableName() string { + return TableNamePsCustomizedDatum +} + +var PsCustomizedDatumCols = struct { + IDCustomization gormcol.Field + Type gormcol.Field + Index gormcol.Field + Value gormcol.Field + IDModule gormcol.Field + Price gormcol.Field + Weight gormcol.Field +}{ + IDCustomization: gormcol.Field{}.Set((&PsCustomizedDatum{}).TableName(), "id_customization"), + Type: gormcol.Field{}.Set((&PsCustomizedDatum{}).TableName(), "type"), + Index: gormcol.Field{}.Set((&PsCustomizedDatum{}).TableName(), "index"), + Value: gormcol.Field{}.Set((&PsCustomizedDatum{}).TableName(), "value"), + IDModule: gormcol.Field{}.Set((&PsCustomizedDatum{}).TableName(), "id_module"), + Price: gormcol.Field{}.Set((&PsCustomizedDatum{}).TableName(), "price"), + Weight: gormcol.Field{}.Set((&PsCustomizedDatum{}).TableName(), "weight"), +} diff --git a/app/model/prestadb/ps_date_range.go b/app/model/dbmodel/ps_date_range.go similarity index 53% rename from app/model/prestadb/ps_date_range.go rename to app/model/dbmodel/ps_date_range.go index bfe3c2e..a4f9c49 100644 --- a/app/model/prestadb/ps_date_range.go +++ b/app/model/dbmodel/ps_date_range.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -21,3 +20,13 @@ type PsDateRange struct { func (*PsDateRange) TableName() string { return TableNamePsDateRange } + +var PsDateRangeCols = struct { + IDDateRange gormcol.Field + TimeStart gormcol.Field + TimeEnd gormcol.Field +}{ + IDDateRange: gormcol.Field{}.Set((&PsDateRange{}).TableName(), "id_date_range"), + TimeStart: gormcol.Field{}.Set((&PsDateRange{}).TableName(), "time_start"), + TimeEnd: gormcol.Field{}.Set((&PsDateRange{}).TableName(), "time_end"), +} diff --git a/app/model/prestadb/ps_delivery.go b/app/model/dbmodel/ps_delivery.go similarity index 50% rename from app/model/prestadb/ps_delivery.go rename to app/model/dbmodel/ps_delivery.go index 543795d..677a386 100644 --- a/app/model/prestadb/ps_delivery.go +++ b/app/model/dbmodel/ps_delivery.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsDelivery = "ps_delivery" @@ -22,3 +22,23 @@ type PsDelivery struct { func (*PsDelivery) TableName() string { return TableNamePsDelivery } + +var PsDeliveryCols = struct { + IDDelivery gormcol.Field + IDShop gormcol.Field + IDShopGroup gormcol.Field + IDCarrier gormcol.Field + IDRangePrice gormcol.Field + IDRangeWeight gormcol.Field + IDZone gormcol.Field + Price gormcol.Field +}{ + IDDelivery: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "id_delivery"), + IDShop: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "id_shop_group"), + IDCarrier: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "id_carrier"), + IDRangePrice: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "id_range_price"), + IDRangeWeight: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "id_range_weight"), + IDZone: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "id_zone"), + Price: gormcol.Field{}.Set((&PsDelivery{}).TableName(), "price"), +} diff --git a/app/model/prestadb/ps_dpdpoland_carrier.go b/app/model/dbmodel/ps_dpdpoland_carrier.go similarity index 52% rename from app/model/prestadb/ps_dpdpoland_carrier.go rename to app/model/dbmodel/ps_dpdpoland_carrier.go index 6bad86f..06d9934 100644 --- a/app/model/prestadb/ps_dpdpoland_carrier.go +++ b/app/model/dbmodel/ps_dpdpoland_carrier.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsDpdpolandCarrier struct { func (*PsDpdpolandCarrier) TableName() string { return TableNamePsDpdpolandCarrier } + +var PsDpdpolandCarrierCols = struct { + IDDpdpolandCarrier gormcol.Field + IDCarrier gormcol.Field + IDReference gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDDpdpolandCarrier: gormcol.Field{}.Set((&PsDpdpolandCarrier{}).TableName(), "id_dpdpoland_carrier"), + IDCarrier: gormcol.Field{}.Set((&PsDpdpolandCarrier{}).TableName(), "id_carrier"), + IDReference: gormcol.Field{}.Set((&PsDpdpolandCarrier{}).TableName(), "id_reference"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandCarrier{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandCarrier{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_dpdpoland_country.go b/app/model/dbmodel/ps_dpdpoland_country.go similarity index 51% rename from app/model/prestadb/ps_dpdpoland_country.go rename to app/model/dbmodel/ps_dpdpoland_country.go index 2db1529..4bc3387 100644 --- a/app/model/prestadb/ps_dpdpoland_country.go +++ b/app/model/dbmodel/ps_dpdpoland_country.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsDpdpolandCountry struct { func (*PsDpdpolandCountry) TableName() string { return TableNamePsDpdpolandCountry } + +var PsDpdpolandCountryCols = struct { + IDDpdpolandCountry gormcol.Field + IDShop gormcol.Field + IDCountry gormcol.Field + Enabled gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDDpdpolandCountry: gormcol.Field{}.Set((&PsDpdpolandCountry{}).TableName(), "id_dpdpoland_country"), + IDShop: gormcol.Field{}.Set((&PsDpdpolandCountry{}).TableName(), "id_shop"), + IDCountry: gormcol.Field{}.Set((&PsDpdpolandCountry{}).TableName(), "id_country"), + Enabled: gormcol.Field{}.Set((&PsDpdpolandCountry{}).TableName(), "enabled"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandCountry{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandCountry{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_dpdpoland_manifest.go b/app/model/dbmodel/ps_dpdpoland_manifest.go similarity index 53% rename from app/model/prestadb/ps_dpdpoland_manifest.go rename to app/model/dbmodel/ps_dpdpoland_manifest.go index f1f26c2..9e2d36c 100644 --- a/app/model/prestadb/ps_dpdpoland_manifest.go +++ b/app/model/dbmodel/ps_dpdpoland_manifest.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsDpdpolandManifest struct { func (*PsDpdpolandManifest) TableName() string { return TableNamePsDpdpolandManifest } + +var PsDpdpolandManifestCols = struct { + IDManifest gormcol.Field + IDManifestWs gormcol.Field + IDPackageWs gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDManifest: gormcol.Field{}.Set((&PsDpdpolandManifest{}).TableName(), "id_manifest"), + IDManifestWs: gormcol.Field{}.Set((&PsDpdpolandManifest{}).TableName(), "id_manifest_ws"), + IDPackageWs: gormcol.Field{}.Set((&PsDpdpolandManifest{}).TableName(), "id_package_ws"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandManifest{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandManifest{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_dpdpoland_package.go b/app/model/dbmodel/ps_dpdpoland_package.go new file mode 100644 index 0000000..e9fd6fb --- /dev/null +++ b/app/model/dbmodel/ps_dpdpoland_package.go @@ -0,0 +1,86 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsDpdpolandPackage = "ps_dpdpoland_package" + +// PsDpdpolandPackage mapped from table +type PsDpdpolandPackage struct { + IDPackage int32 `gorm:"column:id_package;primaryKey;autoIncrement:true" json:"id_package"` + IDPackageWs int32 `gorm:"column:id_package_ws;not null;uniqueIndex:id_package_ws,priority:1" json:"id_package_ws"` + IDOrder int32 `gorm:"column:id_order;not null" json:"id_order"` + SessionID int32 `gorm:"column:sessionId;not null" json:"sessionId"` + SessionType string `gorm:"column:sessionType;not null" json:"sessionType"` + PayerNumber string `gorm:"column:payerNumber;not null" json:"payerNumber"` + IDAddressSender int32 `gorm:"column:id_address_sender;not null" json:"id_address_sender"` + IDAddressDelivery int32 `gorm:"column:id_address_delivery;not null" json:"id_address_delivery"` + CodAmount *float64 `gorm:"column:cod_amount" json:"cod_amount"` + DeclaredValueAmount *float64 `gorm:"column:declaredValue_amount" json:"declaredValue_amount"` + Ref1 *string `gorm:"column:ref1" json:"ref1"` + Ref2 *string `gorm:"column:ref2" json:"ref2"` + AdditionalInfo *string `gorm:"column:additional_info" json:"additional_info"` + LabelsPrinted bool `gorm:"column:labels_printed;not null" json:"labels_printed"` + IDSenderAddress int32 `gorm:"column:id_sender_address;not null" json:"id_sender_address"` + Cud bool `gorm:"column:cud;not null" json:"cud"` + Rod bool `gorm:"column:rod;not null" json:"rod"` + Dpde bool `gorm:"column:dpde;not null" json:"dpde"` + Dpdnd bool `gorm:"column:dpdnd;not null" json:"dpdnd"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsDpdpolandPackage's table name +func (*PsDpdpolandPackage) TableName() string { + return TableNamePsDpdpolandPackage +} + +var PsDpdpolandPackageCols = struct { + IDPackage gormcol.Field + IDPackageWs gormcol.Field + IDOrder gormcol.Field + SessionID gormcol.Field + SessionType gormcol.Field + PayerNumber gormcol.Field + IDAddressSender gormcol.Field + IDAddressDelivery gormcol.Field + CodAmount gormcol.Field + DeclaredValueAmount gormcol.Field + Ref1 gormcol.Field + Ref2 gormcol.Field + AdditionalInfo gormcol.Field + LabelsPrinted gormcol.Field + IDSenderAddress gormcol.Field + Cud gormcol.Field + Rod gormcol.Field + Dpde gormcol.Field + Dpdnd gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDPackage: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "id_package"), + IDPackageWs: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "id_package_ws"), + IDOrder: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "id_order"), + SessionID: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "sessionId"), + SessionType: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "sessionType"), + PayerNumber: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "payerNumber"), + IDAddressSender: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "id_address_sender"), + IDAddressDelivery: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "id_address_delivery"), + CodAmount: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "cod_amount"), + DeclaredValueAmount: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "declaredValue_amount"), + Ref1: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "ref1"), + Ref2: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "ref2"), + AdditionalInfo: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "additional_info"), + LabelsPrinted: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "labels_printed"), + IDSenderAddress: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "id_sender_address"), + Cud: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "cud"), + Rod: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "rod"), + Dpde: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "dpde"), + Dpdnd: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "dpdnd"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandPackage{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_dpdpoland_parcel.go b/app/model/dbmodel/ps_dpdpoland_parcel.go new file mode 100644 index 0000000..9a3230e --- /dev/null +++ b/app/model/dbmodel/ps_dpdpoland_parcel.go @@ -0,0 +1,56 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsDpdpolandParcel = "ps_dpdpoland_parcel" + +// PsDpdpolandParcel mapped from table +type PsDpdpolandParcel struct { + IDParcel int32 `gorm:"column:id_parcel;primaryKey" json:"id_parcel"` + IDPackageWs int32 `gorm:"column:id_package_ws;not null" json:"id_package_ws"` + Waybill string `gorm:"column:waybill;not null" json:"waybill"` + Content string `gorm:"column:content;not null" json:"content"` + Weight float64 `gorm:"column:weight;not null" json:"weight"` + Height float64 `gorm:"column:height;not null" json:"height"` + Length float64 `gorm:"column:length;not null" json:"length"` + Width float64 `gorm:"column:width;not null" json:"width"` + Number int32 `gorm:"column:number;not null" json:"number"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsDpdpolandParcel's table name +func (*PsDpdpolandParcel) TableName() string { + return TableNamePsDpdpolandParcel +} + +var PsDpdpolandParcelCols = struct { + IDParcel gormcol.Field + IDPackageWs gormcol.Field + Waybill gormcol.Field + Content gormcol.Field + Weight gormcol.Field + Height gormcol.Field + Length gormcol.Field + Width gormcol.Field + Number gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDParcel: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "id_parcel"), + IDPackageWs: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "id_package_ws"), + Waybill: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "waybill"), + Content: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "content"), + Weight: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "weight"), + Height: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "height"), + Length: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "length"), + Width: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "width"), + Number: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "number"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandParcel{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_dpdpoland_parcel_product.go b/app/model/dbmodel/ps_dpdpoland_parcel_product.go new file mode 100644 index 0000000..9f527c1 --- /dev/null +++ b/app/model/dbmodel/ps_dpdpoland_parcel_product.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsDpdpolandParcelProduct = "ps_dpdpoland_parcel_product" + +// PsDpdpolandParcelProduct mapped from table +type PsDpdpolandParcelProduct struct { + IDParcelProduct int32 `gorm:"column:id_parcel_product;primaryKey;autoIncrement:true" json:"id_parcel_product"` + IDParcel int32 `gorm:"column:id_parcel;not null" json:"id_parcel"` + IDProduct int32 `gorm:"column:id_product;not null" json:"id_product"` + IDProductAttribute int32 `gorm:"column:id_product_attribute;not null" json:"id_product_attribute"` + Name string `gorm:"column:name;not null" json:"name"` + Weight float64 `gorm:"column:weight;not null" json:"weight"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsDpdpolandParcelProduct's table name +func (*PsDpdpolandParcelProduct) TableName() string { + return TableNamePsDpdpolandParcelProduct +} + +var PsDpdpolandParcelProductCols = struct { + IDParcelProduct gormcol.Field + IDParcel gormcol.Field + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + Name gormcol.Field + Weight gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDParcelProduct: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "id_parcel_product"), + IDParcel: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "id_parcel"), + IDProduct: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "id_product_attribute"), + Name: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "name"), + Weight: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "weight"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandParcelProduct{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_dpdpoland_payer_number.go b/app/model/dbmodel/ps_dpdpoland_payer_number.go similarity index 52% rename from app/model/prestadb/ps_dpdpoland_payer_number.go rename to app/model/dbmodel/ps_dpdpoland_payer_number.go index f740db6..ca06912 100644 --- a/app/model/prestadb/ps_dpdpoland_payer_number.go +++ b/app/model/dbmodel/ps_dpdpoland_payer_number.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsDpdpolandPayerNumber struct { func (*PsDpdpolandPayerNumber) TableName() string { return TableNamePsDpdpolandPayerNumber } + +var PsDpdpolandPayerNumberCols = struct { + IDDpdpolandPayerNumber gormcol.Field + IDShop gormcol.Field + PayerNumber gormcol.Field + Name gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDDpdpolandPayerNumber: gormcol.Field{}.Set((&PsDpdpolandPayerNumber{}).TableName(), "id_dpdpoland_payer_number"), + IDShop: gormcol.Field{}.Set((&PsDpdpolandPayerNumber{}).TableName(), "id_shop"), + PayerNumber: gormcol.Field{}.Set((&PsDpdpolandPayerNumber{}).TableName(), "payer_number"), + Name: gormcol.Field{}.Set((&PsDpdpolandPayerNumber{}).TableName(), "name"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandPayerNumber{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandPayerNumber{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_dpdpoland_price_rule.go b/app/model/dbmodel/ps_dpdpoland_price_rule.go new file mode 100644 index 0000000..5a2d871 --- /dev/null +++ b/app/model/dbmodel/ps_dpdpoland_price_rule.go @@ -0,0 +1,59 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsDpdpolandPriceRule = "ps_dpdpoland_price_rule" + +// PsDpdpolandPriceRule mapped from table +type PsDpdpolandPriceRule struct { + IDCsv int32 `gorm:"column:id_csv;primaryKey;autoIncrement:true" json:"id_csv"` + IDShop int32 `gorm:"column:id_shop;not null" json:"id_shop"` + DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` + IsoCountry string `gorm:"column:iso_country;not null" json:"iso_country"` + PriceFrom float64 `gorm:"column:price_from;not null" json:"price_from"` + PriceTo float64 `gorm:"column:price_to;not null" json:"price_to"` + WeightFrom float64 `gorm:"column:weight_from;not null" json:"weight_from"` + WeightTo float64 `gorm:"column:weight_to;not null" json:"weight_to"` + ParcelPrice float32 `gorm:"column:parcel_price;not null" json:"parcel_price"` + CodPrice string `gorm:"column:cod_price;not null" json:"cod_price"` + IDCarrier string `gorm:"column:id_carrier;not null" json:"id_carrier"` +} + +// TableName PsDpdpolandPriceRule's table name +func (*PsDpdpolandPriceRule) TableName() string { + return TableNamePsDpdpolandPriceRule +} + +var PsDpdpolandPriceRuleCols = struct { + IDCsv gormcol.Field + IDShop gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + IsoCountry gormcol.Field + PriceFrom gormcol.Field + PriceTo gormcol.Field + WeightFrom gormcol.Field + WeightTo gormcol.Field + ParcelPrice gormcol.Field + CodPrice gormcol.Field + IDCarrier gormcol.Field +}{ + IDCsv: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "id_csv"), + IDShop: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "id_shop"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "date_upd"), + IsoCountry: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "iso_country"), + PriceFrom: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "price_from"), + PriceTo: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "price_to"), + WeightFrom: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "weight_from"), + WeightTo: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "weight_to"), + ParcelPrice: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "parcel_price"), + CodPrice: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "cod_price"), + IDCarrier: gormcol.Field{}.Set((&PsDpdpolandPriceRule{}).TableName(), "id_carrier"), +} diff --git a/app/model/prestadb/ps_dpdpoland_pudo_cart.go b/app/model/dbmodel/ps_dpdpoland_pudo_cart.go similarity index 55% rename from app/model/prestadb/ps_dpdpoland_pudo_cart.go rename to app/model/dbmodel/ps_dpdpoland_pudo_cart.go index beb2794..591ef07 100644 --- a/app/model/prestadb/ps_dpdpoland_pudo_cart.go +++ b/app/model/dbmodel/ps_dpdpoland_pudo_cart.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsDpdpolandPudoCart = "ps_dpdpoland_pudo_cart" @@ -16,3 +16,11 @@ type PsDpdpolandPudoCart struct { func (*PsDpdpolandPudoCart) TableName() string { return TableNamePsDpdpolandPudoCart } + +var PsDpdpolandPudoCartCols = struct { + PudoCode gormcol.Field + IDCart gormcol.Field +}{ + PudoCode: gormcol.Field{}.Set((&PsDpdpolandPudoCart{}).TableName(), "pudo_code"), + IDCart: gormcol.Field{}.Set((&PsDpdpolandPudoCart{}).TableName(), "id_cart"), +} diff --git a/app/model/dbmodel/ps_dpdpoland_sender_address.go b/app/model/dbmodel/ps_dpdpoland_sender_address.go new file mode 100644 index 0000000..b539818 --- /dev/null +++ b/app/model/dbmodel/ps_dpdpoland_sender_address.go @@ -0,0 +1,59 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsDpdpolandSenderAddress = "ps_dpdpoland_sender_address" + +// PsDpdpolandSenderAddress mapped from table +type PsDpdpolandSenderAddress struct { + IDSenderAddress int32 `gorm:"column:id_sender_address;primaryKey;autoIncrement:true" json:"id_sender_address"` + Alias string `gorm:"column:alias;not null" json:"alias"` + Company string `gorm:"column:company;not null" json:"company"` + Name string `gorm:"column:name;not null" json:"name"` + Address string `gorm:"column:address;not null" json:"address"` + City string `gorm:"column:city;not null" json:"city"` + Email string `gorm:"column:email;not null" json:"email"` + Postcode string `gorm:"column:postcode;not null" json:"postcode"` + Phone string `gorm:"column:phone;not null" json:"phone"` + IDShop int32 `gorm:"column:id_shop;not null" json:"id_shop"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsDpdpolandSenderAddress's table name +func (*PsDpdpolandSenderAddress) TableName() string { + return TableNamePsDpdpolandSenderAddress +} + +var PsDpdpolandSenderAddressCols = struct { + IDSenderAddress gormcol.Field + Alias gormcol.Field + Company gormcol.Field + Name gormcol.Field + Address gormcol.Field + City gormcol.Field + Email gormcol.Field + Postcode gormcol.Field + Phone gormcol.Field + IDShop gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDSenderAddress: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "id_sender_address"), + Alias: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "alias"), + Company: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "company"), + Name: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "name"), + Address: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "address"), + City: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "city"), + Email: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "email"), + Postcode: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "postcode"), + Phone: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "phone"), + IDShop: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "id_shop"), + DateAdd: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsDpdpolandSenderAddress{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_emailsubscription.go b/app/model/dbmodel/ps_emailsubscription.go similarity index 50% rename from app/model/prestadb/ps_emailsubscription.go rename to app/model/dbmodel/ps_emailsubscription.go index 6710a39..535411d 100644 --- a/app/model/prestadb/ps_emailsubscription.go +++ b/app/model/dbmodel/ps_emailsubscription.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -27,3 +26,25 @@ type PsEmailsubscription struct { func (*PsEmailsubscription) TableName() string { return TableNamePsEmailsubscription } + +var PsEmailsubscriptionCols = struct { + ID gormcol.Field + IDShop gormcol.Field + IDShopGroup gormcol.Field + Email gormcol.Field + NewsletterDateAdd gormcol.Field + IPRegistrationNewsletter gormcol.Field + HTTPReferer gormcol.Field + Active gormcol.Field + IDLang gormcol.Field +}{ + ID: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "id"), + IDShop: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "id_shop_group"), + Email: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "email"), + NewsletterDateAdd: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "newsletter_date_add"), + IPRegistrationNewsletter: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "ip_registration_newsletter"), + HTTPReferer: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "http_referer"), + Active: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "active"), + IDLang: gormcol.Field{}.Set((&PsEmailsubscription{}).TableName(), "id_lang"), +} diff --git a/app/model/dbmodel/ps_employee.go b/app/model/dbmodel/ps_employee.go new file mode 100644 index 0000000..492234a --- /dev/null +++ b/app/model/dbmodel/ps_employee.go @@ -0,0 +1,107 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsEmployee = "ps_employee" + +// PsEmployee mapped from table +type PsEmployee struct { + IDEmployee int32 `gorm:"column:id_employee;primaryKey;autoIncrement:true;index:id_employee_passwd,priority:1" json:"id_employee"` + IDProfile int32 `gorm:"column:id_profile;not null;index:id_profile,priority:1" json:"id_profile"` + IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` + Lastname string `gorm:"column:lastname;not null" json:"lastname"` + Firstname string `gorm:"column:firstname;not null" json:"firstname"` + Email string `gorm:"column:email;not null;index:employee_login,priority:1" json:"email"` + Passwd string `gorm:"column:passwd;not null;index:employee_login,priority:2;index:id_employee_passwd,priority:2" json:"passwd"` + LastPasswdGen time.Time `gorm:"column:last_passwd_gen;not null;default:current_timestamp()" json:"last_passwd_gen"` + StatsDateFrom *time.Time `gorm:"column:stats_date_from" json:"stats_date_from"` + StatsDateTo *time.Time `gorm:"column:stats_date_to" json:"stats_date_to"` + StatsCompareFrom *time.Time `gorm:"column:stats_compare_from" json:"stats_compare_from"` + StatsCompareTo *time.Time `gorm:"column:stats_compare_to" json:"stats_compare_to"` + StatsCompareOption int32 `gorm:"column:stats_compare_option;not null;default:1" json:"stats_compare_option"` + PreselectDateRange *string `gorm:"column:preselect_date_range" json:"preselect_date_range"` + BoColor *string `gorm:"column:bo_color" json:"bo_color"` + BoTheme *string `gorm:"column:bo_theme" json:"bo_theme"` + BoCSS *string `gorm:"column:bo_css" json:"bo_css"` + DefaultTab int32 `gorm:"column:default_tab;not null" json:"default_tab"` + BoWidth int32 `gorm:"column:bo_width;not null" json:"bo_width"` + BoMenu bool `gorm:"column:bo_menu;not null;default:1" json:"bo_menu"` + Active bool `gorm:"column:active;not null" json:"active"` + Optin bool `gorm:"column:optin;not null;default:1" json:"optin"` + IDLastOrder int32 `gorm:"column:id_last_order;not null" json:"id_last_order"` + IDLastCustomerMessage int32 `gorm:"column:id_last_customer_message;not null" json:"id_last_customer_message"` + IDLastCustomer int32 `gorm:"column:id_last_customer;not null" json:"id_last_customer"` + LastConnectionDate *time.Time `gorm:"column:last_connection_date" json:"last_connection_date"` + ResetPasswordToken *string `gorm:"column:reset_password_token" json:"reset_password_token"` + ResetPasswordValidity *time.Time `gorm:"column:reset_password_validity" json:"reset_password_validity"` +} + +// TableName PsEmployee's table name +func (*PsEmployee) TableName() string { + return TableNamePsEmployee +} + +var PsEmployeeCols = struct { + IDEmployee gormcol.Field + IDProfile gormcol.Field + IDLang gormcol.Field + Lastname gormcol.Field + Firstname gormcol.Field + Email gormcol.Field + Passwd gormcol.Field + LastPasswdGen gormcol.Field + StatsDateFrom gormcol.Field + StatsDateTo gormcol.Field + StatsCompareFrom gormcol.Field + StatsCompareTo gormcol.Field + StatsCompareOption gormcol.Field + PreselectDateRange gormcol.Field + BoColor gormcol.Field + BoTheme gormcol.Field + BoCSS gormcol.Field + DefaultTab gormcol.Field + BoWidth gormcol.Field + BoMenu gormcol.Field + Active gormcol.Field + Optin gormcol.Field + IDLastOrder gormcol.Field + IDLastCustomerMessage gormcol.Field + IDLastCustomer gormcol.Field + LastConnectionDate gormcol.Field + ResetPasswordToken gormcol.Field + ResetPasswordValidity gormcol.Field +}{ + IDEmployee: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "id_employee"), + IDProfile: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "id_profile"), + IDLang: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "id_lang"), + Lastname: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "lastname"), + Firstname: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "firstname"), + Email: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "email"), + Passwd: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "passwd"), + LastPasswdGen: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "last_passwd_gen"), + StatsDateFrom: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "stats_date_from"), + StatsDateTo: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "stats_date_to"), + StatsCompareFrom: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "stats_compare_from"), + StatsCompareTo: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "stats_compare_to"), + StatsCompareOption: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "stats_compare_option"), + PreselectDateRange: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "preselect_date_range"), + BoColor: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "bo_color"), + BoTheme: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "bo_theme"), + BoCSS: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "bo_css"), + DefaultTab: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "default_tab"), + BoWidth: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "bo_width"), + BoMenu: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "bo_menu"), + Active: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "active"), + Optin: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "optin"), + IDLastOrder: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "id_last_order"), + IDLastCustomerMessage: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "id_last_customer_message"), + IDLastCustomer: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "id_last_customer"), + LastConnectionDate: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "last_connection_date"), + ResetPasswordToken: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "reset_password_token"), + ResetPasswordValidity: gormcol.Field{}.Set((&PsEmployee{}).TableName(), "reset_password_validity"), +} diff --git a/app/model/prestadb/ps_employee_shop.go b/app/model/dbmodel/ps_employee_shop.go similarity index 55% rename from app/model/prestadb/ps_employee_shop.go rename to app/model/dbmodel/ps_employee_shop.go index 89d4542..5dcf538 100644 --- a/app/model/prestadb/ps_employee_shop.go +++ b/app/model/dbmodel/ps_employee_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsEmployeeShop = "ps_employee_shop" @@ -16,3 +16,11 @@ type PsEmployeeShop struct { func (*PsEmployeeShop) TableName() string { return TableNamePsEmployeeShop } + +var PsEmployeeShopCols = struct { + IDEmployee gormcol.Field + IDShop gormcol.Field +}{ + IDEmployee: gormcol.Field{}.Set((&PsEmployeeShop{}).TableName(), "id_employee"), + IDShop: gormcol.Field{}.Set((&PsEmployeeShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_export_invoice.go b/app/model/dbmodel/ps_export_invoice.go similarity index 52% rename from app/model/prestadb/ps_export_invoice.go rename to app/model/dbmodel/ps_export_invoice.go index 45df0f4..57495ee 100644 --- a/app/model/prestadb/ps_export_invoice.go +++ b/app/model/dbmodel/ps_export_invoice.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsExportInvoice = "ps_export_invoice" @@ -17,3 +17,13 @@ type PsExportInvoice struct { func (*PsExportInvoice) TableName() string { return TableNamePsExportInvoice } + +var PsExportInvoiceCols = struct { + ID gormcol.Field + IDOrder gormcol.Field + IsExport gormcol.Field +}{ + ID: gormcol.Field{}.Set((&PsExportInvoice{}).TableName(), "id"), + IDOrder: gormcol.Field{}.Set((&PsExportInvoice{}).TableName(), "id_order"), + IsExport: gormcol.Field{}.Set((&PsExportInvoice{}).TableName(), "is_export"), +} diff --git a/app/model/prestadb/ps_feature.go b/app/model/dbmodel/ps_feature.go similarity index 53% rename from app/model/prestadb/ps_feature.go rename to app/model/dbmodel/ps_feature.go index b942523..aaf283c 100644 --- a/app/model/prestadb/ps_feature.go +++ b/app/model/dbmodel/ps_feature.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsFeature = "ps_feature" @@ -16,3 +16,11 @@ type PsFeature struct { func (*PsFeature) TableName() string { return TableNamePsFeature } + +var PsFeatureCols = struct { + IDFeature gormcol.Field + Position gormcol.Field +}{ + IDFeature: gormcol.Field{}.Set((&PsFeature{}).TableName(), "id_feature"), + Position: gormcol.Field{}.Set((&PsFeature{}).TableName(), "position"), +} diff --git a/app/model/prestadb/ps_feature_lang.go b/app/model/dbmodel/ps_feature_lang.go similarity index 53% rename from app/model/prestadb/ps_feature_lang.go rename to app/model/dbmodel/ps_feature_lang.go index 79a0473..5141dee 100644 --- a/app/model/prestadb/ps_feature_lang.go +++ b/app/model/dbmodel/ps_feature_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsFeatureLang = "ps_feature_lang" @@ -17,3 +17,13 @@ type PsFeatureLang struct { func (*PsFeatureLang) TableName() string { return TableNamePsFeatureLang } + +var PsFeatureLangCols = struct { + IDFeature gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDFeature: gormcol.Field{}.Set((&PsFeatureLang{}).TableName(), "id_feature"), + IDLang: gormcol.Field{}.Set((&PsFeatureLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsFeatureLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_feature_product.go b/app/model/dbmodel/ps_feature_product.go similarity index 59% rename from app/model/prestadb/ps_feature_product.go rename to app/model/dbmodel/ps_feature_product.go index 18b97bf..e0b9858 100644 --- a/app/model/prestadb/ps_feature_product.go +++ b/app/model/dbmodel/ps_feature_product.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsFeatureProduct = "ps_feature_product" @@ -17,3 +17,13 @@ type PsFeatureProduct struct { func (*PsFeatureProduct) TableName() string { return TableNamePsFeatureProduct } + +var PsFeatureProductCols = struct { + IDFeature gormcol.Field + IDProduct gormcol.Field + IDFeatureValue gormcol.Field +}{ + IDFeature: gormcol.Field{}.Set((&PsFeatureProduct{}).TableName(), "id_feature"), + IDProduct: gormcol.Field{}.Set((&PsFeatureProduct{}).TableName(), "id_product"), + IDFeatureValue: gormcol.Field{}.Set((&PsFeatureProduct{}).TableName(), "id_feature_value"), +} diff --git a/app/model/prestadb/ps_feature_shop.go b/app/model/dbmodel/ps_feature_shop.go similarity index 55% rename from app/model/prestadb/ps_feature_shop.go rename to app/model/dbmodel/ps_feature_shop.go index aaebe97..7049851 100644 --- a/app/model/prestadb/ps_feature_shop.go +++ b/app/model/dbmodel/ps_feature_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsFeatureShop = "ps_feature_shop" @@ -16,3 +16,11 @@ type PsFeatureShop struct { func (*PsFeatureShop) TableName() string { return TableNamePsFeatureShop } + +var PsFeatureShopCols = struct { + IDFeature gormcol.Field + IDShop gormcol.Field +}{ + IDFeature: gormcol.Field{}.Set((&PsFeatureShop{}).TableName(), "id_feature"), + IDShop: gormcol.Field{}.Set((&PsFeatureShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_feature_value.go b/app/model/dbmodel/ps_feature_value.go similarity index 53% rename from app/model/prestadb/ps_feature_value.go rename to app/model/dbmodel/ps_feature_value.go index cf9253e..3ba7c7b 100644 --- a/app/model/prestadb/ps_feature_value.go +++ b/app/model/dbmodel/ps_feature_value.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsFeatureValue = "ps_feature_value" @@ -17,3 +17,13 @@ type PsFeatureValue struct { func (*PsFeatureValue) TableName() string { return TableNamePsFeatureValue } + +var PsFeatureValueCols = struct { + IDFeatureValue gormcol.Field + IDFeature gormcol.Field + Custom gormcol.Field +}{ + IDFeatureValue: gormcol.Field{}.Set((&PsFeatureValue{}).TableName(), "id_feature_value"), + IDFeature: gormcol.Field{}.Set((&PsFeatureValue{}).TableName(), "id_feature"), + Custom: gormcol.Field{}.Set((&PsFeatureValue{}).TableName(), "custom"), +} diff --git a/app/model/prestadb/ps_feature_value_lang.go b/app/model/dbmodel/ps_feature_value_lang.go similarity index 52% rename from app/model/prestadb/ps_feature_value_lang.go rename to app/model/dbmodel/ps_feature_value_lang.go index eb40387..ead73ea 100644 --- a/app/model/prestadb/ps_feature_value_lang.go +++ b/app/model/dbmodel/ps_feature_value_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsFeatureValueLang = "ps_feature_value_lang" @@ -17,3 +17,13 @@ type PsFeatureValueLang struct { func (*PsFeatureValueLang) TableName() string { return TableNamePsFeatureValueLang } + +var PsFeatureValueLangCols = struct { + IDFeatureValue gormcol.Field + IDLang gormcol.Field + Value gormcol.Field +}{ + IDFeatureValue: gormcol.Field{}.Set((&PsFeatureValueLang{}).TableName(), "id_feature_value"), + IDLang: gormcol.Field{}.Set((&PsFeatureValueLang{}).TableName(), "id_lang"), + Value: gormcol.Field{}.Set((&PsFeatureValueLang{}).TableName(), "value"), +} diff --git a/app/model/prestadb/ps_gender.go b/app/model/dbmodel/ps_gender.go similarity index 53% rename from app/model/prestadb/ps_gender.go rename to app/model/dbmodel/ps_gender.go index 4e1abd7..3c79c9c 100644 --- a/app/model/prestadb/ps_gender.go +++ b/app/model/dbmodel/ps_gender.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsGender = "ps_gender" @@ -16,3 +16,11 @@ type PsGender struct { func (*PsGender) TableName() string { return TableNamePsGender } + +var PsGenderCols = struct { + IDGender gormcol.Field + Type gormcol.Field +}{ + IDGender: gormcol.Field{}.Set((&PsGender{}).TableName(), "id_gender"), + Type: gormcol.Field{}.Set((&PsGender{}).TableName(), "type"), +} diff --git a/app/model/prestadb/ps_gender_lang.go b/app/model/dbmodel/ps_gender_lang.go similarity index 52% rename from app/model/prestadb/ps_gender_lang.go rename to app/model/dbmodel/ps_gender_lang.go index 6926d88..8a86f25 100644 --- a/app/model/prestadb/ps_gender_lang.go +++ b/app/model/dbmodel/ps_gender_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsGenderLang = "ps_gender_lang" @@ -17,3 +17,13 @@ type PsGenderLang struct { func (*PsGenderLang) TableName() string { return TableNamePsGenderLang } + +var PsGenderLangCols = struct { + IDGender gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDGender: gormcol.Field{}.Set((&PsGenderLang{}).TableName(), "id_gender"), + IDLang: gormcol.Field{}.Set((&PsGenderLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsGenderLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_group.go b/app/model/dbmodel/ps_group.go similarity index 51% rename from app/model/prestadb/ps_group.go rename to app/model/dbmodel/ps_group.go index 2a5526d..3016754 100644 --- a/app/model/prestadb/ps_group.go +++ b/app/model/dbmodel/ps_group.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsGroup struct { func (*PsGroup) TableName() string { return TableNamePsGroup } + +var PsGroupCols = struct { + IDGroup gormcol.Field + Reduction gormcol.Field + PriceDisplayMethod gormcol.Field + ShowPrices gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDGroup: gormcol.Field{}.Set((&PsGroup{}).TableName(), "id_group"), + Reduction: gormcol.Field{}.Set((&PsGroup{}).TableName(), "reduction"), + PriceDisplayMethod: gormcol.Field{}.Set((&PsGroup{}).TableName(), "price_display_method"), + ShowPrices: gormcol.Field{}.Set((&PsGroup{}).TableName(), "show_prices"), + DateAdd: gormcol.Field{}.Set((&PsGroup{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsGroup{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_group_lang.go b/app/model/dbmodel/ps_group_lang.go similarity index 50% rename from app/model/prestadb/ps_group_lang.go rename to app/model/dbmodel/ps_group_lang.go index 6b03c0a..861f770 100644 --- a/app/model/prestadb/ps_group_lang.go +++ b/app/model/dbmodel/ps_group_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsGroupLang = "ps_group_lang" @@ -17,3 +17,13 @@ type PsGroupLang struct { func (*PsGroupLang) TableName() string { return TableNamePsGroupLang } + +var PsGroupLangCols = struct { + IDGroup gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDGroup: gormcol.Field{}.Set((&PsGroupLang{}).TableName(), "id_group"), + IDLang: gormcol.Field{}.Set((&PsGroupLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsGroupLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_group_reduction.go b/app/model/dbmodel/ps_group_reduction.go similarity index 54% rename from app/model/prestadb/ps_group_reduction.go rename to app/model/dbmodel/ps_group_reduction.go index a4981a0..8f96a3a 100644 --- a/app/model/prestadb/ps_group_reduction.go +++ b/app/model/dbmodel/ps_group_reduction.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsGroupReduction = "ps_group_reduction" @@ -18,3 +18,15 @@ type PsGroupReduction struct { func (*PsGroupReduction) TableName() string { return TableNamePsGroupReduction } + +var PsGroupReductionCols = struct { + IDGroupReduction gormcol.Field + IDGroup gormcol.Field + IDCategory gormcol.Field + Reduction gormcol.Field +}{ + IDGroupReduction: gormcol.Field{}.Set((&PsGroupReduction{}).TableName(), "id_group_reduction"), + IDGroup: gormcol.Field{}.Set((&PsGroupReduction{}).TableName(), "id_group"), + IDCategory: gormcol.Field{}.Set((&PsGroupReduction{}).TableName(), "id_category"), + Reduction: gormcol.Field{}.Set((&PsGroupReduction{}).TableName(), "reduction"), +} diff --git a/app/model/prestadb/ps_group_shop.go b/app/model/dbmodel/ps_group_shop.go similarity index 54% rename from app/model/prestadb/ps_group_shop.go rename to app/model/dbmodel/ps_group_shop.go index 7a140c7..8f8bba1 100644 --- a/app/model/prestadb/ps_group_shop.go +++ b/app/model/dbmodel/ps_group_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsGroupShop = "ps_group_shop" @@ -16,3 +16,11 @@ type PsGroupShop struct { func (*PsGroupShop) TableName() string { return TableNamePsGroupShop } + +var PsGroupShopCols = struct { + IDGroup gormcol.Field + IDShop gormcol.Field +}{ + IDGroup: gormcol.Field{}.Set((&PsGroupShop{}).TableName(), "id_group"), + IDShop: gormcol.Field{}.Set((&PsGroupShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_gsitemap_sitemap.go b/app/model/dbmodel/ps_gsitemap_sitemap.go similarity index 53% rename from app/model/prestadb/ps_gsitemap_sitemap.go rename to app/model/dbmodel/ps_gsitemap_sitemap.go index 586381f..2f1256e 100644 --- a/app/model/prestadb/ps_gsitemap_sitemap.go +++ b/app/model/dbmodel/ps_gsitemap_sitemap.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsGsitemapSitemap = "ps_gsitemap_sitemap" @@ -16,3 +16,11 @@ type PsGsitemapSitemap struct { func (*PsGsitemapSitemap) TableName() string { return TableNamePsGsitemapSitemap } + +var PsGsitemapSitemapCols = struct { + Link gormcol.Field + IDShop gormcol.Field +}{ + Link: gormcol.Field{}.Set((&PsGsitemapSitemap{}).TableName(), "link"), + IDShop: gormcol.Field{}.Set((&PsGsitemapSitemap{}).TableName(), "id_shop"), +} diff --git a/app/model/dbmodel/ps_guest.go b/app/model/dbmodel/ps_guest.go new file mode 100644 index 0000000..b4e871b --- /dev/null +++ b/app/model/dbmodel/ps_guest.go @@ -0,0 +1,68 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsGuest = "ps_guest" + +// PsGuest mapped from table +type PsGuest struct { + IDGuest int32 `gorm:"column:id_guest;primaryKey;autoIncrement:true" json:"id_guest"` + IDOperatingSystem *int32 `gorm:"column:id_operating_system;index:id_operating_system,priority:1" json:"id_operating_system"` + IDWebBrowser *int32 `gorm:"column:id_web_browser;index:id_web_browser,priority:1" json:"id_web_browser"` + IDCustomer *int32 `gorm:"column:id_customer;index:id_customer,priority:1" json:"id_customer"` + Javascript *bool `gorm:"column:javascript" json:"javascript"` + ScreenResolutionX *int32 `gorm:"column:screen_resolution_x" json:"screen_resolution_x"` + ScreenResolutionY *int32 `gorm:"column:screen_resolution_y" json:"screen_resolution_y"` + ScreenColor *int32 `gorm:"column:screen_color" json:"screen_color"` + SunJava *bool `gorm:"column:sun_java" json:"sun_java"` + AdobeFlash *bool `gorm:"column:adobe_flash" json:"adobe_flash"` + AdobeDirector *bool `gorm:"column:adobe_director" json:"adobe_director"` + AppleQuicktime *bool `gorm:"column:apple_quicktime" json:"apple_quicktime"` + RealPlayer *bool `gorm:"column:real_player" json:"real_player"` + WindowsMedia *bool `gorm:"column:windows_media" json:"windows_media"` + AcceptLanguage *string `gorm:"column:accept_language" json:"accept_language"` + MobileTheme bool `gorm:"column:mobile_theme;not null" json:"mobile_theme"` +} + +// TableName PsGuest's table name +func (*PsGuest) TableName() string { + return TableNamePsGuest +} + +var PsGuestCols = struct { + IDGuest gormcol.Field + IDOperatingSystem gormcol.Field + IDWebBrowser gormcol.Field + IDCustomer gormcol.Field + Javascript gormcol.Field + ScreenResolutionX gormcol.Field + ScreenResolutionY gormcol.Field + ScreenColor gormcol.Field + SunJava gormcol.Field + AdobeFlash gormcol.Field + AdobeDirector gormcol.Field + AppleQuicktime gormcol.Field + RealPlayer gormcol.Field + WindowsMedia gormcol.Field + AcceptLanguage gormcol.Field + MobileTheme gormcol.Field +}{ + IDGuest: gormcol.Field{}.Set((&PsGuest{}).TableName(), "id_guest"), + IDOperatingSystem: gormcol.Field{}.Set((&PsGuest{}).TableName(), "id_operating_system"), + IDWebBrowser: gormcol.Field{}.Set((&PsGuest{}).TableName(), "id_web_browser"), + IDCustomer: gormcol.Field{}.Set((&PsGuest{}).TableName(), "id_customer"), + Javascript: gormcol.Field{}.Set((&PsGuest{}).TableName(), "javascript"), + ScreenResolutionX: gormcol.Field{}.Set((&PsGuest{}).TableName(), "screen_resolution_x"), + ScreenResolutionY: gormcol.Field{}.Set((&PsGuest{}).TableName(), "screen_resolution_y"), + ScreenColor: gormcol.Field{}.Set((&PsGuest{}).TableName(), "screen_color"), + SunJava: gormcol.Field{}.Set((&PsGuest{}).TableName(), "sun_java"), + AdobeFlash: gormcol.Field{}.Set((&PsGuest{}).TableName(), "adobe_flash"), + AdobeDirector: gormcol.Field{}.Set((&PsGuest{}).TableName(), "adobe_director"), + AppleQuicktime: gormcol.Field{}.Set((&PsGuest{}).TableName(), "apple_quicktime"), + RealPlayer: gormcol.Field{}.Set((&PsGuest{}).TableName(), "real_player"), + WindowsMedia: gormcol.Field{}.Set((&PsGuest{}).TableName(), "windows_media"), + AcceptLanguage: gormcol.Field{}.Set((&PsGuest{}).TableName(), "accept_language"), + MobileTheme: gormcol.Field{}.Set((&PsGuest{}).TableName(), "mobile_theme"), +} diff --git a/app/model/prestadb/ps_homeslider.go b/app/model/dbmodel/ps_homeslider.go similarity index 54% rename from app/model/prestadb/ps_homeslider.go rename to app/model/dbmodel/ps_homeslider.go index c5de5f2..3f188c9 100644 --- a/app/model/prestadb/ps_homeslider.go +++ b/app/model/dbmodel/ps_homeslider.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsHomeslider = "ps_homeslider" @@ -16,3 +16,11 @@ type PsHomeslider struct { func (*PsHomeslider) TableName() string { return TableNamePsHomeslider } + +var PsHomesliderCols = struct { + IDHomesliderSlides gormcol.Field + IDShop gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsHomeslider{}).TableName(), "id_homeslider_slides"), + IDShop: gormcol.Field{}.Set((&PsHomeslider{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_homeslider_slides.go b/app/model/dbmodel/ps_homeslider_slides.go similarity index 53% rename from app/model/prestadb/ps_homeslider_slides.go rename to app/model/dbmodel/ps_homeslider_slides.go index 0dcd8fc..b248490 100644 --- a/app/model/prestadb/ps_homeslider_slides.go +++ b/app/model/dbmodel/ps_homeslider_slides.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsHomesliderSlide = "ps_homeslider_slides" @@ -17,3 +17,13 @@ type PsHomesliderSlide struct { func (*PsHomesliderSlide) TableName() string { return TableNamePsHomesliderSlide } + +var PsHomesliderSlideCols = struct { + IDHomesliderSlides gormcol.Field + Position gormcol.Field + Active gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsHomesliderSlide{}).TableName(), "id_homeslider_slides"), + Position: gormcol.Field{}.Set((&PsHomesliderSlide{}).TableName(), "position"), + Active: gormcol.Field{}.Set((&PsHomesliderSlide{}).TableName(), "active"), +} diff --git a/app/model/dbmodel/ps_homeslider_slides_lang.go b/app/model/dbmodel/ps_homeslider_slides_lang.go new file mode 100644 index 0000000..8ebd499 --- /dev/null +++ b/app/model/dbmodel/ps_homeslider_slides_lang.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsHomesliderSlidesLang = "ps_homeslider_slides_lang" + +// PsHomesliderSlidesLang mapped from table +type PsHomesliderSlidesLang struct { + IDHomesliderSlides int32 `gorm:"column:id_homeslider_slides;primaryKey" json:"id_homeslider_slides"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Title string `gorm:"column:title;not null" json:"title"` + Description string `gorm:"column:description;not null" json:"description"` + Legend string `gorm:"column:legend;not null" json:"legend"` + URL string `gorm:"column:url;not null" json:"url"` + Image string `gorm:"column:image;not null" json:"image"` +} + +// TableName PsHomesliderSlidesLang's table name +func (*PsHomesliderSlidesLang) TableName() string { + return TableNamePsHomesliderSlidesLang +} + +var PsHomesliderSlidesLangCols = struct { + IDHomesliderSlides gormcol.Field + IDLang gormcol.Field + Title gormcol.Field + Description gormcol.Field + Legend gormcol.Field + URL gormcol.Field + Image gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsHomesliderSlidesLang{}).TableName(), "id_homeslider_slides"), + IDLang: gormcol.Field{}.Set((&PsHomesliderSlidesLang{}).TableName(), "id_lang"), + Title: gormcol.Field{}.Set((&PsHomesliderSlidesLang{}).TableName(), "title"), + Description: gormcol.Field{}.Set((&PsHomesliderSlidesLang{}).TableName(), "description"), + Legend: gormcol.Field{}.Set((&PsHomesliderSlidesLang{}).TableName(), "legend"), + URL: gormcol.Field{}.Set((&PsHomesliderSlidesLang{}).TableName(), "url"), + Image: gormcol.Field{}.Set((&PsHomesliderSlidesLang{}).TableName(), "image"), +} diff --git a/app/model/prestadb/ps_hook.go b/app/model/dbmodel/ps_hook.go similarity index 50% rename from app/model/prestadb/ps_hook.go rename to app/model/dbmodel/ps_hook.go index fd9b828..fa6e38e 100644 --- a/app/model/prestadb/ps_hook.go +++ b/app/model/dbmodel/ps_hook.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsHook = "ps_hook" @@ -19,3 +19,17 @@ type PsHook struct { func (*PsHook) TableName() string { return TableNamePsHook } + +var PsHookCols = struct { + IDHook gormcol.Field + Name gormcol.Field + Title gormcol.Field + Description gormcol.Field + Position gormcol.Field +}{ + IDHook: gormcol.Field{}.Set((&PsHook{}).TableName(), "id_hook"), + Name: gormcol.Field{}.Set((&PsHook{}).TableName(), "name"), + Title: gormcol.Field{}.Set((&PsHook{}).TableName(), "title"), + Description: gormcol.Field{}.Set((&PsHook{}).TableName(), "description"), + Position: gormcol.Field{}.Set((&PsHook{}).TableName(), "position"), +} diff --git a/app/model/prestadb/ps_hook_alias.go b/app/model/dbmodel/ps_hook_alias.go similarity index 53% rename from app/model/prestadb/ps_hook_alias.go rename to app/model/dbmodel/ps_hook_alias.go index edb1a8f..8728e95 100644 --- a/app/model/prestadb/ps_hook_alias.go +++ b/app/model/dbmodel/ps_hook_alias.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsHookAlias = "ps_hook_alias" @@ -17,3 +17,13 @@ type PsHookAlias struct { func (*PsHookAlias) TableName() string { return TableNamePsHookAlias } + +var PsHookAliasCols = struct { + IDHookAlias gormcol.Field + Alias gormcol.Field + Name gormcol.Field +}{ + IDHookAlias: gormcol.Field{}.Set((&PsHookAlias{}).TableName(), "id_hook_alias"), + Alias: gormcol.Field{}.Set((&PsHookAlias{}).TableName(), "alias"), + Name: gormcol.Field{}.Set((&PsHookAlias{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_hook_module.go b/app/model/dbmodel/ps_hook_module.go similarity index 54% rename from app/model/prestadb/ps_hook_module.go rename to app/model/dbmodel/ps_hook_module.go index d99dff5..8233a01 100644 --- a/app/model/prestadb/ps_hook_module.go +++ b/app/model/dbmodel/ps_hook_module.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsHookModule = "ps_hook_module" @@ -18,3 +18,15 @@ type PsHookModule struct { func (*PsHookModule) TableName() string { return TableNamePsHookModule } + +var PsHookModuleCols = struct { + IDModule gormcol.Field + IDShop gormcol.Field + IDHook gormcol.Field + Position gormcol.Field +}{ + IDModule: gormcol.Field{}.Set((&PsHookModule{}).TableName(), "id_module"), + IDShop: gormcol.Field{}.Set((&PsHookModule{}).TableName(), "id_shop"), + IDHook: gormcol.Field{}.Set((&PsHookModule{}).TableName(), "id_hook"), + Position: gormcol.Field{}.Set((&PsHookModule{}).TableName(), "position"), +} diff --git a/app/model/prestadb/ps_hook_module_exceptions.go b/app/model/dbmodel/ps_hook_module_exceptions.go similarity index 53% rename from app/model/prestadb/ps_hook_module_exceptions.go rename to app/model/dbmodel/ps_hook_module_exceptions.go index fa4b0f1..478bfe7 100644 --- a/app/model/prestadb/ps_hook_module_exceptions.go +++ b/app/model/dbmodel/ps_hook_module_exceptions.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsHookModuleException = "ps_hook_module_exceptions" @@ -19,3 +19,17 @@ type PsHookModuleException struct { func (*PsHookModuleException) TableName() string { return TableNamePsHookModuleException } + +var PsHookModuleExceptionCols = struct { + IDHookModuleExceptions gormcol.Field + IDShop gormcol.Field + IDModule gormcol.Field + IDHook gormcol.Field + FileName gormcol.Field +}{ + IDHookModuleExceptions: gormcol.Field{}.Set((&PsHookModuleException{}).TableName(), "id_hook_module_exceptions"), + IDShop: gormcol.Field{}.Set((&PsHookModuleException{}).TableName(), "id_shop"), + IDModule: gormcol.Field{}.Set((&PsHookModuleException{}).TableName(), "id_module"), + IDHook: gormcol.Field{}.Set((&PsHookModuleException{}).TableName(), "id_hook"), + FileName: gormcol.Field{}.Set((&PsHookModuleException{}).TableName(), "file_name"), +} diff --git a/app/model/prestadb/ps_image.go b/app/model/dbmodel/ps_image.go similarity index 58% rename from app/model/prestadb/ps_image.go rename to app/model/dbmodel/ps_image.go index 5a7b245..a8be1df 100644 --- a/app/model/prestadb/ps_image.go +++ b/app/model/dbmodel/ps_image.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsImage = "ps_image" @@ -18,3 +18,15 @@ type PsImage struct { func (*PsImage) TableName() string { return TableNamePsImage } + +var PsImageCols = struct { + IDImage gormcol.Field + IDProduct gormcol.Field + Position gormcol.Field + Cover gormcol.Field +}{ + IDImage: gormcol.Field{}.Set((&PsImage{}).TableName(), "id_image"), + IDProduct: gormcol.Field{}.Set((&PsImage{}).TableName(), "id_product"), + Position: gormcol.Field{}.Set((&PsImage{}).TableName(), "position"), + Cover: gormcol.Field{}.Set((&PsImage{}).TableName(), "cover"), +} diff --git a/app/model/prestadb/ps_image_lang.go b/app/model/dbmodel/ps_image_lang.go similarity index 51% rename from app/model/prestadb/ps_image_lang.go rename to app/model/dbmodel/ps_image_lang.go index 222a6c4..8c916d4 100644 --- a/app/model/prestadb/ps_image_lang.go +++ b/app/model/dbmodel/ps_image_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsImageLang = "ps_image_lang" @@ -17,3 +17,13 @@ type PsImageLang struct { func (*PsImageLang) TableName() string { return TableNamePsImageLang } + +var PsImageLangCols = struct { + IDImage gormcol.Field + IDLang gormcol.Field + Legend gormcol.Field +}{ + IDImage: gormcol.Field{}.Set((&PsImageLang{}).TableName(), "id_image"), + IDLang: gormcol.Field{}.Set((&PsImageLang{}).TableName(), "id_lang"), + Legend: gormcol.Field{}.Set((&PsImageLang{}).TableName(), "legend"), +} diff --git a/app/model/prestadb/ps_image_shop.go b/app/model/dbmodel/ps_image_shop.go similarity index 54% rename from app/model/prestadb/ps_image_shop.go rename to app/model/dbmodel/ps_image_shop.go index c6f41f9..0c8472a 100644 --- a/app/model/prestadb/ps_image_shop.go +++ b/app/model/dbmodel/ps_image_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsImageShop = "ps_image_shop" @@ -18,3 +18,15 @@ type PsImageShop struct { func (*PsImageShop) TableName() string { return TableNamePsImageShop } + +var PsImageShopCols = struct { + IDProduct gormcol.Field + IDImage gormcol.Field + IDShop gormcol.Field + Cover gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsImageShop{}).TableName(), "id_product"), + IDImage: gormcol.Field{}.Set((&PsImageShop{}).TableName(), "id_image"), + IDShop: gormcol.Field{}.Set((&PsImageShop{}).TableName(), "id_shop"), + Cover: gormcol.Field{}.Set((&PsImageShop{}).TableName(), "cover"), +} diff --git a/app/model/dbmodel/ps_image_type.go b/app/model/dbmodel/ps_image_type.go new file mode 100644 index 0000000..ef9819d --- /dev/null +++ b/app/model/dbmodel/ps_image_type.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsImageType = "ps_image_type" + +// PsImageType mapped from table +type PsImageType struct { + IDImageType int32 `gorm:"column:id_image_type;primaryKey;autoIncrement:true" json:"id_image_type"` + Name string `gorm:"column:name;not null;index:image_type_name,priority:1" json:"name"` + Width int32 `gorm:"column:width;not null" json:"width"` + Height int32 `gorm:"column:height;not null" json:"height"` + Products bool `gorm:"column:products;not null;default:1" json:"products"` + Categories bool `gorm:"column:categories;not null;default:1" json:"categories"` + Manufacturers bool `gorm:"column:manufacturers;not null;default:1" json:"manufacturers"` + Suppliers bool `gorm:"column:suppliers;not null;default:1" json:"suppliers"` + Stores bool `gorm:"column:stores;not null;default:1" json:"stores"` +} + +// TableName PsImageType's table name +func (*PsImageType) TableName() string { + return TableNamePsImageType +} + +var PsImageTypeCols = struct { + IDImageType gormcol.Field + Name gormcol.Field + Width gormcol.Field + Height gormcol.Field + Products gormcol.Field + Categories gormcol.Field + Manufacturers gormcol.Field + Suppliers gormcol.Field + Stores gormcol.Field +}{ + IDImageType: gormcol.Field{}.Set((&PsImageType{}).TableName(), "id_image_type"), + Name: gormcol.Field{}.Set((&PsImageType{}).TableName(), "name"), + Width: gormcol.Field{}.Set((&PsImageType{}).TableName(), "width"), + Height: gormcol.Field{}.Set((&PsImageType{}).TableName(), "height"), + Products: gormcol.Field{}.Set((&PsImageType{}).TableName(), "products"), + Categories: gormcol.Field{}.Set((&PsImageType{}).TableName(), "categories"), + Manufacturers: gormcol.Field{}.Set((&PsImageType{}).TableName(), "manufacturers"), + Suppliers: gormcol.Field{}.Set((&PsImageType{}).TableName(), "suppliers"), + Stores: gormcol.Field{}.Set((&PsImageType{}).TableName(), "stores"), +} diff --git a/app/model/prestadb/ps_import_match.go b/app/model/dbmodel/ps_import_match.go similarity index 51% rename from app/model/prestadb/ps_import_match.go rename to app/model/dbmodel/ps_import_match.go index 1723f04..869464f 100644 --- a/app/model/prestadb/ps_import_match.go +++ b/app/model/dbmodel/ps_import_match.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsImportMatch = "ps_import_match" @@ -18,3 +18,15 @@ type PsImportMatch struct { func (*PsImportMatch) TableName() string { return TableNamePsImportMatch } + +var PsImportMatchCols = struct { + IDImportMatch gormcol.Field + Name gormcol.Field + Match gormcol.Field + Skip gormcol.Field +}{ + IDImportMatch: gormcol.Field{}.Set((&PsImportMatch{}).TableName(), "id_import_match"), + Name: gormcol.Field{}.Set((&PsImportMatch{}).TableName(), "name"), + Match: gormcol.Field{}.Set((&PsImportMatch{}).TableName(), "match"), + Skip: gormcol.Field{}.Set((&PsImportMatch{}).TableName(), "skip"), +} diff --git a/app/model/prestadb/ps_info.go b/app/model/dbmodel/ps_info.go similarity index 55% rename from app/model/prestadb/ps_info.go rename to app/model/dbmodel/ps_info.go index 996653b..9a9b802 100644 --- a/app/model/prestadb/ps_info.go +++ b/app/model/dbmodel/ps_info.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsInfo = "ps_info" @@ -15,3 +15,9 @@ type PsInfo struct { func (*PsInfo) TableName() string { return TableNamePsInfo } + +var PsInfoCols = struct { + IDInfo gormcol.Field +}{ + IDInfo: gormcol.Field{}.Set((&PsInfo{}).TableName(), "id_info"), +} diff --git a/app/model/dbmodel/ps_info_lang.go b/app/model/dbmodel/ps_info_lang.go new file mode 100644 index 0000000..782e33f --- /dev/null +++ b/app/model/dbmodel/ps_info_lang.go @@ -0,0 +1,32 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsInfoLang = "ps_info_lang" + +// PsInfoLang mapped from table +type PsInfoLang struct { + IDInfo int32 `gorm:"column:id_info;primaryKey" json:"id_info"` + IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Text string `gorm:"column:text;not null" json:"text"` +} + +// TableName PsInfoLang's table name +func (*PsInfoLang) TableName() string { + return TableNamePsInfoLang +} + +var PsInfoLangCols = struct { + IDInfo gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + Text gormcol.Field +}{ + IDInfo: gormcol.Field{}.Set((&PsInfoLang{}).TableName(), "id_info"), + IDShop: gormcol.Field{}.Set((&PsInfoLang{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsInfoLang{}).TableName(), "id_lang"), + Text: gormcol.Field{}.Set((&PsInfoLang{}).TableName(), "text"), +} diff --git a/app/model/prestadb/ps_info_shop.go b/app/model/dbmodel/ps_info_shop.go similarity index 52% rename from app/model/prestadb/ps_info_shop.go rename to app/model/dbmodel/ps_info_shop.go index 80fa46a..1eb584a 100644 --- a/app/model/prestadb/ps_info_shop.go +++ b/app/model/dbmodel/ps_info_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsInfoShop = "ps_info_shop" @@ -16,3 +16,11 @@ type PsInfoShop struct { func (*PsInfoShop) TableName() string { return TableNamePsInfoShop } + +var PsInfoShopCols = struct { + IDInfo gormcol.Field + IDShop gormcol.Field +}{ + IDInfo: gormcol.Field{}.Set((&PsInfoShop{}).TableName(), "id_info"), + IDShop: gormcol.Field{}.Set((&PsInfoShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_inpost_carrier.go b/app/model/dbmodel/ps_inpost_carrier.go similarity index 50% rename from app/model/prestadb/ps_inpost_carrier.go rename to app/model/dbmodel/ps_inpost_carrier.go index 7eb6137..64b7e01 100644 --- a/app/model/prestadb/ps_inpost_carrier.go +++ b/app/model/dbmodel/ps_inpost_carrier.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsInpostCarrier = "ps_inpost_carrier" @@ -20,3 +20,19 @@ type PsInpostCarrier struct { func (*PsInpostCarrier) TableName() string { return TableNamePsInpostCarrier } + +var PsInpostCarrierCols = struct { + IDReference gormcol.Field + Service gormcol.Field + CommercialProductIdentifier gormcol.Field + Cod gormcol.Field + WeekendDelivery gormcol.Field + UseProductDimensions gormcol.Field +}{ + IDReference: gormcol.Field{}.Set((&PsInpostCarrier{}).TableName(), "id_reference"), + Service: gormcol.Field{}.Set((&PsInpostCarrier{}).TableName(), "service"), + CommercialProductIdentifier: gormcol.Field{}.Set((&PsInpostCarrier{}).TableName(), "commercial_product_identifier"), + Cod: gormcol.Field{}.Set((&PsInpostCarrier{}).TableName(), "cod"), + WeekendDelivery: gormcol.Field{}.Set((&PsInpostCarrier{}).TableName(), "weekend_delivery"), + UseProductDimensions: gormcol.Field{}.Set((&PsInpostCarrier{}).TableName(), "use_product_dimensions"), +} diff --git a/app/model/dbmodel/ps_inpost_cart_choice.go b/app/model/dbmodel/ps_inpost_cart_choice.go new file mode 100644 index 0000000..e1e0092 --- /dev/null +++ b/app/model/dbmodel/ps_inpost_cart_choice.go @@ -0,0 +1,35 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsInpostCartChoice = "ps_inpost_cart_choice" + +// PsInpostCartChoice mapped from table +type PsInpostCartChoice struct { + IDCart int32 `gorm:"column:id_cart;primaryKey" json:"id_cart"` + Service string `gorm:"column:service;not null" json:"service"` + Email *string `gorm:"column:email" json:"email"` + Phone *string `gorm:"column:phone" json:"phone"` + Point *string `gorm:"column:point" json:"point"` +} + +// TableName PsInpostCartChoice's table name +func (*PsInpostCartChoice) TableName() string { + return TableNamePsInpostCartChoice +} + +var PsInpostCartChoiceCols = struct { + IDCart gormcol.Field + Service gormcol.Field + Email gormcol.Field + Phone gormcol.Field + Point gormcol.Field +}{ + IDCart: gormcol.Field{}.Set((&PsInpostCartChoice{}).TableName(), "id_cart"), + Service: gormcol.Field{}.Set((&PsInpostCartChoice{}).TableName(), "service"), + Email: gormcol.Field{}.Set((&PsInpostCartChoice{}).TableName(), "email"), + Phone: gormcol.Field{}.Set((&PsInpostCartChoice{}).TableName(), "phone"), + Point: gormcol.Field{}.Set((&PsInpostCartChoice{}).TableName(), "point"), +} diff --git a/app/model/prestadb/ps_inpost_dispatch_order.go b/app/model/dbmodel/ps_inpost_dispatch_order.go similarity index 50% rename from app/model/prestadb/ps_inpost_dispatch_order.go rename to app/model/dbmodel/ps_inpost_dispatch_order.go index 1dc88a2..4916ed8 100644 --- a/app/model/prestadb/ps_inpost_dispatch_order.go +++ b/app/model/dbmodel/ps_inpost_dispatch_order.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -25,3 +24,21 @@ type PsInpostDispatchOrder struct { func (*PsInpostDispatchOrder) TableName() string { return TableNamePsInpostDispatchOrder } + +var PsInpostDispatchOrderCols = struct { + IDDispatchOrder gormcol.Field + IDDispatchPoint gormcol.Field + ShipxDispatchOrderID gormcol.Field + Number gormcol.Field + Status gormcol.Field + Price gormcol.Field + DateAdd gormcol.Field +}{ + IDDispatchOrder: gormcol.Field{}.Set((&PsInpostDispatchOrder{}).TableName(), "id_dispatch_order"), + IDDispatchPoint: gormcol.Field{}.Set((&PsInpostDispatchOrder{}).TableName(), "id_dispatch_point"), + ShipxDispatchOrderID: gormcol.Field{}.Set((&PsInpostDispatchOrder{}).TableName(), "shipx_dispatch_order_id"), + Number: gormcol.Field{}.Set((&PsInpostDispatchOrder{}).TableName(), "number"), + Status: gormcol.Field{}.Set((&PsInpostDispatchOrder{}).TableName(), "status"), + Price: gormcol.Field{}.Set((&PsInpostDispatchOrder{}).TableName(), "price"), + DateAdd: gormcol.Field{}.Set((&PsInpostDispatchOrder{}).TableName(), "date_add"), +} diff --git a/app/model/dbmodel/ps_inpost_dispatch_point.go b/app/model/dbmodel/ps_inpost_dispatch_point.go new file mode 100644 index 0000000..387f5c8 --- /dev/null +++ b/app/model/dbmodel/ps_inpost_dispatch_point.go @@ -0,0 +1,50 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsInpostDispatchPoint = "ps_inpost_dispatch_point" + +// PsInpostDispatchPoint mapped from table +type PsInpostDispatchPoint struct { + IDDispatchPoint int32 `gorm:"column:id_dispatch_point;primaryKey;autoIncrement:true" json:"id_dispatch_point"` + Name string `gorm:"column:name;not null" json:"name"` + OfficeHours *string `gorm:"column:office_hours" json:"office_hours"` + Email *string `gorm:"column:email" json:"email"` + Phone *string `gorm:"column:phone" json:"phone"` + Street string `gorm:"column:street;not null" json:"street"` + BuildingNumber string `gorm:"column:building_number;not null" json:"building_number"` + PostCode string `gorm:"column:post_code;not null" json:"post_code"` + City string `gorm:"column:city;not null" json:"city"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` +} + +// TableName PsInpostDispatchPoint's table name +func (*PsInpostDispatchPoint) TableName() string { + return TableNamePsInpostDispatchPoint +} + +var PsInpostDispatchPointCols = struct { + IDDispatchPoint gormcol.Field + Name gormcol.Field + OfficeHours gormcol.Field + Email gormcol.Field + Phone gormcol.Field + Street gormcol.Field + BuildingNumber gormcol.Field + PostCode gormcol.Field + City gormcol.Field + Deleted gormcol.Field +}{ + IDDispatchPoint: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "id_dispatch_point"), + Name: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "name"), + OfficeHours: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "office_hours"), + Email: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "email"), + Phone: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "phone"), + Street: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "street"), + BuildingNumber: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "building_number"), + PostCode: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "post_code"), + City: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "city"), + Deleted: gormcol.Field{}.Set((&PsInpostDispatchPoint{}).TableName(), "deleted"), +} diff --git a/app/model/prestadb/ps_inpost_point.go b/app/model/dbmodel/ps_inpost_point.go similarity index 53% rename from app/model/prestadb/ps_inpost_point.go rename to app/model/dbmodel/ps_inpost_point.go index 9797253..c5e604b 100644 --- a/app/model/prestadb/ps_inpost_point.go +++ b/app/model/dbmodel/ps_inpost_point.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -21,3 +20,13 @@ type PsInpostPoint struct { func (*PsInpostPoint) TableName() string { return TableNamePsInpostPoint } + +var PsInpostPointCols = struct { + IDPoint gormcol.Field + Data gormcol.Field + DateUpd gormcol.Field +}{ + IDPoint: gormcol.Field{}.Set((&PsInpostPoint{}).TableName(), "id_point"), + Data: gormcol.Field{}.Set((&PsInpostPoint{}).TableName(), "data"), + DateUpd: gormcol.Field{}.Set((&PsInpostPoint{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_inpost_product_template.go b/app/model/dbmodel/ps_inpost_product_template.go similarity index 56% rename from app/model/prestadb/ps_inpost_product_template.go rename to app/model/dbmodel/ps_inpost_product_template.go index 502cb8a..e7ba971 100644 --- a/app/model/prestadb/ps_inpost_product_template.go +++ b/app/model/dbmodel/ps_inpost_product_template.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsInpostProductTemplate = "ps_inpost_product_template" @@ -16,3 +16,11 @@ type PsInpostProductTemplate struct { func (*PsInpostProductTemplate) TableName() string { return TableNamePsInpostProductTemplate } + +var PsInpostProductTemplateCols = struct { + IDProduct gormcol.Field + Template gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsInpostProductTemplate{}).TableName(), "id_product"), + Template: gormcol.Field{}.Set((&PsInpostProductTemplate{}).TableName(), "template"), +} diff --git a/app/model/dbmodel/ps_inpost_shipment.go b/app/model/dbmodel/ps_inpost_shipment.go new file mode 100644 index 0000000..768a9f3 --- /dev/null +++ b/app/model/dbmodel/ps_inpost_shipment.go @@ -0,0 +1,95 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsInpostShipment = "ps_inpost_shipment" + +// PsInpostShipment mapped from table +type PsInpostShipment struct { + IDShipment int32 `gorm:"column:id_shipment;primaryKey;autoIncrement:true" json:"id_shipment"` + OrganizationID int32 `gorm:"column:organization_id;not null" json:"organization_id"` + IDOrder int32 `gorm:"column:id_order;not null;index:id_order,priority:1" json:"id_order"` + Sandbox bool `gorm:"column:sandbox;not null" json:"sandbox"` + ShipxShipmentID int32 `gorm:"column:shipx_shipment_id;not null" json:"shipx_shipment_id"` + Reference *string `gorm:"column:reference" json:"reference"` + Email string `gorm:"column:email;not null" json:"email"` + Phone string `gorm:"column:phone;not null" json:"phone"` + Service string `gorm:"column:service;not null" json:"service"` + CommercialProductIdentifier *string `gorm:"column:commercial_product_identifier" json:"commercial_product_identifier"` + SendingMethod *string `gorm:"column:sending_method" json:"sending_method"` + SendingPoint *string `gorm:"column:sending_point" json:"sending_point"` + WeekendDelivery *bool `gorm:"column:weekend_delivery" json:"weekend_delivery"` + Template *string `gorm:"column:template" json:"template"` + Dimensions *string `gorm:"column:dimensions" json:"dimensions"` + IDDispatchOrder *int32 `gorm:"column:id_dispatch_order;index:id_dispatch_order,priority:1" json:"id_dispatch_order"` + TargetPoint *string `gorm:"column:target_point" json:"target_point"` + CodAmount *float64 `gorm:"column:cod_amount" json:"cod_amount"` + InsuranceAmount *float64 `gorm:"column:insurance_amount" json:"insurance_amount"` + TrackingNumber *string `gorm:"column:tracking_number" json:"tracking_number"` + Status *string `gorm:"column:status" json:"status"` + Price *float64 `gorm:"column:price" json:"price"` + LabelPrinted bool `gorm:"column:label_printed;not null" json:"label_printed"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` +} + +// TableName PsInpostShipment's table name +func (*PsInpostShipment) TableName() string { + return TableNamePsInpostShipment +} + +var PsInpostShipmentCols = struct { + IDShipment gormcol.Field + OrganizationID gormcol.Field + IDOrder gormcol.Field + Sandbox gormcol.Field + ShipxShipmentID gormcol.Field + Reference gormcol.Field + Email gormcol.Field + Phone gormcol.Field + Service gormcol.Field + CommercialProductIdentifier gormcol.Field + SendingMethod gormcol.Field + SendingPoint gormcol.Field + WeekendDelivery gormcol.Field + Template gormcol.Field + Dimensions gormcol.Field + IDDispatchOrder gormcol.Field + TargetPoint gormcol.Field + CodAmount gormcol.Field + InsuranceAmount gormcol.Field + TrackingNumber gormcol.Field + Status gormcol.Field + Price gormcol.Field + LabelPrinted gormcol.Field + DateAdd gormcol.Field +}{ + IDShipment: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "id_shipment"), + OrganizationID: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "organization_id"), + IDOrder: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "id_order"), + Sandbox: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "sandbox"), + ShipxShipmentID: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "shipx_shipment_id"), + Reference: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "reference"), + Email: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "email"), + Phone: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "phone"), + Service: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "service"), + CommercialProductIdentifier: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "commercial_product_identifier"), + SendingMethod: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "sending_method"), + SendingPoint: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "sending_point"), + WeekendDelivery: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "weekend_delivery"), + Template: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "template"), + Dimensions: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "dimensions"), + IDDispatchOrder: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "id_dispatch_order"), + TargetPoint: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "target_point"), + CodAmount: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "cod_amount"), + InsuranceAmount: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "insurance_amount"), + TrackingNumber: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "tracking_number"), + Status: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "status"), + Price: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "price"), + LabelPrinted: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "label_printed"), + DateAdd: gormcol.Field{}.Set((&PsInpostShipment{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_inpost_shipment_status.go b/app/model/dbmodel/ps_inpost_shipment_status.go similarity index 58% rename from app/model/prestadb/ps_inpost_shipment_status.go rename to app/model/dbmodel/ps_inpost_shipment_status.go index d84a5de..77077bc 100644 --- a/app/model/prestadb/ps_inpost_shipment_status.go +++ b/app/model/dbmodel/ps_inpost_shipment_status.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsInpostShipmentStatus = "ps_inpost_shipment_status" @@ -16,3 +16,11 @@ type PsInpostShipmentStatus struct { func (*PsInpostShipmentStatus) TableName() string { return TableNamePsInpostShipmentStatus } + +var PsInpostShipmentStatusCols = struct { + IDStatus gormcol.Field + Name gormcol.Field +}{ + IDStatus: gormcol.Field{}.Set((&PsInpostShipmentStatus{}).TableName(), "id_status"), + Name: gormcol.Field{}.Set((&PsInpostShipmentStatus{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_inpost_shipment_status_lang.go b/app/model/dbmodel/ps_inpost_shipment_status_lang.go similarity index 52% rename from app/model/prestadb/ps_inpost_shipment_status_lang.go rename to app/model/dbmodel/ps_inpost_shipment_status_lang.go index 3772cd1..76ba452 100644 --- a/app/model/prestadb/ps_inpost_shipment_status_lang.go +++ b/app/model/dbmodel/ps_inpost_shipment_status_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsInpostShipmentStatusLang = "ps_inpost_shipment_status_lang" @@ -18,3 +18,15 @@ type PsInpostShipmentStatusLang struct { func (*PsInpostShipmentStatusLang) TableName() string { return TableNamePsInpostShipmentStatusLang } + +var PsInpostShipmentStatusLangCols = struct { + IDStatus gormcol.Field + IDLang gormcol.Field + Title gormcol.Field + Description gormcol.Field +}{ + IDStatus: gormcol.Field{}.Set((&PsInpostShipmentStatusLang{}).TableName(), "id_status"), + IDLang: gormcol.Field{}.Set((&PsInpostShipmentStatusLang{}).TableName(), "id_lang"), + Title: gormcol.Field{}.Set((&PsInpostShipmentStatusLang{}).TableName(), "title"), + Description: gormcol.Field{}.Set((&PsInpostShipmentStatusLang{}).TableName(), "description"), +} diff --git a/app/model/prestadb/ps_invoice_customer.go b/app/model/dbmodel/ps_invoice_customer.go similarity index 56% rename from app/model/prestadb/ps_invoice_customer.go rename to app/model/dbmodel/ps_invoice_customer.go index b2da49f..529a339 100644 --- a/app/model/prestadb/ps_invoice_customer.go +++ b/app/model/dbmodel/ps_invoice_customer.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsInvoiceCustomer struct { func (*PsInvoiceCustomer) TableName() string { return TableNamePsInvoiceCustomer } + +var PsInvoiceCustomerCols = struct { + IDInvoiceCustomer gormcol.Field + IDCustomer gormcol.Field + IDShopCompany gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDInvoiceCustomer: gormcol.Field{}.Set((&PsInvoiceCustomer{}).TableName(), "id_invoice_customer"), + IDCustomer: gormcol.Field{}.Set((&PsInvoiceCustomer{}).TableName(), "id_customer"), + IDShopCompany: gormcol.Field{}.Set((&PsInvoiceCustomer{}).TableName(), "id_shop_company"), + DateAdd: gormcol.Field{}.Set((&PsInvoiceCustomer{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsInvoiceCustomer{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_lang.go b/app/model/dbmodel/ps_lang.go new file mode 100644 index 0000000..4907c94 --- /dev/null +++ b/app/model/dbmodel/ps_lang.go @@ -0,0 +1,50 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsLang = "ps_lang" + +// PsLang mapped from table +type PsLang struct { + IDLang int32 `gorm:"column:id_lang;primaryKey;autoIncrement:true" json:"id_lang"` + Name string `gorm:"column:name;not null" json:"name"` + Active bool `gorm:"column:active;not null" json:"active"` + IsoCode string `gorm:"column:iso_code;not null" json:"iso_code"` + CodeLong string `gorm:"column:code_long;not null" json:"code_long"` + LanguageCode string `gorm:"column:language_code;not null" json:"language_code"` + Locale string `gorm:"column:locale;not null" json:"locale"` + DateFormatLite string `gorm:"column:date_format_lite;not null" json:"date_format_lite"` + DateFormatFull string `gorm:"column:date_format_full;not null" json:"date_format_full"` + IsRtl bool `gorm:"column:is_rtl;not null" json:"is_rtl"` +} + +// TableName PsLang's table name +func (*PsLang) TableName() string { + return TableNamePsLang +} + +var PsLangCols = struct { + IDLang gormcol.Field + Name gormcol.Field + Active gormcol.Field + IsoCode gormcol.Field + CodeLong gormcol.Field + LanguageCode gormcol.Field + Locale gormcol.Field + DateFormatLite gormcol.Field + DateFormatFull gormcol.Field + IsRtl gormcol.Field +}{ + IDLang: gormcol.Field{}.Set((&PsLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsLang{}).TableName(), "name"), + Active: gormcol.Field{}.Set((&PsLang{}).TableName(), "active"), + IsoCode: gormcol.Field{}.Set((&PsLang{}).TableName(), "iso_code"), + CodeLong: gormcol.Field{}.Set((&PsLang{}).TableName(), "code_long"), + LanguageCode: gormcol.Field{}.Set((&PsLang{}).TableName(), "language_code"), + Locale: gormcol.Field{}.Set((&PsLang{}).TableName(), "locale"), + DateFormatLite: gormcol.Field{}.Set((&PsLang{}).TableName(), "date_format_lite"), + DateFormatFull: gormcol.Field{}.Set((&PsLang{}).TableName(), "date_format_full"), + IsRtl: gormcol.Field{}.Set((&PsLang{}).TableName(), "is_rtl"), +} diff --git a/app/model/prestadb/ps_lang_shop.go b/app/model/dbmodel/ps_lang_shop.go similarity index 57% rename from app/model/prestadb/ps_lang_shop.go rename to app/model/dbmodel/ps_lang_shop.go index 82511f6..d1a10b0 100644 --- a/app/model/prestadb/ps_lang_shop.go +++ b/app/model/dbmodel/ps_lang_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLangShop = "ps_lang_shop" @@ -16,3 +16,11 @@ type PsLangShop struct { func (*PsLangShop) TableName() string { return TableNamePsLangShop } + +var PsLangShopCols = struct { + IDLang gormcol.Field + IDShop gormcol.Field +}{ + IDLang: gormcol.Field{}.Set((&PsLangShop{}).TableName(), "id_lang"), + IDShop: gormcol.Field{}.Set((&PsLangShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_layered_category.go b/app/model/dbmodel/ps_layered_category.go similarity index 53% rename from app/model/prestadb/ps_layered_category.go rename to app/model/dbmodel/ps_layered_category.go index a37809d..dc7b5c1 100644 --- a/app/model/prestadb/ps_layered_category.go +++ b/app/model/dbmodel/ps_layered_category.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredCategory = "ps_layered_category" @@ -22,3 +22,23 @@ type PsLayeredCategory struct { func (*PsLayeredCategory) TableName() string { return TableNamePsLayeredCategory } + +var PsLayeredCategoryCols = struct { + IDLayeredCategory gormcol.Field + IDShop gormcol.Field + IDCategory gormcol.Field + IDValue gormcol.Field + Type gormcol.Field + Position gormcol.Field + FilterType gormcol.Field + FilterShowLimit gormcol.Field +}{ + IDLayeredCategory: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "id_layered_category"), + IDShop: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "id_shop"), + IDCategory: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "id_category"), + IDValue: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "id_value"), + Type: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "type"), + Position: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "position"), + FilterType: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "filter_type"), + FilterShowLimit: gormcol.Field{}.Set((&PsLayeredCategory{}).TableName(), "filter_show_limit"), +} diff --git a/app/model/prestadb/ps_layered_filter.go b/app/model/dbmodel/ps_layered_filter.go similarity index 51% rename from app/model/prestadb/ps_layered_filter.go rename to app/model/dbmodel/ps_layered_filter.go index 60b4c73..6fedd40 100644 --- a/app/model/prestadb/ps_layered_filter.go +++ b/app/model/dbmodel/ps_layered_filter.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsLayeredFilter struct { func (*PsLayeredFilter) TableName() string { return TableNamePsLayeredFilter } + +var PsLayeredFilterCols = struct { + IDLayeredFilter gormcol.Field + Name gormcol.Field + Filters gormcol.Field + NCategories gormcol.Field + DateAdd gormcol.Field +}{ + IDLayeredFilter: gormcol.Field{}.Set((&PsLayeredFilter{}).TableName(), "id_layered_filter"), + Name: gormcol.Field{}.Set((&PsLayeredFilter{}).TableName(), "name"), + Filters: gormcol.Field{}.Set((&PsLayeredFilter{}).TableName(), "filters"), + NCategories: gormcol.Field{}.Set((&PsLayeredFilter{}).TableName(), "n_categories"), + DateAdd: gormcol.Field{}.Set((&PsLayeredFilter{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_layered_filter_block.go b/app/model/dbmodel/ps_layered_filter_block.go similarity index 55% rename from app/model/prestadb/ps_layered_filter_block.go rename to app/model/dbmodel/ps_layered_filter_block.go index 225be30..55d895c 100644 --- a/app/model/prestadb/ps_layered_filter_block.go +++ b/app/model/dbmodel/ps_layered_filter_block.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredFilterBlock = "ps_layered_filter_block" @@ -16,3 +16,11 @@ type PsLayeredFilterBlock struct { func (*PsLayeredFilterBlock) TableName() string { return TableNamePsLayeredFilterBlock } + +var PsLayeredFilterBlockCols = struct { + Hash gormcol.Field + Data gormcol.Field +}{ + Hash: gormcol.Field{}.Set((&PsLayeredFilterBlock{}).TableName(), "hash"), + Data: gormcol.Field{}.Set((&PsLayeredFilterBlock{}).TableName(), "data"), +} diff --git a/app/model/prestadb/ps_layered_filter_shop.go b/app/model/dbmodel/ps_layered_filter_shop.go similarity index 56% rename from app/model/prestadb/ps_layered_filter_shop.go rename to app/model/dbmodel/ps_layered_filter_shop.go index ada225b..7c5b923 100644 --- a/app/model/prestadb/ps_layered_filter_shop.go +++ b/app/model/dbmodel/ps_layered_filter_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredFilterShop = "ps_layered_filter_shop" @@ -16,3 +16,11 @@ type PsLayeredFilterShop struct { func (*PsLayeredFilterShop) TableName() string { return TableNamePsLayeredFilterShop } + +var PsLayeredFilterShopCols = struct { + IDLayeredFilter gormcol.Field + IDShop gormcol.Field +}{ + IDLayeredFilter: gormcol.Field{}.Set((&PsLayeredFilterShop{}).TableName(), "id_layered_filter"), + IDShop: gormcol.Field{}.Set((&PsLayeredFilterShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_layered_indexable_attribute_group.go b/app/model/dbmodel/ps_layered_indexable_attribute_group.go similarity index 57% rename from app/model/prestadb/ps_layered_indexable_attribute_group.go rename to app/model/dbmodel/ps_layered_indexable_attribute_group.go index 71e10c7..800aa76 100644 --- a/app/model/prestadb/ps_layered_indexable_attribute_group.go +++ b/app/model/dbmodel/ps_layered_indexable_attribute_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredIndexableAttributeGroup = "ps_layered_indexable_attribute_group" @@ -16,3 +16,11 @@ type PsLayeredIndexableAttributeGroup struct { func (*PsLayeredIndexableAttributeGroup) TableName() string { return TableNamePsLayeredIndexableAttributeGroup } + +var PsLayeredIndexableAttributeGroupCols = struct { + IDAttributeGroup gormcol.Field + Indexable gormcol.Field +}{ + IDAttributeGroup: gormcol.Field{}.Set((&PsLayeredIndexableAttributeGroup{}).TableName(), "id_attribute_group"), + Indexable: gormcol.Field{}.Set((&PsLayeredIndexableAttributeGroup{}).TableName(), "indexable"), +} diff --git a/app/model/prestadb/ps_layered_indexable_attribute_group_lang_value.go b/app/model/dbmodel/ps_layered_indexable_attribute_group_lang_value.go similarity index 53% rename from app/model/prestadb/ps_layered_indexable_attribute_group_lang_value.go rename to app/model/dbmodel/ps_layered_indexable_attribute_group_lang_value.go index 9c8d34f..6e03695 100644 --- a/app/model/prestadb/ps_layered_indexable_attribute_group_lang_value.go +++ b/app/model/dbmodel/ps_layered_indexable_attribute_group_lang_value.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredIndexableAttributeGroupLangValue = "ps_layered_indexable_attribute_group_lang_value" @@ -18,3 +18,15 @@ type PsLayeredIndexableAttributeGroupLangValue struct { func (*PsLayeredIndexableAttributeGroupLangValue) TableName() string { return TableNamePsLayeredIndexableAttributeGroupLangValue } + +var PsLayeredIndexableAttributeGroupLangValueCols = struct { + IDAttributeGroup gormcol.Field + IDLang gormcol.Field + URLName gormcol.Field + MetaTitle gormcol.Field +}{ + IDAttributeGroup: gormcol.Field{}.Set((&PsLayeredIndexableAttributeGroupLangValue{}).TableName(), "id_attribute_group"), + IDLang: gormcol.Field{}.Set((&PsLayeredIndexableAttributeGroupLangValue{}).TableName(), "id_lang"), + URLName: gormcol.Field{}.Set((&PsLayeredIndexableAttributeGroupLangValue{}).TableName(), "url_name"), + MetaTitle: gormcol.Field{}.Set((&PsLayeredIndexableAttributeGroupLangValue{}).TableName(), "meta_title"), +} diff --git a/app/model/prestadb/ps_layered_indexable_attribute_lang_value.go b/app/model/dbmodel/ps_layered_indexable_attribute_lang_value.go similarity index 52% rename from app/model/prestadb/ps_layered_indexable_attribute_lang_value.go rename to app/model/dbmodel/ps_layered_indexable_attribute_lang_value.go index e7c6de8..6e9d61b 100644 --- a/app/model/prestadb/ps_layered_indexable_attribute_lang_value.go +++ b/app/model/dbmodel/ps_layered_indexable_attribute_lang_value.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredIndexableAttributeLangValue = "ps_layered_indexable_attribute_lang_value" @@ -18,3 +18,15 @@ type PsLayeredIndexableAttributeLangValue struct { func (*PsLayeredIndexableAttributeLangValue) TableName() string { return TableNamePsLayeredIndexableAttributeLangValue } + +var PsLayeredIndexableAttributeLangValueCols = struct { + IDAttribute gormcol.Field + IDLang gormcol.Field + URLName gormcol.Field + MetaTitle gormcol.Field +}{ + IDAttribute: gormcol.Field{}.Set((&PsLayeredIndexableAttributeLangValue{}).TableName(), "id_attribute"), + IDLang: gormcol.Field{}.Set((&PsLayeredIndexableAttributeLangValue{}).TableName(), "id_lang"), + URLName: gormcol.Field{}.Set((&PsLayeredIndexableAttributeLangValue{}).TableName(), "url_name"), + MetaTitle: gormcol.Field{}.Set((&PsLayeredIndexableAttributeLangValue{}).TableName(), "meta_title"), +} diff --git a/app/model/prestadb/ps_layered_indexable_feature.go b/app/model/dbmodel/ps_layered_indexable_feature.go similarity index 56% rename from app/model/prestadb/ps_layered_indexable_feature.go rename to app/model/dbmodel/ps_layered_indexable_feature.go index 4291fbe..9e0737d 100644 --- a/app/model/prestadb/ps_layered_indexable_feature.go +++ b/app/model/dbmodel/ps_layered_indexable_feature.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredIndexableFeature = "ps_layered_indexable_feature" @@ -16,3 +16,11 @@ type PsLayeredIndexableFeature struct { func (*PsLayeredIndexableFeature) TableName() string { return TableNamePsLayeredIndexableFeature } + +var PsLayeredIndexableFeatureCols = struct { + IDFeature gormcol.Field + Indexable gormcol.Field +}{ + IDFeature: gormcol.Field{}.Set((&PsLayeredIndexableFeature{}).TableName(), "id_feature"), + Indexable: gormcol.Field{}.Set((&PsLayeredIndexableFeature{}).TableName(), "indexable"), +} diff --git a/app/model/prestadb/ps_layered_indexable_feature_lang_value.go b/app/model/dbmodel/ps_layered_indexable_feature_lang_value.go similarity index 52% rename from app/model/prestadb/ps_layered_indexable_feature_lang_value.go rename to app/model/dbmodel/ps_layered_indexable_feature_lang_value.go index 05f32d1..5dce5e2 100644 --- a/app/model/prestadb/ps_layered_indexable_feature_lang_value.go +++ b/app/model/dbmodel/ps_layered_indexable_feature_lang_value.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredIndexableFeatureLangValue = "ps_layered_indexable_feature_lang_value" @@ -18,3 +18,15 @@ type PsLayeredIndexableFeatureLangValue struct { func (*PsLayeredIndexableFeatureLangValue) TableName() string { return TableNamePsLayeredIndexableFeatureLangValue } + +var PsLayeredIndexableFeatureLangValueCols = struct { + IDFeature gormcol.Field + IDLang gormcol.Field + URLName gormcol.Field + MetaTitle gormcol.Field +}{ + IDFeature: gormcol.Field{}.Set((&PsLayeredIndexableFeatureLangValue{}).TableName(), "id_feature"), + IDLang: gormcol.Field{}.Set((&PsLayeredIndexableFeatureLangValue{}).TableName(), "id_lang"), + URLName: gormcol.Field{}.Set((&PsLayeredIndexableFeatureLangValue{}).TableName(), "url_name"), + MetaTitle: gormcol.Field{}.Set((&PsLayeredIndexableFeatureLangValue{}).TableName(), "meta_title"), +} diff --git a/app/model/prestadb/ps_layered_indexable_feature_value_lang_value.go b/app/model/dbmodel/ps_layered_indexable_feature_value_lang_value.go similarity index 52% rename from app/model/prestadb/ps_layered_indexable_feature_value_lang_value.go rename to app/model/dbmodel/ps_layered_indexable_feature_value_lang_value.go index 32668bd..04189a8 100644 --- a/app/model/prestadb/ps_layered_indexable_feature_value_lang_value.go +++ b/app/model/dbmodel/ps_layered_indexable_feature_value_lang_value.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredIndexableFeatureValueLangValue = "ps_layered_indexable_feature_value_lang_value" @@ -18,3 +18,15 @@ type PsLayeredIndexableFeatureValueLangValue struct { func (*PsLayeredIndexableFeatureValueLangValue) TableName() string { return TableNamePsLayeredIndexableFeatureValueLangValue } + +var PsLayeredIndexableFeatureValueLangValueCols = struct { + IDFeatureValue gormcol.Field + IDLang gormcol.Field + URLName gormcol.Field + MetaTitle gormcol.Field +}{ + IDFeatureValue: gormcol.Field{}.Set((&PsLayeredIndexableFeatureValueLangValue{}).TableName(), "id_feature_value"), + IDLang: gormcol.Field{}.Set((&PsLayeredIndexableFeatureValueLangValue{}).TableName(), "id_lang"), + URLName: gormcol.Field{}.Set((&PsLayeredIndexableFeatureValueLangValue{}).TableName(), "url_name"), + MetaTitle: gormcol.Field{}.Set((&PsLayeredIndexableFeatureValueLangValue{}).TableName(), "meta_title"), +} diff --git a/app/model/prestadb/ps_layered_price_index.go b/app/model/dbmodel/ps_layered_price_index.go similarity index 51% rename from app/model/prestadb/ps_layered_price_index.go rename to app/model/dbmodel/ps_layered_price_index.go index 06a95b2..e2e96c3 100644 --- a/app/model/prestadb/ps_layered_price_index.go +++ b/app/model/dbmodel/ps_layered_price_index.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredPriceIndex = "ps_layered_price_index" @@ -20,3 +20,19 @@ type PsLayeredPriceIndex struct { func (*PsLayeredPriceIndex) TableName() string { return TableNamePsLayeredPriceIndex } + +var PsLayeredPriceIndexCols = struct { + IDProduct gormcol.Field + IDCurrency gormcol.Field + IDShop gormcol.Field + PriceMin gormcol.Field + PriceMax gormcol.Field + IDCountry gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsLayeredPriceIndex{}).TableName(), "id_product"), + IDCurrency: gormcol.Field{}.Set((&PsLayeredPriceIndex{}).TableName(), "id_currency"), + IDShop: gormcol.Field{}.Set((&PsLayeredPriceIndex{}).TableName(), "id_shop"), + PriceMin: gormcol.Field{}.Set((&PsLayeredPriceIndex{}).TableName(), "price_min"), + PriceMax: gormcol.Field{}.Set((&PsLayeredPriceIndex{}).TableName(), "price_max"), + IDCountry: gormcol.Field{}.Set((&PsLayeredPriceIndex{}).TableName(), "id_country"), +} diff --git a/app/model/prestadb/ps_layered_product_attribute.go b/app/model/dbmodel/ps_layered_product_attribute.go similarity index 57% rename from app/model/prestadb/ps_layered_product_attribute.go rename to app/model/dbmodel/ps_layered_product_attribute.go index b02325f..5d5933a 100644 --- a/app/model/prestadb/ps_layered_product_attribute.go +++ b/app/model/dbmodel/ps_layered_product_attribute.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLayeredProductAttribute = "ps_layered_product_attribute" @@ -18,3 +18,15 @@ type PsLayeredProductAttribute struct { func (*PsLayeredProductAttribute) TableName() string { return TableNamePsLayeredProductAttribute } + +var PsLayeredProductAttributeCols = struct { + IDAttribute gormcol.Field + IDProduct gormcol.Field + IDAttributeGroup gormcol.Field + IDShop gormcol.Field +}{ + IDAttribute: gormcol.Field{}.Set((&PsLayeredProductAttribute{}).TableName(), "id_attribute"), + IDProduct: gormcol.Field{}.Set((&PsLayeredProductAttribute{}).TableName(), "id_product"), + IDAttributeGroup: gormcol.Field{}.Set((&PsLayeredProductAttribute{}).TableName(), "id_attribute_group"), + IDShop: gormcol.Field{}.Set((&PsLayeredProductAttribute{}).TableName(), "id_shop"), +} diff --git a/app/model/dbmodel/ps_link_block.go b/app/model/dbmodel/ps_link_block.go new file mode 100644 index 0000000..fad96fd --- /dev/null +++ b/app/model/dbmodel/ps_link_block.go @@ -0,0 +1,32 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsLinkBlock = "ps_link_block" + +// PsLinkBlock mapped from table +type PsLinkBlock struct { + IDLinkBlock int32 `gorm:"column:id_link_block;primaryKey;autoIncrement:true" json:"id_link_block"` + IDHook *int32 `gorm:"column:id_hook" json:"id_hook"` + Position int32 `gorm:"column:position;not null" json:"position"` + Content *string `gorm:"column:content" json:"content"` +} + +// TableName PsLinkBlock's table name +func (*PsLinkBlock) TableName() string { + return TableNamePsLinkBlock +} + +var PsLinkBlockCols = struct { + IDLinkBlock gormcol.Field + IDHook gormcol.Field + Position gormcol.Field + Content gormcol.Field +}{ + IDLinkBlock: gormcol.Field{}.Set((&PsLinkBlock{}).TableName(), "id_link_block"), + IDHook: gormcol.Field{}.Set((&PsLinkBlock{}).TableName(), "id_hook"), + Position: gormcol.Field{}.Set((&PsLinkBlock{}).TableName(), "position"), + Content: gormcol.Field{}.Set((&PsLinkBlock{}).TableName(), "content"), +} diff --git a/app/model/prestadb/ps_link_block_lang.go b/app/model/dbmodel/ps_link_block_lang.go similarity index 50% rename from app/model/prestadb/ps_link_block_lang.go rename to app/model/dbmodel/ps_link_block_lang.go index d2deab5..f484da3 100644 --- a/app/model/prestadb/ps_link_block_lang.go +++ b/app/model/dbmodel/ps_link_block_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLinkBlockLang = "ps_link_block_lang" @@ -18,3 +18,15 @@ type PsLinkBlockLang struct { func (*PsLinkBlockLang) TableName() string { return TableNamePsLinkBlockLang } + +var PsLinkBlockLangCols = struct { + IDLinkBlock gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + CustomContent gormcol.Field +}{ + IDLinkBlock: gormcol.Field{}.Set((&PsLinkBlockLang{}).TableName(), "id_link_block"), + IDLang: gormcol.Field{}.Set((&PsLinkBlockLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsLinkBlockLang{}).TableName(), "name"), + CustomContent: gormcol.Field{}.Set((&PsLinkBlockLang{}).TableName(), "custom_content"), +} diff --git a/app/model/prestadb/ps_link_block_shop.go b/app/model/dbmodel/ps_link_block_shop.go similarity index 55% rename from app/model/prestadb/ps_link_block_shop.go rename to app/model/dbmodel/ps_link_block_shop.go index 61489cf..2d30a3e 100644 --- a/app/model/prestadb/ps_link_block_shop.go +++ b/app/model/dbmodel/ps_link_block_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLinkBlockShop = "ps_link_block_shop" @@ -16,3 +16,11 @@ type PsLinkBlockShop struct { func (*PsLinkBlockShop) TableName() string { return TableNamePsLinkBlockShop } + +var PsLinkBlockShopCols = struct { + IDLinkBlock gormcol.Field + IDShop gormcol.Field +}{ + IDLinkBlock: gormcol.Field{}.Set((&PsLinkBlockShop{}).TableName(), "id_link_block"), + IDShop: gormcol.Field{}.Set((&PsLinkBlockShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_linksmenutop.go b/app/model/dbmodel/ps_linksmenutop.go similarity index 53% rename from app/model/prestadb/ps_linksmenutop.go rename to app/model/dbmodel/ps_linksmenutop.go index 58bad7c..5fe93ab 100644 --- a/app/model/prestadb/ps_linksmenutop.go +++ b/app/model/dbmodel/ps_linksmenutop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLinksmenutop = "ps_linksmenutop" @@ -17,3 +17,13 @@ type PsLinksmenutop struct { func (*PsLinksmenutop) TableName() string { return TableNamePsLinksmenutop } + +var PsLinksmenutopCols = struct { + IDLinksmenutop gormcol.Field + IDShop gormcol.Field + NewWindow gormcol.Field +}{ + IDLinksmenutop: gormcol.Field{}.Set((&PsLinksmenutop{}).TableName(), "id_linksmenutop"), + IDShop: gormcol.Field{}.Set((&PsLinksmenutop{}).TableName(), "id_shop"), + NewWindow: gormcol.Field{}.Set((&PsLinksmenutop{}).TableName(), "new_window"), +} diff --git a/app/model/prestadb/ps_linksmenutop_lang.go b/app/model/dbmodel/ps_linksmenutop_lang.go similarity index 58% rename from app/model/prestadb/ps_linksmenutop_lang.go rename to app/model/dbmodel/ps_linksmenutop_lang.go index bd1bdec..404dea1 100644 --- a/app/model/prestadb/ps_linksmenutop_lang.go +++ b/app/model/dbmodel/ps_linksmenutop_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsLinksmenutopLang = "ps_linksmenutop_lang" @@ -19,3 +19,17 @@ type PsLinksmenutopLang struct { func (*PsLinksmenutopLang) TableName() string { return TableNamePsLinksmenutopLang } + +var PsLinksmenutopLangCols = struct { + IDLinksmenutop gormcol.Field + IDLang gormcol.Field + IDShop gormcol.Field + Label gormcol.Field + Link gormcol.Field +}{ + IDLinksmenutop: gormcol.Field{}.Set((&PsLinksmenutopLang{}).TableName(), "id_linksmenutop"), + IDLang: gormcol.Field{}.Set((&PsLinksmenutopLang{}).TableName(), "id_lang"), + IDShop: gormcol.Field{}.Set((&PsLinksmenutopLang{}).TableName(), "id_shop"), + Label: gormcol.Field{}.Set((&PsLinksmenutopLang{}).TableName(), "label"), + Link: gormcol.Field{}.Set((&PsLinksmenutopLang{}).TableName(), "link"), +} diff --git a/app/model/dbmodel/ps_log.go b/app/model/dbmodel/ps_log.go new file mode 100644 index 0000000..3b385f7 --- /dev/null +++ b/app/model/dbmodel/ps_log.go @@ -0,0 +1,50 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsLog = "ps_log" + +// PsLog mapped from table +type PsLog struct { + IDLog int32 `gorm:"column:id_log;primaryKey;autoIncrement:true" json:"id_log"` + Severity bool `gorm:"column:severity;not null" json:"severity"` + ErrorCode *int32 `gorm:"column:error_code" json:"error_code"` + Message string `gorm:"column:message;not null" json:"message"` + ObjectType *string `gorm:"column:object_type" json:"object_type"` + ObjectID *int32 `gorm:"column:object_id" json:"object_id"` + IDEmployee *int32 `gorm:"column:id_employee" json:"id_employee"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsLog's table name +func (*PsLog) TableName() string { + return TableNamePsLog +} + +var PsLogCols = struct { + IDLog gormcol.Field + Severity gormcol.Field + ErrorCode gormcol.Field + Message gormcol.Field + ObjectType gormcol.Field + ObjectID gormcol.Field + IDEmployee gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDLog: gormcol.Field{}.Set((&PsLog{}).TableName(), "id_log"), + Severity: gormcol.Field{}.Set((&PsLog{}).TableName(), "severity"), + ErrorCode: gormcol.Field{}.Set((&PsLog{}).TableName(), "error_code"), + Message: gormcol.Field{}.Set((&PsLog{}).TableName(), "message"), + ObjectType: gormcol.Field{}.Set((&PsLog{}).TableName(), "object_type"), + ObjectID: gormcol.Field{}.Set((&PsLog{}).TableName(), "object_id"), + IDEmployee: gormcol.Field{}.Set((&PsLog{}).TableName(), "id_employee"), + DateAdd: gormcol.Field{}.Set((&PsLog{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsLog{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_maal_cms_category.go b/app/model/dbmodel/ps_maal_cms_category.go similarity index 53% rename from app/model/prestadb/ps_maal_cms_category.go rename to app/model/dbmodel/ps_maal_cms_category.go index 5ca405c..63648a9 100644 --- a/app/model/prestadb/ps_maal_cms_category.go +++ b/app/model/dbmodel/ps_maal_cms_category.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -25,3 +24,21 @@ type PsMaalCmsCategory struct { func (*PsMaalCmsCategory) TableName() string { return TableNamePsMaalCmsCategory } + +var PsMaalCmsCategoryCols = struct { + IDCategory gormcol.Field + IDParent gormcol.Field + IDShopDefault gormcol.Field + Active gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Position gormcol.Field +}{ + IDCategory: gormcol.Field{}.Set((&PsMaalCmsCategory{}).TableName(), "id_category"), + IDParent: gormcol.Field{}.Set((&PsMaalCmsCategory{}).TableName(), "id_parent"), + IDShopDefault: gormcol.Field{}.Set((&PsMaalCmsCategory{}).TableName(), "id_shop_default"), + Active: gormcol.Field{}.Set((&PsMaalCmsCategory{}).TableName(), "active"), + DateAdd: gormcol.Field{}.Set((&PsMaalCmsCategory{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsMaalCmsCategory{}).TableName(), "date_upd"), + Position: gormcol.Field{}.Set((&PsMaalCmsCategory{}).TableName(), "position"), +} diff --git a/app/model/dbmodel/ps_maal_cms_category_lang.go b/app/model/dbmodel/ps_maal_cms_category_lang.go new file mode 100644 index 0000000..f3c51bc --- /dev/null +++ b/app/model/dbmodel/ps_maal_cms_category_lang.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsMaalCmsCategoryLang = "ps_maal_cms_category_lang" + +// PsMaalCmsCategoryLang mapped from table +type PsMaalCmsCategoryLang struct { + IDCategory int32 `gorm:"column:id_category;primaryKey" json:"id_category"` + IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Name string `gorm:"column:name;not null;index:category_name,priority:1" json:"name"` + Description *string `gorm:"column:description" json:"description"` + LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` + MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` +} + +// TableName PsMaalCmsCategoryLang's table name +func (*PsMaalCmsCategoryLang) TableName() string { + return TableNamePsMaalCmsCategoryLang +} + +var PsMaalCmsCategoryLangCols = struct { + IDCategory gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Description gormcol.Field + LinkRewrite gormcol.Field + MetaTitle gormcol.Field + MetaDescription gormcol.Field +}{ + IDCategory: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "id_category"), + IDShop: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "name"), + Description: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "description"), + LinkRewrite: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "link_rewrite"), + MetaTitle: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "meta_title"), + MetaDescription: gormcol.Field{}.Set((&PsMaalCmsCategoryLang{}).TableName(), "meta_description"), +} diff --git a/app/model/dbmodel/ps_maal_cms_page.go b/app/model/dbmodel/ps_maal_cms_page.go new file mode 100644 index 0000000..97d2bd6 --- /dev/null +++ b/app/model/dbmodel/ps_maal_cms_page.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsMaalCmsPage = "ps_maal_cms_page" + +// PsMaalCmsPage mapped from table +type PsMaalCmsPage struct { + IDPage int32 `gorm:"column:id_page;primaryKey;autoIncrement:true" json:"id_page"` + IDCategory *int32 `gorm:"column:id_category" json:"id_category"` + DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` + Content *string `gorm:"column:content" json:"content"` + Jumbotron *string `gorm:"column:jumbotron" json:"jumbotron"` +} + +// TableName PsMaalCmsPage's table name +func (*PsMaalCmsPage) TableName() string { + return TableNamePsMaalCmsPage +} + +var PsMaalCmsPageCols = struct { + IDPage gormcol.Field + IDCategory gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Content gormcol.Field + Jumbotron gormcol.Field +}{ + IDPage: gormcol.Field{}.Set((&PsMaalCmsPage{}).TableName(), "id_page"), + IDCategory: gormcol.Field{}.Set((&PsMaalCmsPage{}).TableName(), "id_category"), + DateAdd: gormcol.Field{}.Set((&PsMaalCmsPage{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsMaalCmsPage{}).TableName(), "date_upd"), + Content: gormcol.Field{}.Set((&PsMaalCmsPage{}).TableName(), "content"), + Jumbotron: gormcol.Field{}.Set((&PsMaalCmsPage{}).TableName(), "jumbotron"), +} diff --git a/app/model/dbmodel/ps_maal_events.go b/app/model/dbmodel/ps_maal_events.go new file mode 100644 index 0000000..b8e3789 --- /dev/null +++ b/app/model/dbmodel/ps_maal_events.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsMaalEvent = "ps_maal_events" + +// PsMaalEvent mapped from table +type PsMaalEvent struct { + IDEvent int32 `gorm:"column:id_event;primaryKey;autoIncrement:true" json:"id_event"` + Gallery *string `gorm:"column:gallery" json:"gallery"` + PostImg *string `gorm:"column:post_img" json:"post_img"` + Position *int32 `gorm:"column:position" json:"position"` + Active *int32 `gorm:"column:active" json:"active"` + DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` +} + +// TableName PsMaalEvent's table name +func (*PsMaalEvent) TableName() string { + return TableNamePsMaalEvent +} + +var PsMaalEventCols = struct { + IDEvent gormcol.Field + Gallery gormcol.Field + PostImg gormcol.Field + Position gormcol.Field + Active gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDEvent: gormcol.Field{}.Set((&PsMaalEvent{}).TableName(), "id_event"), + Gallery: gormcol.Field{}.Set((&PsMaalEvent{}).TableName(), "gallery"), + PostImg: gormcol.Field{}.Set((&PsMaalEvent{}).TableName(), "post_img"), + Position: gormcol.Field{}.Set((&PsMaalEvent{}).TableName(), "position"), + Active: gormcol.Field{}.Set((&PsMaalEvent{}).TableName(), "active"), + DateAdd: gormcol.Field{}.Set((&PsMaalEvent{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsMaalEvent{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_maal_events_lang.go b/app/model/dbmodel/ps_maal_events_lang.go new file mode 100644 index 0000000..d0d3caf --- /dev/null +++ b/app/model/dbmodel/ps_maal_events_lang.go @@ -0,0 +1,50 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsMaalEventsLang = "ps_maal_events_lang" + +// PsMaalEventsLang mapped from table +type PsMaalEventsLang struct { + IDEventLang int32 `gorm:"column:id_event_lang;primaryKey;autoIncrement:true" json:"id_event_lang"` + IDEvent int32 `gorm:"column:id_event;not null;index:id_event_id_lang,priority:1" json:"id_event"` + IDLang int32 `gorm:"column:id_lang;not null;index:id_event_id_lang,priority:2" json:"id_lang"` + PostTitle *string `gorm:"column:post_title" json:"post_title"` + MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` + ContentTop *string `gorm:"column:content_top" json:"content_top"` + ContentMiddle *string `gorm:"column:content_middle" json:"content_middle"` + ContentBottom *string `gorm:"column:content_bottom" json:"content_bottom"` + LinkRewrite *string `gorm:"column:link_rewrite" json:"link_rewrite"` +} + +// TableName PsMaalEventsLang's table name +func (*PsMaalEventsLang) TableName() string { + return TableNamePsMaalEventsLang +} + +var PsMaalEventsLangCols = struct { + IDEventLang gormcol.Field + IDEvent gormcol.Field + IDLang gormcol.Field + PostTitle gormcol.Field + MetaTitle gormcol.Field + MetaDescription gormcol.Field + ContentTop gormcol.Field + ContentMiddle gormcol.Field + ContentBottom gormcol.Field + LinkRewrite gormcol.Field +}{ + IDEventLang: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "id_event_lang"), + IDEvent: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "id_event"), + IDLang: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "id_lang"), + PostTitle: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "post_title"), + MetaTitle: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "meta_title"), + MetaDescription: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "meta_description"), + ContentTop: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "content_top"), + ContentMiddle: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "content_middle"), + ContentBottom: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "content_bottom"), + LinkRewrite: gormcol.Field{}.Set((&PsMaalEventsLang{}).TableName(), "link_rewrite"), +} diff --git a/app/model/prestadb/ps_maal_invoice_note.go b/app/model/dbmodel/ps_maal_invoice_note.go similarity index 54% rename from app/model/prestadb/ps_maal_invoice_note.go rename to app/model/dbmodel/ps_maal_invoice_note.go index 8b1613b..30cdc91 100644 --- a/app/model/prestadb/ps_maal_invoice_note.go +++ b/app/model/dbmodel/ps_maal_invoice_note.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -21,3 +20,13 @@ type PsMaalInvoiceNote struct { func (*PsMaalInvoiceNote) TableName() string { return TableNamePsMaalInvoiceNote } + +var PsMaalInvoiceNoteCols = struct { + IDOrder gormcol.Field + Note gormcol.Field + DateAdd gormcol.Field +}{ + IDOrder: gormcol.Field{}.Set((&PsMaalInvoiceNote{}).TableName(), "id_order"), + Note: gormcol.Field{}.Set((&PsMaalInvoiceNote{}).TableName(), "note"), + DateAdd: gormcol.Field{}.Set((&PsMaalInvoiceNote{}).TableName(), "date_add"), +} diff --git a/app/model/dbmodel/ps_maal_invoicehelper.go b/app/model/dbmodel/ps_maal_invoicehelper.go new file mode 100644 index 0000000..d6de6a4 --- /dev/null +++ b/app/model/dbmodel/ps_maal_invoicehelper.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsMaalInvoicehelper = "ps_maal_invoicehelper" + +// PsMaalInvoicehelper mapped from table +type PsMaalInvoicehelper struct { + IDOrder int32 `gorm:"column:id_order;primaryKey" json:"id_order"` + IDOrderInvoice *int32 `gorm:"column:id_order_invoice" json:"id_order_invoice"` + DateOfIssue *time.Time `gorm:"column:date_of_issue" json:"date_of_issue"` + DateDeliveryExpected *time.Time `gorm:"column:date_delivery_expected" json:"date_delivery_expected"` + DaysToPay *int32 `gorm:"column:days_to_pay" json:"days_to_pay"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsMaalInvoicehelper's table name +func (*PsMaalInvoicehelper) TableName() string { + return TableNamePsMaalInvoicehelper +} + +var PsMaalInvoicehelperCols = struct { + IDOrder gormcol.Field + IDOrderInvoice gormcol.Field + DateOfIssue gormcol.Field + DateDeliveryExpected gormcol.Field + DaysToPay gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDOrder: gormcol.Field{}.Set((&PsMaalInvoicehelper{}).TableName(), "id_order"), + IDOrderInvoice: gormcol.Field{}.Set((&PsMaalInvoicehelper{}).TableName(), "id_order_invoice"), + DateOfIssue: gormcol.Field{}.Set((&PsMaalInvoicehelper{}).TableName(), "date_of_issue"), + DateDeliveryExpected: gormcol.Field{}.Set((&PsMaalInvoicehelper{}).TableName(), "date_delivery_expected"), + DaysToPay: gormcol.Field{}.Set((&PsMaalInvoicehelper{}).TableName(), "days_to_pay"), + DateAdd: gormcol.Field{}.Set((&PsMaalInvoicehelper{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsMaalInvoicehelper{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_maal_links_blok.go b/app/model/dbmodel/ps_maal_links_blok.go similarity index 55% rename from app/model/prestadb/ps_maal_links_blok.go rename to app/model/dbmodel/ps_maal_links_blok.go index 5f85c0d..6109f1d 100644 --- a/app/model/prestadb/ps_maal_links_blok.go +++ b/app/model/dbmodel/ps_maal_links_blok.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsMaalLinksBlok = "ps_maal_links_blok" @@ -16,3 +16,11 @@ type PsMaalLinksBlok struct { func (*PsMaalLinksBlok) TableName() string { return TableNamePsMaalLinksBlok } + +var PsMaalLinksBlokCols = struct { + IDHomesliderSlides gormcol.Field + IDShop gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsMaalLinksBlok{}).TableName(), "id_homeslider_slides"), + IDShop: gormcol.Field{}.Set((&PsMaalLinksBlok{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_maal_links_blok_slides.go b/app/model/dbmodel/ps_maal_links_blok_slides.go similarity index 54% rename from app/model/prestadb/ps_maal_links_blok_slides.go rename to app/model/dbmodel/ps_maal_links_blok_slides.go index a03947e..663b7d6 100644 --- a/app/model/prestadb/ps_maal_links_blok_slides.go +++ b/app/model/dbmodel/ps_maal_links_blok_slides.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsMaalLinksBlokSlide = "ps_maal_links_blok_slides" @@ -17,3 +17,13 @@ type PsMaalLinksBlokSlide struct { func (*PsMaalLinksBlokSlide) TableName() string { return TableNamePsMaalLinksBlokSlide } + +var PsMaalLinksBlokSlideCols = struct { + IDHomesliderSlides gormcol.Field + Position gormcol.Field + Active gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsMaalLinksBlokSlide{}).TableName(), "id_homeslider_slides"), + Position: gormcol.Field{}.Set((&PsMaalLinksBlokSlide{}).TableName(), "position"), + Active: gormcol.Field{}.Set((&PsMaalLinksBlokSlide{}).TableName(), "active"), +} diff --git a/app/model/dbmodel/ps_maal_links_blok_slides_lang.go b/app/model/dbmodel/ps_maal_links_blok_slides_lang.go new file mode 100644 index 0000000..c1c6b9f --- /dev/null +++ b/app/model/dbmodel/ps_maal_links_blok_slides_lang.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsMaalLinksBlokSlidesLang = "ps_maal_links_blok_slides_lang" + +// PsMaalLinksBlokSlidesLang mapped from table +type PsMaalLinksBlokSlidesLang struct { + IDHomesliderSlides int32 `gorm:"column:id_homeslider_slides;primaryKey" json:"id_homeslider_slides"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Title string `gorm:"column:title;not null" json:"title"` + Description string `gorm:"column:description;not null" json:"description"` + Legend string `gorm:"column:legend;not null" json:"legend"` + URL string `gorm:"column:url;not null" json:"url"` + Image string `gorm:"column:image;not null" json:"image"` +} + +// TableName PsMaalLinksBlokSlidesLang's table name +func (*PsMaalLinksBlokSlidesLang) TableName() string { + return TableNamePsMaalLinksBlokSlidesLang +} + +var PsMaalLinksBlokSlidesLangCols = struct { + IDHomesliderSlides gormcol.Field + IDLang gormcol.Field + Title gormcol.Field + Description gormcol.Field + Legend gormcol.Field + URL gormcol.Field + Image gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsMaalLinksBlokSlidesLang{}).TableName(), "id_homeslider_slides"), + IDLang: gormcol.Field{}.Set((&PsMaalLinksBlokSlidesLang{}).TableName(), "id_lang"), + Title: gormcol.Field{}.Set((&PsMaalLinksBlokSlidesLang{}).TableName(), "title"), + Description: gormcol.Field{}.Set((&PsMaalLinksBlokSlidesLang{}).TableName(), "description"), + Legend: gormcol.Field{}.Set((&PsMaalLinksBlokSlidesLang{}).TableName(), "legend"), + URL: gormcol.Field{}.Set((&PsMaalLinksBlokSlidesLang{}).TableName(), "url"), + Image: gormcol.Field{}.Set((&PsMaalLinksBlokSlidesLang{}).TableName(), "image"), +} diff --git a/app/model/prestadb/ps_maal_slider.go b/app/model/dbmodel/ps_maal_slider.go similarity index 54% rename from app/model/prestadb/ps_maal_slider.go rename to app/model/dbmodel/ps_maal_slider.go index 6f7e885..e0433a0 100644 --- a/app/model/prestadb/ps_maal_slider.go +++ b/app/model/dbmodel/ps_maal_slider.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsMaalSlider = "ps_maal_slider" @@ -16,3 +16,11 @@ type PsMaalSlider struct { func (*PsMaalSlider) TableName() string { return TableNamePsMaalSlider } + +var PsMaalSliderCols = struct { + IDHomesliderSlides gormcol.Field + IDShop gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsMaalSlider{}).TableName(), "id_homeslider_slides"), + IDShop: gormcol.Field{}.Set((&PsMaalSlider{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_maal_slider_slides.go b/app/model/dbmodel/ps_maal_slider_slides.go similarity index 53% rename from app/model/prestadb/ps_maal_slider_slides.go rename to app/model/dbmodel/ps_maal_slider_slides.go index 3435f8d..9f6a137 100644 --- a/app/model/prestadb/ps_maal_slider_slides.go +++ b/app/model/dbmodel/ps_maal_slider_slides.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsMaalSliderSlide = "ps_maal_slider_slides" @@ -17,3 +17,13 @@ type PsMaalSliderSlide struct { func (*PsMaalSliderSlide) TableName() string { return TableNamePsMaalSliderSlide } + +var PsMaalSliderSlideCols = struct { + IDHomesliderSlides gormcol.Field + Position gormcol.Field + Active gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsMaalSliderSlide{}).TableName(), "id_homeslider_slides"), + Position: gormcol.Field{}.Set((&PsMaalSliderSlide{}).TableName(), "position"), + Active: gormcol.Field{}.Set((&PsMaalSliderSlide{}).TableName(), "active"), +} diff --git a/app/model/dbmodel/ps_maal_slider_slides_lang.go b/app/model/dbmodel/ps_maal_slider_slides_lang.go new file mode 100644 index 0000000..32e7cda --- /dev/null +++ b/app/model/dbmodel/ps_maal_slider_slides_lang.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsMaalSliderSlidesLang = "ps_maal_slider_slides_lang" + +// PsMaalSliderSlidesLang mapped from table +type PsMaalSliderSlidesLang struct { + IDHomesliderSlides int32 `gorm:"column:id_homeslider_slides;primaryKey" json:"id_homeslider_slides"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Title string `gorm:"column:title;not null" json:"title"` + Description string `gorm:"column:description;not null" json:"description"` + Legend string `gorm:"column:legend;not null" json:"legend"` + URL string `gorm:"column:url;not null" json:"url"` + Image string `gorm:"column:image;not null" json:"image"` +} + +// TableName PsMaalSliderSlidesLang's table name +func (*PsMaalSliderSlidesLang) TableName() string { + return TableNamePsMaalSliderSlidesLang +} + +var PsMaalSliderSlidesLangCols = struct { + IDHomesliderSlides gormcol.Field + IDLang gormcol.Field + Title gormcol.Field + Description gormcol.Field + Legend gormcol.Field + URL gormcol.Field + Image gormcol.Field +}{ + IDHomesliderSlides: gormcol.Field{}.Set((&PsMaalSliderSlidesLang{}).TableName(), "id_homeslider_slides"), + IDLang: gormcol.Field{}.Set((&PsMaalSliderSlidesLang{}).TableName(), "id_lang"), + Title: gormcol.Field{}.Set((&PsMaalSliderSlidesLang{}).TableName(), "title"), + Description: gormcol.Field{}.Set((&PsMaalSliderSlidesLang{}).TableName(), "description"), + Legend: gormcol.Field{}.Set((&PsMaalSliderSlidesLang{}).TableName(), "legend"), + URL: gormcol.Field{}.Set((&PsMaalSliderSlidesLang{}).TableName(), "url"), + Image: gormcol.Field{}.Set((&PsMaalSliderSlidesLang{}).TableName(), "image"), +} diff --git a/app/model/prestadb/ps_mail.go b/app/model/dbmodel/ps_mail.go similarity index 51% rename from app/model/prestadb/ps_mail.go rename to app/model/dbmodel/ps_mail.go index 14fca14..93e32d2 100644 --- a/app/model/prestadb/ps_mail.go +++ b/app/model/dbmodel/ps_mail.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsMail struct { func (*PsMail) TableName() string { return TableNamePsMail } + +var PsMailCols = struct { + IDMail gormcol.Field + Recipient gormcol.Field + Template gormcol.Field + Subject gormcol.Field + IDLang gormcol.Field + DateAdd gormcol.Field +}{ + IDMail: gormcol.Field{}.Set((&PsMail{}).TableName(), "id_mail"), + Recipient: gormcol.Field{}.Set((&PsMail{}).TableName(), "recipient"), + Template: gormcol.Field{}.Set((&PsMail{}).TableName(), "template"), + Subject: gormcol.Field{}.Set((&PsMail{}).TableName(), "subject"), + IDLang: gormcol.Field{}.Set((&PsMail{}).TableName(), "id_lang"), + DateAdd: gormcol.Field{}.Set((&PsMail{}).TableName(), "date_add"), +} diff --git a/app/model/dbmodel/ps_mailalert_customer_oos.go b/app/model/dbmodel/ps_mailalert_customer_oos.go new file mode 100644 index 0000000..85a6fcb --- /dev/null +++ b/app/model/dbmodel/ps_mailalert_customer_oos.go @@ -0,0 +1,38 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsMailalertCustomerOo = "ps_mailalert_customer_oos" + +// PsMailalertCustomerOo mapped from table +type PsMailalertCustomerOo struct { + IDCustomer int32 `gorm:"column:id_customer;primaryKey" json:"id_customer"` + CustomerEmail string `gorm:"column:customer_email;primaryKey" json:"customer_email"` + IDProduct int32 `gorm:"column:id_product;primaryKey" json:"id_product"` + IDProductAttribute int32 `gorm:"column:id_product_attribute;primaryKey" json:"id_product_attribute"` + IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"` + IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` +} + +// TableName PsMailalertCustomerOo's table name +func (*PsMailalertCustomerOo) TableName() string { + return TableNamePsMailalertCustomerOo +} + +var PsMailalertCustomerOoCols = struct { + IDCustomer gormcol.Field + CustomerEmail gormcol.Field + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field +}{ + IDCustomer: gormcol.Field{}.Set((&PsMailalertCustomerOo{}).TableName(), "id_customer"), + CustomerEmail: gormcol.Field{}.Set((&PsMailalertCustomerOo{}).TableName(), "customer_email"), + IDProduct: gormcol.Field{}.Set((&PsMailalertCustomerOo{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsMailalertCustomerOo{}).TableName(), "id_product_attribute"), + IDShop: gormcol.Field{}.Set((&PsMailalertCustomerOo{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsMailalertCustomerOo{}).TableName(), "id_lang"), +} diff --git a/app/model/prestadb/ps_manufacturer.go b/app/model/dbmodel/ps_manufacturer.go similarity index 51% rename from app/model/prestadb/ps_manufacturer.go rename to app/model/dbmodel/ps_manufacturer.go index 01d3e66..44abe3e 100644 --- a/app/model/prestadb/ps_manufacturer.go +++ b/app/model/dbmodel/ps_manufacturer.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsManufacturer struct { func (*PsManufacturer) TableName() string { return TableNamePsManufacturer } + +var PsManufacturerCols = struct { + IDManufacturer gormcol.Field + Name gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Active gormcol.Field +}{ + IDManufacturer: gormcol.Field{}.Set((&PsManufacturer{}).TableName(), "id_manufacturer"), + Name: gormcol.Field{}.Set((&PsManufacturer{}).TableName(), "name"), + DateAdd: gormcol.Field{}.Set((&PsManufacturer{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsManufacturer{}).TableName(), "date_upd"), + Active: gormcol.Field{}.Set((&PsManufacturer{}).TableName(), "active"), +} diff --git a/app/model/dbmodel/ps_manufacturer_lang.go b/app/model/dbmodel/ps_manufacturer_lang.go new file mode 100644 index 0000000..bb31e5d --- /dev/null +++ b/app/model/dbmodel/ps_manufacturer_lang.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsManufacturerLang = "ps_manufacturer_lang" + +// PsManufacturerLang mapped from table +type PsManufacturerLang struct { + IDManufacturer int32 `gorm:"column:id_manufacturer;primaryKey" json:"id_manufacturer"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Description *string `gorm:"column:description" json:"description"` + ShortDescription *string `gorm:"column:short_description" json:"short_description"` + MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` + MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` +} + +// TableName PsManufacturerLang's table name +func (*PsManufacturerLang) TableName() string { + return TableNamePsManufacturerLang +} + +var PsManufacturerLangCols = struct { + IDManufacturer gormcol.Field + IDLang gormcol.Field + Description gormcol.Field + ShortDescription gormcol.Field + MetaTitle gormcol.Field + MetaKeywords gormcol.Field + MetaDescription gormcol.Field +}{ + IDManufacturer: gormcol.Field{}.Set((&PsManufacturerLang{}).TableName(), "id_manufacturer"), + IDLang: gormcol.Field{}.Set((&PsManufacturerLang{}).TableName(), "id_lang"), + Description: gormcol.Field{}.Set((&PsManufacturerLang{}).TableName(), "description"), + ShortDescription: gormcol.Field{}.Set((&PsManufacturerLang{}).TableName(), "short_description"), + MetaTitle: gormcol.Field{}.Set((&PsManufacturerLang{}).TableName(), "meta_title"), + MetaKeywords: gormcol.Field{}.Set((&PsManufacturerLang{}).TableName(), "meta_keywords"), + MetaDescription: gormcol.Field{}.Set((&PsManufacturerLang{}).TableName(), "meta_description"), +} diff --git a/app/model/prestadb/ps_manufacturer_shop.go b/app/model/dbmodel/ps_manufacturer_shop.go similarity index 56% rename from app/model/prestadb/ps_manufacturer_shop.go rename to app/model/dbmodel/ps_manufacturer_shop.go index 126dfb0..1b44ace 100644 --- a/app/model/prestadb/ps_manufacturer_shop.go +++ b/app/model/dbmodel/ps_manufacturer_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsManufacturerShop = "ps_manufacturer_shop" @@ -16,3 +16,11 @@ type PsManufacturerShop struct { func (*PsManufacturerShop) TableName() string { return TableNamePsManufacturerShop } + +var PsManufacturerShopCols = struct { + IDManufacturer gormcol.Field + IDShop gormcol.Field +}{ + IDManufacturer: gormcol.Field{}.Set((&PsManufacturerShop{}).TableName(), "id_manufacturer"), + IDShop: gormcol.Field{}.Set((&PsManufacturerShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_memcached_servers.go b/app/model/dbmodel/ps_memcached_servers.go similarity index 52% rename from app/model/prestadb/ps_memcached_servers.go rename to app/model/dbmodel/ps_memcached_servers.go index a9188ce..e787dd2 100644 --- a/app/model/prestadb/ps_memcached_servers.go +++ b/app/model/dbmodel/ps_memcached_servers.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsMemcachedServer = "ps_memcached_servers" @@ -18,3 +18,15 @@ type PsMemcachedServer struct { func (*PsMemcachedServer) TableName() string { return TableNamePsMemcachedServer } + +var PsMemcachedServerCols = struct { + IDMemcachedServer gormcol.Field + IP gormcol.Field + Port gormcol.Field + Weight gormcol.Field +}{ + IDMemcachedServer: gormcol.Field{}.Set((&PsMemcachedServer{}).TableName(), "id_memcached_server"), + IP: gormcol.Field{}.Set((&PsMemcachedServer{}).TableName(), "ip"), + Port: gormcol.Field{}.Set((&PsMemcachedServer{}).TableName(), "port"), + Weight: gormcol.Field{}.Set((&PsMemcachedServer{}).TableName(), "weight"), +} diff --git a/app/model/prestadb/ps_message.go b/app/model/dbmodel/ps_message.go similarity index 51% rename from app/model/prestadb/ps_message.go rename to app/model/dbmodel/ps_message.go index c0e0d87..5fa6cd4 100644 --- a/app/model/prestadb/ps_message.go +++ b/app/model/dbmodel/ps_message.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -26,3 +25,23 @@ type PsMessage struct { func (*PsMessage) TableName() string { return TableNamePsMessage } + +var PsMessageCols = struct { + IDMessage gormcol.Field + IDCart gormcol.Field + IDCustomer gormcol.Field + IDEmployee gormcol.Field + IDOrder gormcol.Field + Message gormcol.Field + Private gormcol.Field + DateAdd gormcol.Field +}{ + IDMessage: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_message"), + IDCart: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_cart"), + IDCustomer: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_customer"), + IDEmployee: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_employee"), + IDOrder: gormcol.Field{}.Set((&PsMessage{}).TableName(), "id_order"), + Message: gormcol.Field{}.Set((&PsMessage{}).TableName(), "message"), + Private: gormcol.Field{}.Set((&PsMessage{}).TableName(), "private"), + DateAdd: gormcol.Field{}.Set((&PsMessage{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_message_readed.go b/app/model/dbmodel/ps_message_readed.go similarity index 53% rename from app/model/prestadb/ps_message_readed.go rename to app/model/dbmodel/ps_message_readed.go index 7d7c245..cffcad3 100644 --- a/app/model/prestadb/ps_message_readed.go +++ b/app/model/dbmodel/ps_message_readed.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -21,3 +20,13 @@ type PsMessageReaded struct { func (*PsMessageReaded) TableName() string { return TableNamePsMessageReaded } + +var PsMessageReadedCols = struct { + IDMessage gormcol.Field + IDEmployee gormcol.Field + DateAdd gormcol.Field +}{ + IDMessage: gormcol.Field{}.Set((&PsMessageReaded{}).TableName(), "id_message"), + IDEmployee: gormcol.Field{}.Set((&PsMessageReaded{}).TableName(), "id_employee"), + DateAdd: gormcol.Field{}.Set((&PsMessageReaded{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_meta.go b/app/model/dbmodel/ps_meta.go similarity index 53% rename from app/model/prestadb/ps_meta.go rename to app/model/dbmodel/ps_meta.go index d618d6c..b8d5a23 100644 --- a/app/model/prestadb/ps_meta.go +++ b/app/model/dbmodel/ps_meta.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsMetum = "ps_meta" @@ -17,3 +17,13 @@ type PsMetum struct { func (*PsMetum) TableName() string { return TableNamePsMetum } + +var PsMetumCols = struct { + IDMeta gormcol.Field + Page gormcol.Field + Configurable gormcol.Field +}{ + IDMeta: gormcol.Field{}.Set((&PsMetum{}).TableName(), "id_meta"), + Page: gormcol.Field{}.Set((&PsMetum{}).TableName(), "page"), + Configurable: gormcol.Field{}.Set((&PsMetum{}).TableName(), "configurable"), +} diff --git a/app/model/dbmodel/ps_meta_lang.go b/app/model/dbmodel/ps_meta_lang.go new file mode 100644 index 0000000..110f3c1 --- /dev/null +++ b/app/model/dbmodel/ps_meta_lang.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsMetaLang = "ps_meta_lang" + +// PsMetaLang mapped from table +type PsMetaLang struct { + IDMeta int32 `gorm:"column:id_meta;primaryKey" json:"id_meta"` + IDShop int32 `gorm:"column:id_shop;primaryKey;index:id_shop,priority:1;default:1" json:"id_shop"` + IDLang int32 `gorm:"column:id_lang;primaryKey;index:id_lang,priority:1" json:"id_lang"` + Title *string `gorm:"column:title" json:"title"` + Description *string `gorm:"column:description" json:"description"` + Keywords *string `gorm:"column:keywords" json:"keywords"` + URLRewrite string `gorm:"column:url_rewrite;not null" json:"url_rewrite"` +} + +// TableName PsMetaLang's table name +func (*PsMetaLang) TableName() string { + return TableNamePsMetaLang +} + +var PsMetaLangCols = struct { + IDMeta gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + Title gormcol.Field + Description gormcol.Field + Keywords gormcol.Field + URLRewrite gormcol.Field +}{ + IDMeta: gormcol.Field{}.Set((&PsMetaLang{}).TableName(), "id_meta"), + IDShop: gormcol.Field{}.Set((&PsMetaLang{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsMetaLang{}).TableName(), "id_lang"), + Title: gormcol.Field{}.Set((&PsMetaLang{}).TableName(), "title"), + Description: gormcol.Field{}.Set((&PsMetaLang{}).TableName(), "description"), + Keywords: gormcol.Field{}.Set((&PsMetaLang{}).TableName(), "keywords"), + URLRewrite: gormcol.Field{}.Set((&PsMetaLang{}).TableName(), "url_rewrite"), +} diff --git a/app/model/prestadb/ps_module.go b/app/model/dbmodel/ps_module.go similarity index 52% rename from app/model/prestadb/ps_module.go rename to app/model/dbmodel/ps_module.go index 673e443..b277493 100644 --- a/app/model/prestadb/ps_module.go +++ b/app/model/dbmodel/ps_module.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModule = "ps_module" @@ -18,3 +18,15 @@ type PsModule struct { func (*PsModule) TableName() string { return TableNamePsModule } + +var PsModuleCols = struct { + IDModule gormcol.Field + Name gormcol.Field + Active gormcol.Field + Version gormcol.Field +}{ + IDModule: gormcol.Field{}.Set((&PsModule{}).TableName(), "id_module"), + Name: gormcol.Field{}.Set((&PsModule{}).TableName(), "name"), + Active: gormcol.Field{}.Set((&PsModule{}).TableName(), "active"), + Version: gormcol.Field{}.Set((&PsModule{}).TableName(), "version"), +} diff --git a/app/model/prestadb/ps_module_access.go b/app/model/dbmodel/ps_module_access.go similarity index 53% rename from app/model/prestadb/ps_module_access.go rename to app/model/dbmodel/ps_module_access.go index f3e1a2d..72e3a1a 100644 --- a/app/model/prestadb/ps_module_access.go +++ b/app/model/dbmodel/ps_module_access.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModuleAccess = "ps_module_access" @@ -16,3 +16,11 @@ type PsModuleAccess struct { func (*PsModuleAccess) TableName() string { return TableNamePsModuleAccess } + +var PsModuleAccessCols = struct { + IDProfile gormcol.Field + IDAuthorizationRole gormcol.Field +}{ + IDProfile: gormcol.Field{}.Set((&PsModuleAccess{}).TableName(), "id_profile"), + IDAuthorizationRole: gormcol.Field{}.Set((&PsModuleAccess{}).TableName(), "id_authorization_role"), +} diff --git a/app/model/prestadb/ps_module_carrier.go b/app/model/dbmodel/ps_module_carrier.go similarity index 52% rename from app/model/prestadb/ps_module_carrier.go rename to app/model/dbmodel/ps_module_carrier.go index b243f4b..b0118ba 100644 --- a/app/model/prestadb/ps_module_carrier.go +++ b/app/model/dbmodel/ps_module_carrier.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModuleCarrier = "ps_module_carrier" @@ -17,3 +17,13 @@ type PsModuleCarrier struct { func (*PsModuleCarrier) TableName() string { return TableNamePsModuleCarrier } + +var PsModuleCarrierCols = struct { + IDModule gormcol.Field + IDShop gormcol.Field + IDReference gormcol.Field +}{ + IDModule: gormcol.Field{}.Set((&PsModuleCarrier{}).TableName(), "id_module"), + IDShop: gormcol.Field{}.Set((&PsModuleCarrier{}).TableName(), "id_shop"), + IDReference: gormcol.Field{}.Set((&PsModuleCarrier{}).TableName(), "id_reference"), +} diff --git a/app/model/prestadb/ps_module_country.go b/app/model/dbmodel/ps_module_country.go similarity index 52% rename from app/model/prestadb/ps_module_country.go rename to app/model/dbmodel/ps_module_country.go index 1dffb0d..c10e4cc 100644 --- a/app/model/prestadb/ps_module_country.go +++ b/app/model/dbmodel/ps_module_country.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModuleCountry = "ps_module_country" @@ -17,3 +17,13 @@ type PsModuleCountry struct { func (*PsModuleCountry) TableName() string { return TableNamePsModuleCountry } + +var PsModuleCountryCols = struct { + IDModule gormcol.Field + IDShop gormcol.Field + IDCountry gormcol.Field +}{ + IDModule: gormcol.Field{}.Set((&PsModuleCountry{}).TableName(), "id_module"), + IDShop: gormcol.Field{}.Set((&PsModuleCountry{}).TableName(), "id_shop"), + IDCountry: gormcol.Field{}.Set((&PsModuleCountry{}).TableName(), "id_country"), +} diff --git a/app/model/prestadb/ps_module_currency.go b/app/model/dbmodel/ps_module_currency.go similarity index 53% rename from app/model/prestadb/ps_module_currency.go rename to app/model/dbmodel/ps_module_currency.go index 4a0b496..9469518 100644 --- a/app/model/prestadb/ps_module_currency.go +++ b/app/model/dbmodel/ps_module_currency.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModuleCurrency = "ps_module_currency" @@ -17,3 +17,13 @@ type PsModuleCurrency struct { func (*PsModuleCurrency) TableName() string { return TableNamePsModuleCurrency } + +var PsModuleCurrencyCols = struct { + IDModule gormcol.Field + IDShop gormcol.Field + IDCurrency gormcol.Field +}{ + IDModule: gormcol.Field{}.Set((&PsModuleCurrency{}).TableName(), "id_module"), + IDShop: gormcol.Field{}.Set((&PsModuleCurrency{}).TableName(), "id_shop"), + IDCurrency: gormcol.Field{}.Set((&PsModuleCurrency{}).TableName(), "id_currency"), +} diff --git a/app/model/prestadb/ps_module_group.go b/app/model/dbmodel/ps_module_group.go similarity index 51% rename from app/model/prestadb/ps_module_group.go rename to app/model/dbmodel/ps_module_group.go index 762f566..7a2babb 100644 --- a/app/model/prestadb/ps_module_group.go +++ b/app/model/dbmodel/ps_module_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModuleGroup = "ps_module_group" @@ -17,3 +17,13 @@ type PsModuleGroup struct { func (*PsModuleGroup) TableName() string { return TableNamePsModuleGroup } + +var PsModuleGroupCols = struct { + IDModule gormcol.Field + IDShop gormcol.Field + IDGroup gormcol.Field +}{ + IDModule: gormcol.Field{}.Set((&PsModuleGroup{}).TableName(), "id_module"), + IDShop: gormcol.Field{}.Set((&PsModuleGroup{}).TableName(), "id_shop"), + IDGroup: gormcol.Field{}.Set((&PsModuleGroup{}).TableName(), "id_group"), +} diff --git a/app/model/prestadb/ps_module_history.go b/app/model/dbmodel/ps_module_history.go similarity index 51% rename from app/model/prestadb/ps_module_history.go rename to app/model/dbmodel/ps_module_history.go index 785afdf..98c2d97 100644 --- a/app/model/prestadb/ps_module_history.go +++ b/app/model/dbmodel/ps_module_history.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsModuleHistory struct { func (*PsModuleHistory) TableName() string { return TableNamePsModuleHistory } + +var PsModuleHistoryCols = struct { + ID gormcol.Field + IDEmployee gormcol.Field + IDModule gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + ID: gormcol.Field{}.Set((&PsModuleHistory{}).TableName(), "id"), + IDEmployee: gormcol.Field{}.Set((&PsModuleHistory{}).TableName(), "id_employee"), + IDModule: gormcol.Field{}.Set((&PsModuleHistory{}).TableName(), "id_module"), + DateAdd: gormcol.Field{}.Set((&PsModuleHistory{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsModuleHistory{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_module_preference.go b/app/model/dbmodel/ps_module_preference.go similarity index 52% rename from app/model/prestadb/ps_module_preference.go rename to app/model/dbmodel/ps_module_preference.go index ba1c891..eb65a8f 100644 --- a/app/model/prestadb/ps_module_preference.go +++ b/app/model/dbmodel/ps_module_preference.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModulePreference = "ps_module_preference" @@ -19,3 +19,17 @@ type PsModulePreference struct { func (*PsModulePreference) TableName() string { return TableNamePsModulePreference } + +var PsModulePreferenceCols = struct { + IDModulePreference gormcol.Field + IDEmployee gormcol.Field + Module gormcol.Field + Interest gormcol.Field + Favorite gormcol.Field +}{ + IDModulePreference: gormcol.Field{}.Set((&PsModulePreference{}).TableName(), "id_module_preference"), + IDEmployee: gormcol.Field{}.Set((&PsModulePreference{}).TableName(), "id_employee"), + Module: gormcol.Field{}.Set((&PsModulePreference{}).TableName(), "module"), + Interest: gormcol.Field{}.Set((&PsModulePreference{}).TableName(), "interest"), + Favorite: gormcol.Field{}.Set((&PsModulePreference{}).TableName(), "favorite"), +} diff --git a/app/model/prestadb/ps_module_shop.go b/app/model/dbmodel/ps_module_shop.go similarity index 53% rename from app/model/prestadb/ps_module_shop.go rename to app/model/dbmodel/ps_module_shop.go index 2fb0a17..47950a4 100644 --- a/app/model/prestadb/ps_module_shop.go +++ b/app/model/dbmodel/ps_module_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsModuleShop = "ps_module_shop" @@ -17,3 +17,13 @@ type PsModuleShop struct { func (*PsModuleShop) TableName() string { return TableNamePsModuleShop } + +var PsModuleShopCols = struct { + IDModule gormcol.Field + IDShop gormcol.Field + EnableDevice gormcol.Field +}{ + IDModule: gormcol.Field{}.Set((&PsModuleShop{}).TableName(), "id_module"), + IDShop: gormcol.Field{}.Set((&PsModuleShop{}).TableName(), "id_shop"), + EnableDevice: gormcol.Field{}.Set((&PsModuleShop{}).TableName(), "enable_device"), +} diff --git a/app/model/prestadb/ps_operating_system.go b/app/model/dbmodel/ps_operating_system.go similarity index 55% rename from app/model/prestadb/ps_operating_system.go rename to app/model/dbmodel/ps_operating_system.go index d55b4c7..9e78116 100644 --- a/app/model/prestadb/ps_operating_system.go +++ b/app/model/dbmodel/ps_operating_system.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOperatingSystem = "ps_operating_system" @@ -16,3 +16,11 @@ type PsOperatingSystem struct { func (*PsOperatingSystem) TableName() string { return TableNamePsOperatingSystem } + +var PsOperatingSystemCols = struct { + IDOperatingSystem gormcol.Field + Name gormcol.Field +}{ + IDOperatingSystem: gormcol.Field{}.Set((&PsOperatingSystem{}).TableName(), "id_operating_system"), + Name: gormcol.Field{}.Set((&PsOperatingSystem{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_order_carrier.go b/app/model/dbmodel/ps_order_carrier.go similarity index 50% rename from app/model/prestadb/ps_order_carrier.go rename to app/model/dbmodel/ps_order_carrier.go index 274c355..1ab13e9 100644 --- a/app/model/prestadb/ps_order_carrier.go +++ b/app/model/dbmodel/ps_order_carrier.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -27,3 +26,25 @@ type PsOrderCarrier struct { func (*PsOrderCarrier) TableName() string { return TableNamePsOrderCarrier } + +var PsOrderCarrierCols = struct { + IDOrderCarrier gormcol.Field + IDOrder gormcol.Field + IDCarrier gormcol.Field + IDOrderInvoice gormcol.Field + Weight gormcol.Field + ShippingCostTaxExcl gormcol.Field + ShippingCostTaxIncl gormcol.Field + TrackingNumber gormcol.Field + DateAdd gormcol.Field +}{ + IDOrderCarrier: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "id_order_carrier"), + IDOrder: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "id_order"), + IDCarrier: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "id_carrier"), + IDOrderInvoice: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "id_order_invoice"), + Weight: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "weight"), + ShippingCostTaxExcl: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "shipping_cost_tax_excl"), + ShippingCostTaxIncl: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "shipping_cost_tax_incl"), + TrackingNumber: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "tracking_number"), + DateAdd: gormcol.Field{}.Set((&PsOrderCarrier{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_order_cart_rule.go b/app/model/dbmodel/ps_order_cart_rule.go similarity index 50% rename from app/model/prestadb/ps_order_cart_rule.go rename to app/model/dbmodel/ps_order_cart_rule.go index 322160a..c366b2c 100644 --- a/app/model/prestadb/ps_order_cart_rule.go +++ b/app/model/dbmodel/ps_order_cart_rule.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderCartRule = "ps_order_cart_rule" @@ -22,3 +22,23 @@ type PsOrderCartRule struct { func (*PsOrderCartRule) TableName() string { return TableNamePsOrderCartRule } + +var PsOrderCartRuleCols = struct { + IDOrderCartRule gormcol.Field + IDOrder gormcol.Field + IDCartRule gormcol.Field + IDOrderInvoice gormcol.Field + Name gormcol.Field + Value gormcol.Field + ValueTaxExcl gormcol.Field + FreeShipping gormcol.Field +}{ + IDOrderCartRule: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "id_order_cart_rule"), + IDOrder: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "id_order"), + IDCartRule: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "id_cart_rule"), + IDOrderInvoice: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "id_order_invoice"), + Name: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "name"), + Value: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "value"), + ValueTaxExcl: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "value_tax_excl"), + FreeShipping: gormcol.Field{}.Set((&PsOrderCartRule{}).TableName(), "free_shipping"), +} diff --git a/app/model/dbmodel/ps_order_detail.go b/app/model/dbmodel/ps_order_detail.go new file mode 100644 index 0000000..40d1674 --- /dev/null +++ b/app/model/dbmodel/ps_order_detail.go @@ -0,0 +1,167 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsOrderDetail = "ps_order_detail" + +// PsOrderDetail mapped from table +type PsOrderDetail struct { + IDOrderDetail int32 `gorm:"column:id_order_detail;primaryKey;autoIncrement:true;index:id_order_id_order_detail,priority:2" json:"id_order_detail"` + IDOrder int32 `gorm:"column:id_order;not null;index:id_order_id_order_detail,priority:1;index:order_detail_order,priority:1" json:"id_order"` + IDOrderInvoice *int32 `gorm:"column:id_order_invoice" json:"id_order_invoice"` + IDWarehouse *int32 `gorm:"column:id_warehouse" json:"id_warehouse"` + IDShop int32 `gorm:"column:id_shop;not null" json:"id_shop"` + ProductID int32 `gorm:"column:product_id;not null;index:product_id,priority:1" json:"product_id"` + ProductAttributeID *int32 `gorm:"column:product_attribute_id;index:product_attribute_id,priority:1;index:product_id,priority:2" json:"product_attribute_id"` + IDCustomization *int32 `gorm:"column:id_customization" json:"id_customization"` + ProductName string `gorm:"column:product_name;not null" json:"product_name"` + ProductQuantity int32 `gorm:"column:product_quantity;not null" json:"product_quantity"` + ProductQuantityInStock int32 `gorm:"column:product_quantity_in_stock;not null" json:"product_quantity_in_stock"` + ProductQuantityRefunded int32 `gorm:"column:product_quantity_refunded;not null" json:"product_quantity_refunded"` + ProductQuantityReturn int32 `gorm:"column:product_quantity_return;not null" json:"product_quantity_return"` + ProductQuantityReinjected int32 `gorm:"column:product_quantity_reinjected;not null" json:"product_quantity_reinjected"` + ProductPrice float64 `gorm:"column:product_price;not null;default:0.000000" json:"product_price"` + ReductionPercent float64 `gorm:"column:reduction_percent;not null;default:0.00" json:"reduction_percent"` + ReductionAmount float64 `gorm:"column:reduction_amount;not null;default:0.000000" json:"reduction_amount"` + ReductionAmountTaxIncl float64 `gorm:"column:reduction_amount_tax_incl;not null;default:0.000000" json:"reduction_amount_tax_incl"` + ReductionAmountTaxExcl float64 `gorm:"column:reduction_amount_tax_excl;not null;default:0.000000" json:"reduction_amount_tax_excl"` + GroupReduction float64 `gorm:"column:group_reduction;not null;default:0.00" json:"group_reduction"` + ProductQuantityDiscount float64 `gorm:"column:product_quantity_discount;not null;default:0.000000" json:"product_quantity_discount"` + ProductEan13 *string `gorm:"column:product_ean13" json:"product_ean13"` + ProductIsbn *string `gorm:"column:product_isbn" json:"product_isbn"` + ProductUpc *string `gorm:"column:product_upc" json:"product_upc"` + ProductReference *string `gorm:"column:product_reference" json:"product_reference"` + ProductSupplierReference *string `gorm:"column:product_supplier_reference" json:"product_supplier_reference"` + ProductWeight float64 `gorm:"column:product_weight;not null" json:"product_weight"` + IDTaxRulesGroup *int32 `gorm:"column:id_tax_rules_group;index:id_tax_rules_group,priority:1" json:"id_tax_rules_group"` + TaxComputationMethod bool `gorm:"column:tax_computation_method;not null" json:"tax_computation_method"` + TaxName string `gorm:"column:tax_name;not null" json:"tax_name"` + TaxRate float64 `gorm:"column:tax_rate;not null;default:0.000" json:"tax_rate"` + Ecotax float64 `gorm:"column:ecotax;not null;default:0.000000" json:"ecotax"` + EcotaxTaxRate float64 `gorm:"column:ecotax_tax_rate;not null;default:0.000" json:"ecotax_tax_rate"` + DiscountQuantityApplied bool `gorm:"column:discount_quantity_applied;not null" json:"discount_quantity_applied"` + DownloadHash *string `gorm:"column:download_hash" json:"download_hash"` + DownloadNb *int32 `gorm:"column:download_nb" json:"download_nb"` + DownloadDeadline *time.Time `gorm:"column:download_deadline" json:"download_deadline"` + TotalPriceTaxIncl float64 `gorm:"column:total_price_tax_incl;not null;default:0.000000" json:"total_price_tax_incl"` + TotalPriceTaxExcl float64 `gorm:"column:total_price_tax_excl;not null;default:0.000000" json:"total_price_tax_excl"` + UnitPriceTaxIncl float64 `gorm:"column:unit_price_tax_incl;not null;default:0.000000" json:"unit_price_tax_incl"` + UnitPriceTaxExcl float64 `gorm:"column:unit_price_tax_excl;not null;default:0.000000" json:"unit_price_tax_excl"` + TotalShippingPriceTaxIncl float64 `gorm:"column:total_shipping_price_tax_incl;not null;default:0.000000" json:"total_shipping_price_tax_incl"` + TotalShippingPriceTaxExcl float64 `gorm:"column:total_shipping_price_tax_excl;not null;default:0.000000" json:"total_shipping_price_tax_excl"` + TotalPriceTaxInclDiscounted *float64 `gorm:"column:total_price_tax_incl_discounted" json:"total_price_tax_incl_discounted"` + CartRules *string `gorm:"column:cart_rules" json:"cart_rules"` + PurchaseSupplierPrice float64 `gorm:"column:purchase_supplier_price;not null;default:0.000000" json:"purchase_supplier_price"` + OriginalProductPrice float64 `gorm:"column:original_product_price;not null;default:0.000000" json:"original_product_price"` + OriginalWholesalePrice float64 `gorm:"column:original_wholesale_price;not null;default:0.000000" json:"original_wholesale_price"` +} + +// TableName PsOrderDetail's table name +func (*PsOrderDetail) TableName() string { + return TableNamePsOrderDetail +} + +var PsOrderDetailCols = struct { + IDOrderDetail gormcol.Field + IDOrder gormcol.Field + IDOrderInvoice gormcol.Field + IDWarehouse gormcol.Field + IDShop gormcol.Field + ProductID gormcol.Field + ProductAttributeID gormcol.Field + IDCustomization gormcol.Field + ProductName gormcol.Field + ProductQuantity gormcol.Field + ProductQuantityInStock gormcol.Field + ProductQuantityRefunded gormcol.Field + ProductQuantityReturn gormcol.Field + ProductQuantityReinjected gormcol.Field + ProductPrice gormcol.Field + ReductionPercent gormcol.Field + ReductionAmount gormcol.Field + ReductionAmountTaxIncl gormcol.Field + ReductionAmountTaxExcl gormcol.Field + GroupReduction gormcol.Field + ProductQuantityDiscount gormcol.Field + ProductEan13 gormcol.Field + ProductIsbn gormcol.Field + ProductUpc gormcol.Field + ProductReference gormcol.Field + ProductSupplierReference gormcol.Field + ProductWeight gormcol.Field + IDTaxRulesGroup gormcol.Field + TaxComputationMethod gormcol.Field + TaxName gormcol.Field + TaxRate gormcol.Field + Ecotax gormcol.Field + EcotaxTaxRate gormcol.Field + DiscountQuantityApplied gormcol.Field + DownloadHash gormcol.Field + DownloadNb gormcol.Field + DownloadDeadline gormcol.Field + TotalPriceTaxIncl gormcol.Field + TotalPriceTaxExcl gormcol.Field + UnitPriceTaxIncl gormcol.Field + UnitPriceTaxExcl gormcol.Field + TotalShippingPriceTaxIncl gormcol.Field + TotalShippingPriceTaxExcl gormcol.Field + TotalPriceTaxInclDiscounted gormcol.Field + CartRules gormcol.Field + PurchaseSupplierPrice gormcol.Field + OriginalProductPrice gormcol.Field + OriginalWholesalePrice gormcol.Field +}{ + IDOrderDetail: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "id_order_detail"), + IDOrder: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "id_order"), + IDOrderInvoice: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "id_order_invoice"), + IDWarehouse: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "id_warehouse"), + IDShop: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "id_shop"), + ProductID: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_id"), + ProductAttributeID: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_attribute_id"), + IDCustomization: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "id_customization"), + ProductName: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_name"), + ProductQuantity: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_quantity"), + ProductQuantityInStock: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_quantity_in_stock"), + ProductQuantityRefunded: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_quantity_refunded"), + ProductQuantityReturn: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_quantity_return"), + ProductQuantityReinjected: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_quantity_reinjected"), + ProductPrice: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_price"), + ReductionPercent: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "reduction_percent"), + ReductionAmount: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "reduction_amount"), + ReductionAmountTaxIncl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "reduction_amount_tax_incl"), + ReductionAmountTaxExcl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "reduction_amount_tax_excl"), + GroupReduction: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "group_reduction"), + ProductQuantityDiscount: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_quantity_discount"), + ProductEan13: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_ean13"), + ProductIsbn: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_isbn"), + ProductUpc: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_upc"), + ProductReference: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_reference"), + ProductSupplierReference: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_supplier_reference"), + ProductWeight: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "product_weight"), + IDTaxRulesGroup: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "id_tax_rules_group"), + TaxComputationMethod: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "tax_computation_method"), + TaxName: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "tax_name"), + TaxRate: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "tax_rate"), + Ecotax: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "ecotax"), + EcotaxTaxRate: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "ecotax_tax_rate"), + DiscountQuantityApplied: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "discount_quantity_applied"), + DownloadHash: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "download_hash"), + DownloadNb: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "download_nb"), + DownloadDeadline: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "download_deadline"), + TotalPriceTaxIncl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "total_price_tax_incl"), + TotalPriceTaxExcl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "total_price_tax_excl"), + UnitPriceTaxIncl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "unit_price_tax_incl"), + UnitPriceTaxExcl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "unit_price_tax_excl"), + TotalShippingPriceTaxIncl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "total_shipping_price_tax_incl"), + TotalShippingPriceTaxExcl: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "total_shipping_price_tax_excl"), + TotalPriceTaxInclDiscounted: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "total_price_tax_incl_discounted"), + CartRules: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "cart_rules"), + PurchaseSupplierPrice: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "purchase_supplier_price"), + OriginalProductPrice: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "original_product_price"), + OriginalWholesalePrice: gormcol.Field{}.Set((&PsOrderDetail{}).TableName(), "original_wholesale_price"), +} diff --git a/app/model/prestadb/ps_order_detail_tax.go b/app/model/dbmodel/ps_order_detail_tax.go similarity index 54% rename from app/model/prestadb/ps_order_detail_tax.go rename to app/model/dbmodel/ps_order_detail_tax.go index 4207d1d..b7b5c4f 100644 --- a/app/model/prestadb/ps_order_detail_tax.go +++ b/app/model/dbmodel/ps_order_detail_tax.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderDetailTax = "ps_order_detail_tax" @@ -18,3 +18,15 @@ type PsOrderDetailTax struct { func (*PsOrderDetailTax) TableName() string { return TableNamePsOrderDetailTax } + +var PsOrderDetailTaxCols = struct { + IDOrderDetail gormcol.Field + IDTax gormcol.Field + UnitAmount gormcol.Field + TotalAmount gormcol.Field +}{ + IDOrderDetail: gormcol.Field{}.Set((&PsOrderDetailTax{}).TableName(), "id_order_detail"), + IDTax: gormcol.Field{}.Set((&PsOrderDetailTax{}).TableName(), "id_tax"), + UnitAmount: gormcol.Field{}.Set((&PsOrderDetailTax{}).TableName(), "unit_amount"), + TotalAmount: gormcol.Field{}.Set((&PsOrderDetailTax{}).TableName(), "total_amount"), +} diff --git a/app/model/prestadb/ps_order_history.go b/app/model/dbmodel/ps_order_history.go similarity index 54% rename from app/model/prestadb/ps_order_history.go rename to app/model/dbmodel/ps_order_history.go index c0010c8..90ad38a 100644 --- a/app/model/prestadb/ps_order_history.go +++ b/app/model/dbmodel/ps_order_history.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsOrderHistory struct { func (*PsOrderHistory) TableName() string { return TableNamePsOrderHistory } + +var PsOrderHistoryCols = struct { + IDOrderHistory gormcol.Field + IDEmployee gormcol.Field + IDOrder gormcol.Field + IDOrderState gormcol.Field + DateAdd gormcol.Field +}{ + IDOrderHistory: gormcol.Field{}.Set((&PsOrderHistory{}).TableName(), "id_order_history"), + IDEmployee: gormcol.Field{}.Set((&PsOrderHistory{}).TableName(), "id_employee"), + IDOrder: gormcol.Field{}.Set((&PsOrderHistory{}).TableName(), "id_order"), + IDOrderState: gormcol.Field{}.Set((&PsOrderHistory{}).TableName(), "id_order_state"), + DateAdd: gormcol.Field{}.Set((&PsOrderHistory{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_order_invoice.go b/app/model/dbmodel/ps_order_invoice.go similarity index 50% rename from app/model/prestadb/ps_order_invoice.go rename to app/model/dbmodel/ps_order_invoice.go index 6fc81e0..098b6f5 100644 --- a/app/model/prestadb/ps_order_invoice.go +++ b/app/model/dbmodel/ps_order_invoice.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -39,3 +38,49 @@ type PsOrderInvoice struct { func (*PsOrderInvoice) TableName() string { return TableNamePsOrderInvoice } + +var PsOrderInvoiceCols = struct { + IDOrderInvoice gormcol.Field + IDOrder gormcol.Field + Number gormcol.Field + DeliveryNumber gormcol.Field + DeliveryDate gormcol.Field + TotalDiscountTaxExcl gormcol.Field + TotalDiscountTaxIncl gormcol.Field + TotalPaidTaxExcl gormcol.Field + TotalPaidTaxIncl gormcol.Field + TotalProducts gormcol.Field + TotalProductsWt gormcol.Field + TotalShippingTaxExcl gormcol.Field + TotalShippingTaxIncl gormcol.Field + ShippingTaxComputationMethod gormcol.Field + TotalWrappingTaxExcl gormcol.Field + TotalWrappingTaxIncl gormcol.Field + ShopAddress gormcol.Field + Note gormcol.Field + DateAdd gormcol.Field + FinalNumber gormcol.Field + IDShopCompany gormcol.Field +}{ + IDOrderInvoice: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "id_order_invoice"), + IDOrder: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "id_order"), + Number: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "number"), + DeliveryNumber: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "delivery_number"), + DeliveryDate: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "delivery_date"), + TotalDiscountTaxExcl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_discount_tax_excl"), + TotalDiscountTaxIncl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_discount_tax_incl"), + TotalPaidTaxExcl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_paid_tax_excl"), + TotalPaidTaxIncl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_paid_tax_incl"), + TotalProducts: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_products"), + TotalProductsWt: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_products_wt"), + TotalShippingTaxExcl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_shipping_tax_excl"), + TotalShippingTaxIncl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_shipping_tax_incl"), + ShippingTaxComputationMethod: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "shipping_tax_computation_method"), + TotalWrappingTaxExcl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_wrapping_tax_excl"), + TotalWrappingTaxIncl: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "total_wrapping_tax_incl"), + ShopAddress: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "shop_address"), + Note: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "note"), + DateAdd: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "date_add"), + FinalNumber: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "final_number"), + IDShopCompany: gormcol.Field{}.Set((&PsOrderInvoice{}).TableName(), "id_shop_company"), +} diff --git a/app/model/prestadb/ps_order_invoice_payment.go b/app/model/dbmodel/ps_order_invoice_payment.go similarity index 55% rename from app/model/prestadb/ps_order_invoice_payment.go rename to app/model/dbmodel/ps_order_invoice_payment.go index 0aa997a..52abfb8 100644 --- a/app/model/prestadb/ps_order_invoice_payment.go +++ b/app/model/dbmodel/ps_order_invoice_payment.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderInvoicePayment = "ps_order_invoice_payment" @@ -17,3 +17,13 @@ type PsOrderInvoicePayment struct { func (*PsOrderInvoicePayment) TableName() string { return TableNamePsOrderInvoicePayment } + +var PsOrderInvoicePaymentCols = struct { + IDOrderInvoice gormcol.Field + IDOrderPayment gormcol.Field + IDOrder gormcol.Field +}{ + IDOrderInvoice: gormcol.Field{}.Set((&PsOrderInvoicePayment{}).TableName(), "id_order_invoice"), + IDOrderPayment: gormcol.Field{}.Set((&PsOrderInvoicePayment{}).TableName(), "id_order_payment"), + IDOrder: gormcol.Field{}.Set((&PsOrderInvoicePayment{}).TableName(), "id_order"), +} diff --git a/app/model/prestadb/ps_order_invoice_tax.go b/app/model/dbmodel/ps_order_invoice_tax.go similarity index 52% rename from app/model/prestadb/ps_order_invoice_tax.go rename to app/model/dbmodel/ps_order_invoice_tax.go index 9b12008..502ffc6 100644 --- a/app/model/prestadb/ps_order_invoice_tax.go +++ b/app/model/dbmodel/ps_order_invoice_tax.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderInvoiceTax = "ps_order_invoice_tax" @@ -18,3 +18,15 @@ type PsOrderInvoiceTax struct { func (*PsOrderInvoiceTax) TableName() string { return TableNamePsOrderInvoiceTax } + +var PsOrderInvoiceTaxCols = struct { + IDOrderInvoice gormcol.Field + Type gormcol.Field + IDTax gormcol.Field + Amount gormcol.Field +}{ + IDOrderInvoice: gormcol.Field{}.Set((&PsOrderInvoiceTax{}).TableName(), "id_order_invoice"), + Type: gormcol.Field{}.Set((&PsOrderInvoiceTax{}).TableName(), "type"), + IDTax: gormcol.Field{}.Set((&PsOrderInvoiceTax{}).TableName(), "id_tax"), + Amount: gormcol.Field{}.Set((&PsOrderInvoiceTax{}).TableName(), "amount"), +} diff --git a/app/model/prestadb/ps_order_message.go b/app/model/dbmodel/ps_order_message.go similarity index 56% rename from app/model/prestadb/ps_order_message.go rename to app/model/dbmodel/ps_order_message.go index f9beaf2..a7c20c7 100644 --- a/app/model/prestadb/ps_order_message.go +++ b/app/model/dbmodel/ps_order_message.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -20,3 +19,11 @@ type PsOrderMessage struct { func (*PsOrderMessage) TableName() string { return TableNamePsOrderMessage } + +var PsOrderMessageCols = struct { + IDOrderMessage gormcol.Field + DateAdd gormcol.Field +}{ + IDOrderMessage: gormcol.Field{}.Set((&PsOrderMessage{}).TableName(), "id_order_message"), + DateAdd: gormcol.Field{}.Set((&PsOrderMessage{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_order_message_lang.go b/app/model/dbmodel/ps_order_message_lang.go similarity index 51% rename from app/model/prestadb/ps_order_message_lang.go rename to app/model/dbmodel/ps_order_message_lang.go index d9cf262..cb1b665 100644 --- a/app/model/prestadb/ps_order_message_lang.go +++ b/app/model/dbmodel/ps_order_message_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderMessageLang = "ps_order_message_lang" @@ -18,3 +18,15 @@ type PsOrderMessageLang struct { func (*PsOrderMessageLang) TableName() string { return TableNamePsOrderMessageLang } + +var PsOrderMessageLangCols = struct { + IDOrderMessage gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Message gormcol.Field +}{ + IDOrderMessage: gormcol.Field{}.Set((&PsOrderMessageLang{}).TableName(), "id_order_message"), + IDLang: gormcol.Field{}.Set((&PsOrderMessageLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsOrderMessageLang{}).TableName(), "name"), + Message: gormcol.Field{}.Set((&PsOrderMessageLang{}).TableName(), "message"), +} diff --git a/app/model/dbmodel/ps_order_notes.go b/app/model/dbmodel/ps_order_notes.go new file mode 100644 index 0000000..fb6bca0 --- /dev/null +++ b/app/model/dbmodel/ps_order_notes.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsOrderNote = "ps_order_notes" + +// PsOrderNote mapped from table +type PsOrderNote struct { + ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` + IDOrder int32 `gorm:"column:id_order;not null" json:"id_order"` + IDEmployee int32 `gorm:"column:id_employee;not null" json:"id_employee"` + Note *string `gorm:"column:note" json:"note"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsOrderNote's table name +func (*PsOrderNote) TableName() string { + return TableNamePsOrderNote +} + +var PsOrderNoteCols = struct { + ID gormcol.Field + IDOrder gormcol.Field + IDEmployee gormcol.Field + Note gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + ID: gormcol.Field{}.Set((&PsOrderNote{}).TableName(), "id"), + IDOrder: gormcol.Field{}.Set((&PsOrderNote{}).TableName(), "id_order"), + IDEmployee: gormcol.Field{}.Set((&PsOrderNote{}).TableName(), "id_employee"), + Note: gormcol.Field{}.Set((&PsOrderNote{}).TableName(), "note"), + DateAdd: gormcol.Field{}.Set((&PsOrderNote{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsOrderNote{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_order_payment.go b/app/model/dbmodel/ps_order_payment.go new file mode 100644 index 0000000..a42b972 --- /dev/null +++ b/app/model/dbmodel/ps_order_payment.go @@ -0,0 +1,62 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsOrderPayment = "ps_order_payment" + +// PsOrderPayment mapped from table +type PsOrderPayment struct { + IDOrderPayment int32 `gorm:"column:id_order_payment;primaryKey;autoIncrement:true" json:"id_order_payment"` + OrderReference *string `gorm:"column:order_reference;index:order_reference,priority:1" json:"order_reference"` + IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` + Amount float64 `gorm:"column:amount;not null" json:"amount"` + PaymentMethod string `gorm:"column:payment_method;not null" json:"payment_method"` + ConversionRate float64 `gorm:"column:conversion_rate;not null;default:1.000000" json:"conversion_rate"` + TransactionID *string `gorm:"column:transaction_id" json:"transaction_id"` + CardNumber *string `gorm:"column:card_number" json:"card_number"` + CardBrand *string `gorm:"column:card_brand" json:"card_brand"` + CardExpiration *string `gorm:"column:card_expiration" json:"card_expiration"` + CardHolder *string `gorm:"column:card_holder" json:"card_holder"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + IDPaymentModule int32 `gorm:"column:id_payment_module;not null" json:"id_payment_module"` +} + +// TableName PsOrderPayment's table name +func (*PsOrderPayment) TableName() string { + return TableNamePsOrderPayment +} + +var PsOrderPaymentCols = struct { + IDOrderPayment gormcol.Field + OrderReference gormcol.Field + IDCurrency gormcol.Field + Amount gormcol.Field + PaymentMethod gormcol.Field + ConversionRate gormcol.Field + TransactionID gormcol.Field + CardNumber gormcol.Field + CardBrand gormcol.Field + CardExpiration gormcol.Field + CardHolder gormcol.Field + DateAdd gormcol.Field + IDPaymentModule gormcol.Field +}{ + IDOrderPayment: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "id_order_payment"), + OrderReference: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "order_reference"), + IDCurrency: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "id_currency"), + Amount: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "amount"), + PaymentMethod: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "payment_method"), + ConversionRate: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "conversion_rate"), + TransactionID: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "transaction_id"), + CardNumber: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "card_number"), + CardBrand: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "card_brand"), + CardExpiration: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "card_expiration"), + CardHolder: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "card_holder"), + DateAdd: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "date_add"), + IDPaymentModule: gormcol.Field{}.Set((&PsOrderPayment{}).TableName(), "id_payment_module"), +} diff --git a/app/model/dbmodel/ps_order_payu_payments.go b/app/model/dbmodel/ps_order_payu_payments.go new file mode 100644 index 0000000..e929df2 --- /dev/null +++ b/app/model/dbmodel/ps_order_payu_payments.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsOrderPayuPayment = "ps_order_payu_payments" + +// PsOrderPayuPayment mapped from table +type PsOrderPayuPayment struct { + IDPayuPayment int32 `gorm:"column:id_payu_payment;primaryKey;autoIncrement:true" json:"id_payu_payment"` + IDOrder int32 `gorm:"column:id_order;not null" json:"id_order"` + IDCart int32 `gorm:"column:id_cart;not null" json:"id_cart"` + IDSession string `gorm:"column:id_session;not null" json:"id_session"` + ExtOrderID string `gorm:"column:ext_order_id;not null" json:"ext_order_id"` + Status string `gorm:"column:status;not null" json:"status"` + CreateAt *time.Time `gorm:"column:create_at" json:"create_at"` + UpdateAt *time.Time `gorm:"column:update_at" json:"update_at"` +} + +// TableName PsOrderPayuPayment's table name +func (*PsOrderPayuPayment) TableName() string { + return TableNamePsOrderPayuPayment +} + +var PsOrderPayuPaymentCols = struct { + IDPayuPayment gormcol.Field + IDOrder gormcol.Field + IDCart gormcol.Field + IDSession gormcol.Field + ExtOrderID gormcol.Field + Status gormcol.Field + CreateAt gormcol.Field + UpdateAt gormcol.Field +}{ + IDPayuPayment: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "id_payu_payment"), + IDOrder: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "id_order"), + IDCart: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "id_cart"), + IDSession: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "id_session"), + ExtOrderID: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "ext_order_id"), + Status: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "status"), + CreateAt: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "create_at"), + UpdateAt: gormcol.Field{}.Set((&PsOrderPayuPayment{}).TableName(), "update_at"), +} diff --git a/app/model/prestadb/ps_order_return.go b/app/model/dbmodel/ps_order_return.go similarity index 51% rename from app/model/prestadb/ps_order_return.go rename to app/model/dbmodel/ps_order_return.go index 98df261..6f1129f 100644 --- a/app/model/prestadb/ps_order_return.go +++ b/app/model/dbmodel/ps_order_return.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -25,3 +24,21 @@ type PsOrderReturn struct { func (*PsOrderReturn) TableName() string { return TableNamePsOrderReturn } + +var PsOrderReturnCols = struct { + IDOrderReturn gormcol.Field + IDCustomer gormcol.Field + IDOrder gormcol.Field + State gormcol.Field + Question gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDOrderReturn: gormcol.Field{}.Set((&PsOrderReturn{}).TableName(), "id_order_return"), + IDCustomer: gormcol.Field{}.Set((&PsOrderReturn{}).TableName(), "id_customer"), + IDOrder: gormcol.Field{}.Set((&PsOrderReturn{}).TableName(), "id_order"), + State: gormcol.Field{}.Set((&PsOrderReturn{}).TableName(), "state"), + Question: gormcol.Field{}.Set((&PsOrderReturn{}).TableName(), "question"), + DateAdd: gormcol.Field{}.Set((&PsOrderReturn{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsOrderReturn{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_order_return_detail.go b/app/model/dbmodel/ps_order_return_detail.go similarity index 50% rename from app/model/prestadb/ps_order_return_detail.go rename to app/model/dbmodel/ps_order_return_detail.go index e28f269..aef476c 100644 --- a/app/model/prestadb/ps_order_return_detail.go +++ b/app/model/dbmodel/ps_order_return_detail.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderReturnDetail = "ps_order_return_detail" @@ -18,3 +18,15 @@ type PsOrderReturnDetail struct { func (*PsOrderReturnDetail) TableName() string { return TableNamePsOrderReturnDetail } + +var PsOrderReturnDetailCols = struct { + IDOrderReturn gormcol.Field + IDOrderDetail gormcol.Field + IDCustomization gormcol.Field + ProductQuantity gormcol.Field +}{ + IDOrderReturn: gormcol.Field{}.Set((&PsOrderReturnDetail{}).TableName(), "id_order_return"), + IDOrderDetail: gormcol.Field{}.Set((&PsOrderReturnDetail{}).TableName(), "id_order_detail"), + IDCustomization: gormcol.Field{}.Set((&PsOrderReturnDetail{}).TableName(), "id_customization"), + ProductQuantity: gormcol.Field{}.Set((&PsOrderReturnDetail{}).TableName(), "product_quantity"), +} diff --git a/app/model/prestadb/ps_order_return_state.go b/app/model/dbmodel/ps_order_return_state.go similarity index 55% rename from app/model/prestadb/ps_order_return_state.go rename to app/model/dbmodel/ps_order_return_state.go index 0cf8679..a9b016e 100644 --- a/app/model/prestadb/ps_order_return_state.go +++ b/app/model/dbmodel/ps_order_return_state.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderReturnState = "ps_order_return_state" @@ -16,3 +16,11 @@ type PsOrderReturnState struct { func (*PsOrderReturnState) TableName() string { return TableNamePsOrderReturnState } + +var PsOrderReturnStateCols = struct { + IDOrderReturnState gormcol.Field + Color gormcol.Field +}{ + IDOrderReturnState: gormcol.Field{}.Set((&PsOrderReturnState{}).TableName(), "id_order_return_state"), + Color: gormcol.Field{}.Set((&PsOrderReturnState{}).TableName(), "color"), +} diff --git a/app/model/prestadb/ps_order_return_state_lang.go b/app/model/dbmodel/ps_order_return_state_lang.go similarity index 54% rename from app/model/prestadb/ps_order_return_state_lang.go rename to app/model/dbmodel/ps_order_return_state_lang.go index 228a791..9c53145 100644 --- a/app/model/prestadb/ps_order_return_state_lang.go +++ b/app/model/dbmodel/ps_order_return_state_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderReturnStateLang = "ps_order_return_state_lang" @@ -17,3 +17,13 @@ type PsOrderReturnStateLang struct { func (*PsOrderReturnStateLang) TableName() string { return TableNamePsOrderReturnStateLang } + +var PsOrderReturnStateLangCols = struct { + IDOrderReturnState gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDOrderReturnState: gormcol.Field{}.Set((&PsOrderReturnStateLang{}).TableName(), "id_order_return_state"), + IDLang: gormcol.Field{}.Set((&PsOrderReturnStateLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsOrderReturnStateLang{}).TableName(), "name"), +} diff --git a/app/model/dbmodel/ps_order_slip.go b/app/model/dbmodel/ps_order_slip.go new file mode 100644 index 0000000..da0f494 --- /dev/null +++ b/app/model/dbmodel/ps_order_slip.go @@ -0,0 +1,68 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsOrderSlip = "ps_order_slip" + +// PsOrderSlip mapped from table +type PsOrderSlip struct { + IDOrderSlip int32 `gorm:"column:id_order_slip;primaryKey;autoIncrement:true" json:"id_order_slip"` + ConversionRate float64 `gorm:"column:conversion_rate;not null;default:1.000000" json:"conversion_rate"` + IDCustomer int32 `gorm:"column:id_customer;not null;index:order_slip_customer,priority:1" json:"id_customer"` + IDOrder int32 `gorm:"column:id_order;not null;index:id_order,priority:1" json:"id_order"` + TotalProductsTaxExcl *float64 `gorm:"column:total_products_tax_excl" json:"total_products_tax_excl"` + TotalProductsTaxIncl *float64 `gorm:"column:total_products_tax_incl" json:"total_products_tax_incl"` + TotalShippingTaxExcl *float64 `gorm:"column:total_shipping_tax_excl" json:"total_shipping_tax_excl"` + TotalShippingTaxIncl *float64 `gorm:"column:total_shipping_tax_incl" json:"total_shipping_tax_incl"` + ShippingCost int32 `gorm:"column:shipping_cost;not null" json:"shipping_cost"` + Amount float64 `gorm:"column:amount;not null" json:"amount"` + ShippingCostAmount float64 `gorm:"column:shipping_cost_amount;not null" json:"shipping_cost_amount"` + Partial bool `gorm:"column:partial;not null" json:"partial"` + OrderSlipType bool `gorm:"column:order_slip_type;not null" json:"order_slip_type"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsOrderSlip's table name +func (*PsOrderSlip) TableName() string { + return TableNamePsOrderSlip +} + +var PsOrderSlipCols = struct { + IDOrderSlip gormcol.Field + ConversionRate gormcol.Field + IDCustomer gormcol.Field + IDOrder gormcol.Field + TotalProductsTaxExcl gormcol.Field + TotalProductsTaxIncl gormcol.Field + TotalShippingTaxExcl gormcol.Field + TotalShippingTaxIncl gormcol.Field + ShippingCost gormcol.Field + Amount gormcol.Field + ShippingCostAmount gormcol.Field + Partial gormcol.Field + OrderSlipType gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDOrderSlip: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "id_order_slip"), + ConversionRate: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "conversion_rate"), + IDCustomer: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "id_customer"), + IDOrder: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "id_order"), + TotalProductsTaxExcl: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "total_products_tax_excl"), + TotalProductsTaxIncl: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "total_products_tax_incl"), + TotalShippingTaxExcl: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "total_shipping_tax_excl"), + TotalShippingTaxIncl: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "total_shipping_tax_incl"), + ShippingCost: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "shipping_cost"), + Amount: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "amount"), + ShippingCostAmount: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "shipping_cost_amount"), + Partial: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "partial"), + OrderSlipType: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "order_slip_type"), + DateAdd: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsOrderSlip{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_order_slip_detail.go b/app/model/dbmodel/ps_order_slip_detail.go new file mode 100644 index 0000000..bf2ed7b --- /dev/null +++ b/app/model/dbmodel/ps_order_slip_detail.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsOrderSlipDetail = "ps_order_slip_detail" + +// PsOrderSlipDetail mapped from table +type PsOrderSlipDetail struct { + IDOrderSlip int32 `gorm:"column:id_order_slip;primaryKey" json:"id_order_slip"` + IDOrderDetail int32 `gorm:"column:id_order_detail;primaryKey" json:"id_order_detail"` + ProductQuantity int32 `gorm:"column:product_quantity;not null" json:"product_quantity"` + UnitPriceTaxExcl *float64 `gorm:"column:unit_price_tax_excl" json:"unit_price_tax_excl"` + UnitPriceTaxIncl *float64 `gorm:"column:unit_price_tax_incl" json:"unit_price_tax_incl"` + TotalPriceTaxExcl *float64 `gorm:"column:total_price_tax_excl" json:"total_price_tax_excl"` + TotalPriceTaxIncl *float64 `gorm:"column:total_price_tax_incl" json:"total_price_tax_incl"` + AmountTaxExcl *float64 `gorm:"column:amount_tax_excl" json:"amount_tax_excl"` + AmountTaxIncl *float64 `gorm:"column:amount_tax_incl" json:"amount_tax_incl"` +} + +// TableName PsOrderSlipDetail's table name +func (*PsOrderSlipDetail) TableName() string { + return TableNamePsOrderSlipDetail +} + +var PsOrderSlipDetailCols = struct { + IDOrderSlip gormcol.Field + IDOrderDetail gormcol.Field + ProductQuantity gormcol.Field + UnitPriceTaxExcl gormcol.Field + UnitPriceTaxIncl gormcol.Field + TotalPriceTaxExcl gormcol.Field + TotalPriceTaxIncl gormcol.Field + AmountTaxExcl gormcol.Field + AmountTaxIncl gormcol.Field +}{ + IDOrderSlip: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "id_order_slip"), + IDOrderDetail: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "id_order_detail"), + ProductQuantity: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "product_quantity"), + UnitPriceTaxExcl: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "unit_price_tax_excl"), + UnitPriceTaxIncl: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "unit_price_tax_incl"), + TotalPriceTaxExcl: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "total_price_tax_excl"), + TotalPriceTaxIncl: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "total_price_tax_incl"), + AmountTaxExcl: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "amount_tax_excl"), + AmountTaxIncl: gormcol.Field{}.Set((&PsOrderSlipDetail{}).TableName(), "amount_tax_incl"), +} diff --git a/app/model/prestadb/ps_order_slip_detail_tax.go b/app/model/dbmodel/ps_order_slip_detail_tax.go similarity index 54% rename from app/model/prestadb/ps_order_slip_detail_tax.go rename to app/model/dbmodel/ps_order_slip_detail_tax.go index 7bdaf8c..a3e1a67 100644 --- a/app/model/prestadb/ps_order_slip_detail_tax.go +++ b/app/model/dbmodel/ps_order_slip_detail_tax.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderSlipDetailTax = "ps_order_slip_detail_tax" @@ -18,3 +18,15 @@ type PsOrderSlipDetailTax struct { func (*PsOrderSlipDetailTax) TableName() string { return TableNamePsOrderSlipDetailTax } + +var PsOrderSlipDetailTaxCols = struct { + IDOrderSlipDetail gormcol.Field + IDTax gormcol.Field + UnitAmount gormcol.Field + TotalAmount gormcol.Field +}{ + IDOrderSlipDetail: gormcol.Field{}.Set((&PsOrderSlipDetailTax{}).TableName(), "id_order_slip_detail"), + IDTax: gormcol.Field{}.Set((&PsOrderSlipDetailTax{}).TableName(), "id_tax"), + UnitAmount: gormcol.Field{}.Set((&PsOrderSlipDetailTax{}).TableName(), "unit_amount"), + TotalAmount: gormcol.Field{}.Set((&PsOrderSlipDetailTax{}).TableName(), "total_amount"), +} diff --git a/app/model/dbmodel/ps_order_state.go b/app/model/dbmodel/ps_order_state.go new file mode 100644 index 0000000..c636252 --- /dev/null +++ b/app/model/dbmodel/ps_order_state.go @@ -0,0 +1,62 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsOrderState = "ps_order_state" + +// PsOrderState mapped from table +type PsOrderState struct { + IDOrderState int32 `gorm:"column:id_order_state;primaryKey;autoIncrement:true" json:"id_order_state"` + Invoice *bool `gorm:"column:invoice" json:"invoice"` + SendEmail bool `gorm:"column:send_email;not null" json:"send_email"` + ModuleName *string `gorm:"column:module_name;index:module_name,priority:1" json:"module_name"` + Color *string `gorm:"column:color" json:"color"` + Unremovable bool `gorm:"column:unremovable;not null" json:"unremovable"` + Hidden bool `gorm:"column:hidden;not null" json:"hidden"` + Logable bool `gorm:"column:logable;not null" json:"logable"` + Delivery bool `gorm:"column:delivery;not null" json:"delivery"` + Shipped bool `gorm:"column:shipped;not null" json:"shipped"` + Paid bool `gorm:"column:paid;not null" json:"paid"` + PdfInvoice bool `gorm:"column:pdf_invoice;not null" json:"pdf_invoice"` + PdfDelivery bool `gorm:"column:pdf_delivery;not null" json:"pdf_delivery"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` +} + +// TableName PsOrderState's table name +func (*PsOrderState) TableName() string { + return TableNamePsOrderState +} + +var PsOrderStateCols = struct { + IDOrderState gormcol.Field + Invoice gormcol.Field + SendEmail gormcol.Field + ModuleName gormcol.Field + Color gormcol.Field + Unremovable gormcol.Field + Hidden gormcol.Field + Logable gormcol.Field + Delivery gormcol.Field + Shipped gormcol.Field + Paid gormcol.Field + PdfInvoice gormcol.Field + PdfDelivery gormcol.Field + Deleted gormcol.Field +}{ + IDOrderState: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "id_order_state"), + Invoice: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "invoice"), + SendEmail: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "send_email"), + ModuleName: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "module_name"), + Color: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "color"), + Unremovable: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "unremovable"), + Hidden: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "hidden"), + Logable: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "logable"), + Delivery: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "delivery"), + Shipped: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "shipped"), + Paid: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "paid"), + PdfInvoice: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "pdf_invoice"), + PdfDelivery: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "pdf_delivery"), + Deleted: gormcol.Field{}.Set((&PsOrderState{}).TableName(), "deleted"), +} diff --git a/app/model/prestadb/ps_order_state_lang.go b/app/model/dbmodel/ps_order_state_lang.go similarity index 50% rename from app/model/prestadb/ps_order_state_lang.go rename to app/model/dbmodel/ps_order_state_lang.go index bc59dab..744ebdc 100644 --- a/app/model/prestadb/ps_order_state_lang.go +++ b/app/model/dbmodel/ps_order_state_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsOrderStateLang = "ps_order_state_lang" @@ -18,3 +18,15 @@ type PsOrderStateLang struct { func (*PsOrderStateLang) TableName() string { return TableNamePsOrderStateLang } + +var PsOrderStateLangCols = struct { + IDOrderState gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Template gormcol.Field +}{ + IDOrderState: gormcol.Field{}.Set((&PsOrderStateLang{}).TableName(), "id_order_state"), + IDLang: gormcol.Field{}.Set((&PsOrderStateLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsOrderStateLang{}).TableName(), "name"), + Template: gormcol.Field{}.Set((&PsOrderStateLang{}).TableName(), "template"), +} diff --git a/app/model/prestadb/ps_orders.go b/app/model/dbmodel/ps_orders.go similarity index 50% rename from app/model/prestadb/ps_orders.go rename to app/model/dbmodel/ps_orders.go index 71a915f..cc5fada 100644 --- a/app/model/prestadb/ps_orders.go +++ b/app/model/dbmodel/ps_orders.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -64,3 +63,99 @@ type PsOrder struct { func (*PsOrder) TableName() string { return TableNamePsOrder } + +var PsOrderCols = struct { + IDOrder gormcol.Field + Reference gormcol.Field + IDShopGroup gormcol.Field + IDShop gormcol.Field + IDCarrier gormcol.Field + IDLang gormcol.Field + IDCustomer gormcol.Field + IDCart gormcol.Field + IDCurrency gormcol.Field + IDAddressDelivery gormcol.Field + IDAddressInvoice gormcol.Field + CurrentState gormcol.Field + SecureKey gormcol.Field + Payment gormcol.Field + ConversionRate gormcol.Field + Module gormcol.Field + Recyclable gormcol.Field + Gift gormcol.Field + GiftMessage gormcol.Field + MobileTheme gormcol.Field + ShippingNumber gormcol.Field + TotalDiscounts gormcol.Field + TotalDiscountsTaxIncl gormcol.Field + TotalDiscountsTaxExcl gormcol.Field + TotalPaid gormcol.Field + TotalPaidTaxIncl gormcol.Field + TotalPaidTaxExcl gormcol.Field + TotalPaidReal gormcol.Field + TotalProducts gormcol.Field + TotalProductsWt gormcol.Field + TotalShipping gormcol.Field + TotalShippingTaxIncl gormcol.Field + TotalShippingTaxExcl gormcol.Field + CarrierTaxRate gormcol.Field + TotalWrapping gormcol.Field + TotalWrappingTaxIncl gormcol.Field + TotalWrappingTaxExcl gormcol.Field + RoundMode gormcol.Field + RoundType gormcol.Field + InvoiceNumber gormcol.Field + DeliveryNumber gormcol.Field + InvoiceDate gormcol.Field + DeliveryDate gormcol.Field + Valid gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDOrder: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_order"), + Reference: gormcol.Field{}.Set((&PsOrder{}).TableName(), "reference"), + IDShopGroup: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_shop_group"), + IDShop: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_shop"), + IDCarrier: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_carrier"), + IDLang: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_lang"), + IDCustomer: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_customer"), + IDCart: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_cart"), + IDCurrency: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_currency"), + IDAddressDelivery: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_address_delivery"), + IDAddressInvoice: gormcol.Field{}.Set((&PsOrder{}).TableName(), "id_address_invoice"), + CurrentState: gormcol.Field{}.Set((&PsOrder{}).TableName(), "current_state"), + SecureKey: gormcol.Field{}.Set((&PsOrder{}).TableName(), "secure_key"), + Payment: gormcol.Field{}.Set((&PsOrder{}).TableName(), "payment"), + ConversionRate: gormcol.Field{}.Set((&PsOrder{}).TableName(), "conversion_rate"), + Module: gormcol.Field{}.Set((&PsOrder{}).TableName(), "module"), + Recyclable: gormcol.Field{}.Set((&PsOrder{}).TableName(), "recyclable"), + Gift: gormcol.Field{}.Set((&PsOrder{}).TableName(), "gift"), + GiftMessage: gormcol.Field{}.Set((&PsOrder{}).TableName(), "gift_message"), + MobileTheme: gormcol.Field{}.Set((&PsOrder{}).TableName(), "mobile_theme"), + ShippingNumber: gormcol.Field{}.Set((&PsOrder{}).TableName(), "shipping_number"), + TotalDiscounts: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_discounts"), + TotalDiscountsTaxIncl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_discounts_tax_incl"), + TotalDiscountsTaxExcl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_discounts_tax_excl"), + TotalPaid: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_paid"), + TotalPaidTaxIncl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_paid_tax_incl"), + TotalPaidTaxExcl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_paid_tax_excl"), + TotalPaidReal: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_paid_real"), + TotalProducts: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_products"), + TotalProductsWt: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_products_wt"), + TotalShipping: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_shipping"), + TotalShippingTaxIncl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_shipping_tax_incl"), + TotalShippingTaxExcl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_shipping_tax_excl"), + CarrierTaxRate: gormcol.Field{}.Set((&PsOrder{}).TableName(), "carrier_tax_rate"), + TotalWrapping: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_wrapping"), + TotalWrappingTaxIncl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_wrapping_tax_incl"), + TotalWrappingTaxExcl: gormcol.Field{}.Set((&PsOrder{}).TableName(), "total_wrapping_tax_excl"), + RoundMode: gormcol.Field{}.Set((&PsOrder{}).TableName(), "round_mode"), + RoundType: gormcol.Field{}.Set((&PsOrder{}).TableName(), "round_type"), + InvoiceNumber: gormcol.Field{}.Set((&PsOrder{}).TableName(), "invoice_number"), + DeliveryNumber: gormcol.Field{}.Set((&PsOrder{}).TableName(), "delivery_number"), + InvoiceDate: gormcol.Field{}.Set((&PsOrder{}).TableName(), "invoice_date"), + DeliveryDate: gormcol.Field{}.Set((&PsOrder{}).TableName(), "delivery_date"), + Valid: gormcol.Field{}.Set((&PsOrder{}).TableName(), "valid"), + DateAdd: gormcol.Field{}.Set((&PsOrder{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsOrder{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_pack.go b/app/model/dbmodel/ps_pack.go similarity index 52% rename from app/model/prestadb/ps_pack.go rename to app/model/dbmodel/ps_pack.go index 2ca9be9..cd8dc46 100644 --- a/app/model/prestadb/ps_pack.go +++ b/app/model/dbmodel/ps_pack.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsPack = "ps_pack" @@ -18,3 +18,15 @@ type PsPack struct { func (*PsPack) TableName() string { return TableNamePsPack } + +var PsPackCols = struct { + IDProductPack gormcol.Field + IDProductItem gormcol.Field + IDProductAttributeItem gormcol.Field + Quantity gormcol.Field +}{ + IDProductPack: gormcol.Field{}.Set((&PsPack{}).TableName(), "id_product_pack"), + IDProductItem: gormcol.Field{}.Set((&PsPack{}).TableName(), "id_product_item"), + IDProductAttributeItem: gormcol.Field{}.Set((&PsPack{}).TableName(), "id_product_attribute_item"), + Quantity: gormcol.Field{}.Set((&PsPack{}).TableName(), "quantity"), +} diff --git a/app/model/prestadb/ps_page.go b/app/model/dbmodel/ps_page.go similarity index 53% rename from app/model/prestadb/ps_page.go rename to app/model/dbmodel/ps_page.go index c092272..26aca74 100644 --- a/app/model/prestadb/ps_page.go +++ b/app/model/dbmodel/ps_page.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsPage = "ps_page" @@ -17,3 +17,13 @@ type PsPage struct { func (*PsPage) TableName() string { return TableNamePsPage } + +var PsPageCols = struct { + IDPage gormcol.Field + IDPageType gormcol.Field + IDObject gormcol.Field +}{ + IDPage: gormcol.Field{}.Set((&PsPage{}).TableName(), "id_page"), + IDPageType: gormcol.Field{}.Set((&PsPage{}).TableName(), "id_page_type"), + IDObject: gormcol.Field{}.Set((&PsPage{}).TableName(), "id_object"), +} diff --git a/app/model/prestadb/ps_page_type.go b/app/model/dbmodel/ps_page_type.go similarity index 55% rename from app/model/prestadb/ps_page_type.go rename to app/model/dbmodel/ps_page_type.go index ac1e033..5f4ffcc 100644 --- a/app/model/prestadb/ps_page_type.go +++ b/app/model/dbmodel/ps_page_type.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsPageType = "ps_page_type" @@ -16,3 +16,11 @@ type PsPageType struct { func (*PsPageType) TableName() string { return TableNamePsPageType } + +var PsPageTypeCols = struct { + IDPageType gormcol.Field + Name gormcol.Field +}{ + IDPageType: gormcol.Field{}.Set((&PsPageType{}).TableName(), "id_page_type"), + Name: gormcol.Field{}.Set((&PsPageType{}).TableName(), "name"), +} diff --git a/app/model/dbmodel/ps_page_viewed.go b/app/model/dbmodel/ps_page_viewed.go new file mode 100644 index 0000000..96d0c3b --- /dev/null +++ b/app/model/dbmodel/ps_page_viewed.go @@ -0,0 +1,35 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsPageViewed = "ps_page_viewed" + +// PsPageViewed mapped from table +type PsPageViewed struct { + IDPage int32 `gorm:"column:id_page;primaryKey" json:"id_page"` + IDShopGroup int32 `gorm:"column:id_shop_group;not null;default:1" json:"id_shop_group"` + IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` + IDDateRange int32 `gorm:"column:id_date_range;primaryKey" json:"id_date_range"` + Counter int32 `gorm:"column:counter;not null" json:"counter"` +} + +// TableName PsPageViewed's table name +func (*PsPageViewed) TableName() string { + return TableNamePsPageViewed +} + +var PsPageViewedCols = struct { + IDPage gormcol.Field + IDShopGroup gormcol.Field + IDShop gormcol.Field + IDDateRange gormcol.Field + Counter gormcol.Field +}{ + IDPage: gormcol.Field{}.Set((&PsPageViewed{}).TableName(), "id_page"), + IDShopGroup: gormcol.Field{}.Set((&PsPageViewed{}).TableName(), "id_shop_group"), + IDShop: gormcol.Field{}.Set((&PsPageViewed{}).TableName(), "id_shop"), + IDDateRange: gormcol.Field{}.Set((&PsPageViewed{}).TableName(), "id_date_range"), + Counter: gormcol.Field{}.Set((&PsPageViewed{}).TableName(), "counter"), +} diff --git a/app/model/prestadb/ps_pagenotfound.go b/app/model/dbmodel/ps_pagenotfound.go similarity index 51% rename from app/model/prestadb/ps_pagenotfound.go rename to app/model/dbmodel/ps_pagenotfound.go index ce47ff3..e3a7977 100644 --- a/app/model/prestadb/ps_pagenotfound.go +++ b/app/model/dbmodel/ps_pagenotfound.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsPagenotfound struct { func (*PsPagenotfound) TableName() string { return TableNamePsPagenotfound } + +var PsPagenotfoundCols = struct { + IDPagenotfound gormcol.Field + IDShop gormcol.Field + IDShopGroup gormcol.Field + RequestURI gormcol.Field + HTTPReferer gormcol.Field + DateAdd gormcol.Field +}{ + IDPagenotfound: gormcol.Field{}.Set((&PsPagenotfound{}).TableName(), "id_pagenotfound"), + IDShop: gormcol.Field{}.Set((&PsPagenotfound{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsPagenotfound{}).TableName(), "id_shop_group"), + RequestURI: gormcol.Field{}.Set((&PsPagenotfound{}).TableName(), "request_uri"), + HTTPReferer: gormcol.Field{}.Set((&PsPagenotfound{}).TableName(), "http_referer"), + DateAdd: gormcol.Field{}.Set((&PsPagenotfound{}).TableName(), "date_add"), +} diff --git a/app/model/dbmodel/ps_pocztapolskaen_order.go b/app/model/dbmodel/ps_pocztapolskaen_order.go new file mode 100644 index 0000000..141ac0e --- /dev/null +++ b/app/model/dbmodel/ps_pocztapolskaen_order.go @@ -0,0 +1,68 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsPocztapolskaenOrder = "ps_pocztapolskaen_order" + +// PsPocztapolskaenOrder mapped from table +type PsPocztapolskaenOrder struct { + IDPpOrder int32 `gorm:"column:id_pp_order;primaryKey;autoIncrement:true" json:"id_pp_order"` + IDOrder *int32 `gorm:"column:id_order" json:"id_order"` + IDCart *int32 `gorm:"column:id_cart" json:"id_cart"` + IDShipment *string `gorm:"column:id_shipment" json:"id_shipment"` + ShipmentNumber *string `gorm:"column:shipment_number" json:"shipment_number"` + ShipmentType *string `gorm:"column:shipment_type" json:"shipment_type"` + Point *string `gorm:"column:point" json:"point"` + Pni *int32 `gorm:"column:pni" json:"pni"` + Cod bool `gorm:"column:cod;not null" json:"cod"` + IDBuffor *int32 `gorm:"column:id_buffor" json:"id_buffor"` + PostDate *time.Time `gorm:"column:post_date" json:"post_date"` + SendDate *time.Time `gorm:"column:send_date" json:"send_date"` + DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` + IDCarrier *int32 `gorm:"column:id_carrier" json:"id_carrier"` +} + +// TableName PsPocztapolskaenOrder's table name +func (*PsPocztapolskaenOrder) TableName() string { + return TableNamePsPocztapolskaenOrder +} + +var PsPocztapolskaenOrderCols = struct { + IDPpOrder gormcol.Field + IDOrder gormcol.Field + IDCart gormcol.Field + IDShipment gormcol.Field + ShipmentNumber gormcol.Field + ShipmentType gormcol.Field + Point gormcol.Field + Pni gormcol.Field + Cod gormcol.Field + IDBuffor gormcol.Field + PostDate gormcol.Field + SendDate gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + IDCarrier gormcol.Field +}{ + IDPpOrder: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "id_pp_order"), + IDOrder: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "id_order"), + IDCart: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "id_cart"), + IDShipment: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "id_shipment"), + ShipmentNumber: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "shipment_number"), + ShipmentType: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "shipment_type"), + Point: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "point"), + Pni: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "pni"), + Cod: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "cod"), + IDBuffor: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "id_buffor"), + PostDate: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "post_date"), + SendDate: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "send_date"), + DateAdd: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "date_upd"), + IDCarrier: gormcol.Field{}.Set((&PsPocztapolskaenOrder{}).TableName(), "id_carrier"), +} diff --git a/app/model/dbmodel/ps_pocztapolskaen_order_set.go b/app/model/dbmodel/ps_pocztapolskaen_order_set.go new file mode 100644 index 0000000..5498151 --- /dev/null +++ b/app/model/dbmodel/ps_pocztapolskaen_order_set.go @@ -0,0 +1,53 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsPocztapolskaenOrderSet = "ps_pocztapolskaen_order_set" + +// PsPocztapolskaenOrderSet mapped from table +type PsPocztapolskaenOrderSet struct { + IDOrderSet int32 `gorm:"column:id_order_set;primaryKey;autoIncrement:true" json:"id_order_set"` + Name *string `gorm:"column:name" json:"name"` + Active *bool `gorm:"column:active" json:"active"` + IDPostOffice *int32 `gorm:"column:id_post_office" json:"id_post_office"` + PostDate *time.Time `gorm:"column:post_date" json:"post_date"` + IDEn int32 `gorm:"column:id_en;not null" json:"id_en"` + IDEnvelope *int32 `gorm:"column:id_envelope" json:"id_envelope"` + EnvelopeStatus *string `gorm:"column:envelope_status" json:"envelope_status"` + DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` +} + +// TableName PsPocztapolskaenOrderSet's table name +func (*PsPocztapolskaenOrderSet) TableName() string { + return TableNamePsPocztapolskaenOrderSet +} + +var PsPocztapolskaenOrderSetCols = struct { + IDOrderSet gormcol.Field + Name gormcol.Field + Active gormcol.Field + IDPostOffice gormcol.Field + PostDate gormcol.Field + IDEn gormcol.Field + IDEnvelope gormcol.Field + EnvelopeStatus gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDOrderSet: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "id_order_set"), + Name: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "name"), + Active: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "active"), + IDPostOffice: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "id_post_office"), + PostDate: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "post_date"), + IDEn: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "id_en"), + IDEnvelope: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "id_envelope"), + EnvelopeStatus: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "envelope_status"), + DateAdd: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsPocztapolskaenOrderSet{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_pocztapolskaen_post_office.go b/app/model/dbmodel/ps_pocztapolskaen_post_office.go new file mode 100644 index 0000000..db4103c --- /dev/null +++ b/app/model/dbmodel/ps_pocztapolskaen_post_office.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsPocztapolskaenPostOffice = "ps_pocztapolskaen_post_office" + +// PsPocztapolskaenPostOffice mapped from table +type PsPocztapolskaenPostOffice struct { + IDPostOffice int32 `gorm:"column:id_post_office;primaryKey;autoIncrement:true" json:"id_post_office"` + IDEn *int32 `gorm:"column:id_en" json:"id_en"` + Name *string `gorm:"column:name" json:"name"` + Description *string `gorm:"column:description" json:"description"` + DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` +} + +// TableName PsPocztapolskaenPostOffice's table name +func (*PsPocztapolskaenPostOffice) TableName() string { + return TableNamePsPocztapolskaenPostOffice +} + +var PsPocztapolskaenPostOfficeCols = struct { + IDPostOffice gormcol.Field + IDEn gormcol.Field + Name gormcol.Field + Description gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDPostOffice: gormcol.Field{}.Set((&PsPocztapolskaenPostOffice{}).TableName(), "id_post_office"), + IDEn: gormcol.Field{}.Set((&PsPocztapolskaenPostOffice{}).TableName(), "id_en"), + Name: gormcol.Field{}.Set((&PsPocztapolskaenPostOffice{}).TableName(), "name"), + Description: gormcol.Field{}.Set((&PsPocztapolskaenPostOffice{}).TableName(), "description"), + DateAdd: gormcol.Field{}.Set((&PsPocztapolskaenPostOffice{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsPocztapolskaenPostOffice{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_pocztapolskaen_profile_address.go b/app/model/dbmodel/ps_pocztapolskaen_profile_address.go new file mode 100644 index 0000000..f6ebb04 --- /dev/null +++ b/app/model/dbmodel/ps_pocztapolskaen_profile_address.go @@ -0,0 +1,56 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsPocztapolskaenProfileAddress = "ps_pocztapolskaen_profile_address" + +// PsPocztapolskaenProfileAddress mapped from table +type PsPocztapolskaenProfileAddress struct { + IDProfileAddress int32 `gorm:"column:id_profile_address;primaryKey;autoIncrement:true" json:"id_profile_address"` + IDEn *int32 `gorm:"column:id_en" json:"id_en"` + Name *string `gorm:"column:name" json:"name"` + FriendlyName *string `gorm:"column:friendly_name" json:"friendly_name"` + Street *string `gorm:"column:street" json:"street"` + HouseNumber *string `gorm:"column:house_number" json:"house_number"` + PremisesNumber *string `gorm:"column:premises_number" json:"premises_number"` + City *string `gorm:"column:city" json:"city"` + PostalCode *string `gorm:"column:postal_code" json:"postal_code"` + DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` +} + +// TableName PsPocztapolskaenProfileAddress's table name +func (*PsPocztapolskaenProfileAddress) TableName() string { + return TableNamePsPocztapolskaenProfileAddress +} + +var PsPocztapolskaenProfileAddressCols = struct { + IDProfileAddress gormcol.Field + IDEn gormcol.Field + Name gormcol.Field + FriendlyName gormcol.Field + Street gormcol.Field + HouseNumber gormcol.Field + PremisesNumber gormcol.Field + City gormcol.Field + PostalCode gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDProfileAddress: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "id_profile_address"), + IDEn: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "id_en"), + Name: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "name"), + FriendlyName: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "friendly_name"), + Street: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "street"), + HouseNumber: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "house_number"), + PremisesNumber: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "premises_number"), + City: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "city"), + PostalCode: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "postal_code"), + DateAdd: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsPocztapolskaenProfileAddress{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_product.go b/app/model/dbmodel/ps_product.go new file mode 100644 index 0000000..be2c144 --- /dev/null +++ b/app/model/dbmodel/ps_product.go @@ -0,0 +1,188 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsProduct = "ps_product" + +// PsProduct mapped from table +type PsProduct struct { + IDProduct int32 `gorm:"column:id_product;primaryKey;autoIncrement:true;index:product_manufacturer,priority:2" json:"id_product"` + IDSupplier *int32 `gorm:"column:id_supplier;index:product_supplier,priority:1" json:"id_supplier"` + IDManufacturer *int32 `gorm:"column:id_manufacturer;index:idx_product_manufacturer,priority:1;index:product_manufacturer,priority:1" json:"id_manufacturer"` + IDCategoryDefault *int32 `gorm:"column:id_category_default;index:id_category_default,priority:1" json:"id_category_default"` + IDShopDefault int32 `gorm:"column:id_shop_default;not null;default:1" json:"id_shop_default"` + IDTaxRulesGroup int32 `gorm:"column:id_tax_rules_group;not null" json:"id_tax_rules_group"` + OnSale bool `gorm:"column:on_sale;not null" json:"on_sale"` + OnlineOnly bool `gorm:"column:online_only;not null" json:"online_only"` + Ean13 *string `gorm:"column:ean13" json:"ean13"` + Isbn *string `gorm:"column:isbn" json:"isbn"` + Upc *string `gorm:"column:upc" json:"upc"` + Ecotax float64 `gorm:"column:ecotax;not null;default:0.000000" json:"ecotax"` + Quantity int32 `gorm:"column:quantity;not null" json:"quantity"` + MinimalQuantity int32 `gorm:"column:minimal_quantity;not null;default:1" json:"minimal_quantity"` + LowStockThreshold *int32 `gorm:"column:low_stock_threshold" json:"low_stock_threshold"` + LowStockAlert bool `gorm:"column:low_stock_alert;not null" json:"low_stock_alert"` + Price float64 `gorm:"column:price;not null;default:0.000000" json:"price"` + WholesalePrice float64 `gorm:"column:wholesale_price;not null;default:0.000000" json:"wholesale_price"` + Unity *string `gorm:"column:unity" json:"unity"` + UnitPriceRatio float64 `gorm:"column:unit_price_ratio;not null;default:0.000000" json:"unit_price_ratio"` + IDUnit int32 `gorm:"column:id_unit;not null" json:"id_unit"` + AdditionalShippingCost float64 `gorm:"column:additional_shipping_cost;not null;default:0.00" json:"additional_shipping_cost"` + Reference *string `gorm:"column:reference" json:"reference"` + SupplierReference *string `gorm:"column:supplier_reference" json:"supplier_reference"` + Location *string `gorm:"column:location" json:"location"` + Width float64 `gorm:"column:width;not null;default:0.000000" json:"width"` + Height float64 `gorm:"column:height;not null;default:0.000000" json:"height"` + Depth float64 `gorm:"column:depth;not null;default:0.000000" json:"depth"` + Weight float64 `gorm:"column:weight;not null;default:0.000000" json:"weight"` + OutOfStock int32 `gorm:"column:out_of_stock;not null;default:2" json:"out_of_stock"` + AdditionalDeliveryTimes int32 `gorm:"column:additional_delivery_times;not null;default:1" json:"additional_delivery_times"` + QuantityDiscount *bool `gorm:"column:quantity_discount" json:"quantity_discount"` + Customizable int32 `gorm:"column:customizable;not null" json:"customizable"` + UploadableFiles int32 `gorm:"column:uploadable_files;not null" json:"uploadable_files"` + TextFields int32 `gorm:"column:text_fields;not null" json:"text_fields"` + Active bool `gorm:"column:active;not null" json:"active"` + RedirectType string `gorm:"column:redirect_type;not null" json:"redirect_type"` + IDTypeRedirected int32 `gorm:"column:id_type_redirected;not null" json:"id_type_redirected"` + AvailableForOrder bool `gorm:"column:available_for_order;not null;default:1" json:"available_for_order"` + AvailableDate *time.Time `gorm:"column:available_date" json:"available_date"` + ShowCondition bool `gorm:"column:show_condition;not null" json:"show_condition"` + Condition string `gorm:"column:condition;not null;default:new" json:"condition"` + ShowPrice bool `gorm:"column:show_price;not null;default:1" json:"show_price"` + Indexed bool `gorm:"column:indexed;not null;index:indexed,priority:1" json:"indexed"` + Visibility string `gorm:"column:visibility;not null;index:idx_product_visibility,priority:1;index:idx_ps_product_visibility,priority:1;index:idx_visibility,priority:1;default:both" json:"visibility"` + CacheIsPack bool `gorm:"column:cache_is_pack;not null" json:"cache_is_pack"` + CacheHasAttachments bool `gorm:"column:cache_has_attachments;not null" json:"cache_has_attachments"` + IsVirtual bool `gorm:"column:is_virtual;not null" json:"is_virtual"` + CacheDefaultAttribute *int32 `gorm:"column:cache_default_attribute" json:"cache_default_attribute"` + DateAdd time.Time `gorm:"column:date_add;not null;index:date_add,priority:1" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null;index:state,priority:2" json:"date_upd"` + AdvancedStockManagement bool `gorm:"column:advanced_stock_management;not null" json:"advanced_stock_management"` + PackStockType int32 `gorm:"column:pack_stock_type;not null;default:3" json:"pack_stock_type"` + State int32 `gorm:"column:state;not null;index:state,priority:1;default:1" json:"state"` + DeliveryDays *int32 `gorm:"column:delivery_days" json:"delivery_days"` +} + +// TableName PsProduct's table name +func (*PsProduct) TableName() string { + return TableNamePsProduct +} + +var PsProductCols = struct { + IDProduct gormcol.Field + IDSupplier gormcol.Field + IDManufacturer gormcol.Field + IDCategoryDefault gormcol.Field + IDShopDefault gormcol.Field + IDTaxRulesGroup gormcol.Field + OnSale gormcol.Field + OnlineOnly gormcol.Field + Ean13 gormcol.Field + Isbn gormcol.Field + Upc gormcol.Field + Ecotax gormcol.Field + Quantity gormcol.Field + MinimalQuantity gormcol.Field + LowStockThreshold gormcol.Field + LowStockAlert gormcol.Field + Price gormcol.Field + WholesalePrice gormcol.Field + Unity gormcol.Field + UnitPriceRatio gormcol.Field + IDUnit gormcol.Field + AdditionalShippingCost gormcol.Field + Reference gormcol.Field + SupplierReference gormcol.Field + Location gormcol.Field + Width gormcol.Field + Height gormcol.Field + Depth gormcol.Field + Weight gormcol.Field + OutOfStock gormcol.Field + AdditionalDeliveryTimes gormcol.Field + QuantityDiscount gormcol.Field + Customizable gormcol.Field + UploadableFiles gormcol.Field + TextFields gormcol.Field + Active gormcol.Field + RedirectType gormcol.Field + IDTypeRedirected gormcol.Field + AvailableForOrder gormcol.Field + AvailableDate gormcol.Field + ShowCondition gormcol.Field + Condition gormcol.Field + ShowPrice gormcol.Field + Indexed gormcol.Field + Visibility gormcol.Field + CacheIsPack gormcol.Field + CacheHasAttachments gormcol.Field + IsVirtual gormcol.Field + CacheDefaultAttribute gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + AdvancedStockManagement gormcol.Field + PackStockType gormcol.Field + State gormcol.Field + DeliveryDays gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_product"), + IDSupplier: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_supplier"), + IDManufacturer: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_manufacturer"), + IDCategoryDefault: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_category_default"), + IDShopDefault: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_shop_default"), + IDTaxRulesGroup: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_tax_rules_group"), + OnSale: gormcol.Field{}.Set((&PsProduct{}).TableName(), "on_sale"), + OnlineOnly: gormcol.Field{}.Set((&PsProduct{}).TableName(), "online_only"), + Ean13: gormcol.Field{}.Set((&PsProduct{}).TableName(), "ean13"), + Isbn: gormcol.Field{}.Set((&PsProduct{}).TableName(), "isbn"), + Upc: gormcol.Field{}.Set((&PsProduct{}).TableName(), "upc"), + Ecotax: gormcol.Field{}.Set((&PsProduct{}).TableName(), "ecotax"), + Quantity: gormcol.Field{}.Set((&PsProduct{}).TableName(), "quantity"), + MinimalQuantity: gormcol.Field{}.Set((&PsProduct{}).TableName(), "minimal_quantity"), + LowStockThreshold: gormcol.Field{}.Set((&PsProduct{}).TableName(), "low_stock_threshold"), + LowStockAlert: gormcol.Field{}.Set((&PsProduct{}).TableName(), "low_stock_alert"), + Price: gormcol.Field{}.Set((&PsProduct{}).TableName(), "price"), + WholesalePrice: gormcol.Field{}.Set((&PsProduct{}).TableName(), "wholesale_price"), + Unity: gormcol.Field{}.Set((&PsProduct{}).TableName(), "unity"), + UnitPriceRatio: gormcol.Field{}.Set((&PsProduct{}).TableName(), "unit_price_ratio"), + IDUnit: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_unit"), + AdditionalShippingCost: gormcol.Field{}.Set((&PsProduct{}).TableName(), "additional_shipping_cost"), + Reference: gormcol.Field{}.Set((&PsProduct{}).TableName(), "reference"), + SupplierReference: gormcol.Field{}.Set((&PsProduct{}).TableName(), "supplier_reference"), + Location: gormcol.Field{}.Set((&PsProduct{}).TableName(), "location"), + Width: gormcol.Field{}.Set((&PsProduct{}).TableName(), "width"), + Height: gormcol.Field{}.Set((&PsProduct{}).TableName(), "height"), + Depth: gormcol.Field{}.Set((&PsProduct{}).TableName(), "depth"), + Weight: gormcol.Field{}.Set((&PsProduct{}).TableName(), "weight"), + OutOfStock: gormcol.Field{}.Set((&PsProduct{}).TableName(), "out_of_stock"), + AdditionalDeliveryTimes: gormcol.Field{}.Set((&PsProduct{}).TableName(), "additional_delivery_times"), + QuantityDiscount: gormcol.Field{}.Set((&PsProduct{}).TableName(), "quantity_discount"), + Customizable: gormcol.Field{}.Set((&PsProduct{}).TableName(), "customizable"), + UploadableFiles: gormcol.Field{}.Set((&PsProduct{}).TableName(), "uploadable_files"), + TextFields: gormcol.Field{}.Set((&PsProduct{}).TableName(), "text_fields"), + Active: gormcol.Field{}.Set((&PsProduct{}).TableName(), "active"), + RedirectType: gormcol.Field{}.Set((&PsProduct{}).TableName(), "redirect_type"), + IDTypeRedirected: gormcol.Field{}.Set((&PsProduct{}).TableName(), "id_type_redirected"), + AvailableForOrder: gormcol.Field{}.Set((&PsProduct{}).TableName(), "available_for_order"), + AvailableDate: gormcol.Field{}.Set((&PsProduct{}).TableName(), "available_date"), + ShowCondition: gormcol.Field{}.Set((&PsProduct{}).TableName(), "show_condition"), + Condition: gormcol.Field{}.Set((&PsProduct{}).TableName(), "condition"), + ShowPrice: gormcol.Field{}.Set((&PsProduct{}).TableName(), "show_price"), + Indexed: gormcol.Field{}.Set((&PsProduct{}).TableName(), "indexed"), + Visibility: gormcol.Field{}.Set((&PsProduct{}).TableName(), "visibility"), + CacheIsPack: gormcol.Field{}.Set((&PsProduct{}).TableName(), "cache_is_pack"), + CacheHasAttachments: gormcol.Field{}.Set((&PsProduct{}).TableName(), "cache_has_attachments"), + IsVirtual: gormcol.Field{}.Set((&PsProduct{}).TableName(), "is_virtual"), + CacheDefaultAttribute: gormcol.Field{}.Set((&PsProduct{}).TableName(), "cache_default_attribute"), + DateAdd: gormcol.Field{}.Set((&PsProduct{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsProduct{}).TableName(), "date_upd"), + AdvancedStockManagement: gormcol.Field{}.Set((&PsProduct{}).TableName(), "advanced_stock_management"), + PackStockType: gormcol.Field{}.Set((&PsProduct{}).TableName(), "pack_stock_type"), + State: gormcol.Field{}.Set((&PsProduct{}).TableName(), "state"), + DeliveryDays: gormcol.Field{}.Set((&PsProduct{}).TableName(), "delivery_days"), +} diff --git a/app/model/prestadb/ps_product_attachment.go b/app/model/dbmodel/ps_product_attachment.go similarity index 54% rename from app/model/prestadb/ps_product_attachment.go rename to app/model/dbmodel/ps_product_attachment.go index 0c8af05..62f5634 100644 --- a/app/model/prestadb/ps_product_attachment.go +++ b/app/model/dbmodel/ps_product_attachment.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductAttachment = "ps_product_attachment" @@ -16,3 +16,11 @@ type PsProductAttachment struct { func (*PsProductAttachment) TableName() string { return TableNamePsProductAttachment } + +var PsProductAttachmentCols = struct { + IDProduct gormcol.Field + IDAttachment gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductAttachment{}).TableName(), "id_product"), + IDAttachment: gormcol.Field{}.Set((&PsProductAttachment{}).TableName(), "id_attachment"), +} diff --git a/app/model/prestadb/ps_product_attribute.go b/app/model/dbmodel/ps_product_attribute.go similarity index 51% rename from app/model/prestadb/ps_product_attribute.go rename to app/model/dbmodel/ps_product_attribute.go index 028d24a..c3a99e2 100644 --- a/app/model/prestadb/ps_product_attribute.go +++ b/app/model/dbmodel/ps_product_attribute.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -37,3 +36,45 @@ type PsProductAttribute struct { func (*PsProductAttribute) TableName() string { return TableNamePsProductAttribute } + +var PsProductAttributeCols = struct { + IDProductAttribute gormcol.Field + IDProduct gormcol.Field + Reference gormcol.Field + SupplierReference gormcol.Field + Location gormcol.Field + Ean13 gormcol.Field + Isbn gormcol.Field + Upc gormcol.Field + WholesalePrice gormcol.Field + Price gormcol.Field + Ecotax gormcol.Field + Quantity gormcol.Field + Weight gormcol.Field + UnitPriceImpact gormcol.Field + DefaultOn gormcol.Field + MinimalQuantity gormcol.Field + LowStockThreshold gormcol.Field + LowStockAlert gormcol.Field + AvailableDate gormcol.Field +}{ + IDProductAttribute: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "id_product_attribute"), + IDProduct: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "id_product"), + Reference: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "reference"), + SupplierReference: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "supplier_reference"), + Location: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "location"), + Ean13: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "ean13"), + Isbn: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "isbn"), + Upc: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "upc"), + WholesalePrice: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "wholesale_price"), + Price: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "price"), + Ecotax: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "ecotax"), + Quantity: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "quantity"), + Weight: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "weight"), + UnitPriceImpact: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "unit_price_impact"), + DefaultOn: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "default_on"), + MinimalQuantity: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "minimal_quantity"), + LowStockThreshold: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "low_stock_threshold"), + LowStockAlert: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "low_stock_alert"), + AvailableDate: gormcol.Field{}.Set((&PsProductAttribute{}).TableName(), "available_date"), +} diff --git a/app/model/prestadb/ps_product_attribute_combination.go b/app/model/dbmodel/ps_product_attribute_combination.go similarity index 63% rename from app/model/prestadb/ps_product_attribute_combination.go rename to app/model/dbmodel/ps_product_attribute_combination.go index f0e097b..06925ed 100644 --- a/app/model/prestadb/ps_product_attribute_combination.go +++ b/app/model/dbmodel/ps_product_attribute_combination.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductAttributeCombination = "ps_product_attribute_combination" @@ -16,3 +16,11 @@ type PsProductAttributeCombination struct { func (*PsProductAttributeCombination) TableName() string { return TableNamePsProductAttributeCombination } + +var PsProductAttributeCombinationCols = struct { + IDAttribute gormcol.Field + IDProductAttribute gormcol.Field +}{ + IDAttribute: gormcol.Field{}.Set((&PsProductAttributeCombination{}).TableName(), "id_attribute"), + IDProductAttribute: gormcol.Field{}.Set((&PsProductAttributeCombination{}).TableName(), "id_product_attribute"), +} diff --git a/app/model/prestadb/ps_product_attribute_image.go b/app/model/dbmodel/ps_product_attribute_image.go similarity index 57% rename from app/model/prestadb/ps_product_attribute_image.go rename to app/model/dbmodel/ps_product_attribute_image.go index 49d12b1..613d8ca 100644 --- a/app/model/prestadb/ps_product_attribute_image.go +++ b/app/model/dbmodel/ps_product_attribute_image.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductAttributeImage = "ps_product_attribute_image" @@ -16,3 +16,11 @@ type PsProductAttributeImage struct { func (*PsProductAttributeImage) TableName() string { return TableNamePsProductAttributeImage } + +var PsProductAttributeImageCols = struct { + IDProductAttribute gormcol.Field + IDImage gormcol.Field +}{ + IDProductAttribute: gormcol.Field{}.Set((&PsProductAttributeImage{}).TableName(), "id_product_attribute"), + IDImage: gormcol.Field{}.Set((&PsProductAttributeImage{}).TableName(), "id_image"), +} diff --git a/app/model/dbmodel/ps_product_attribute_shop.go b/app/model/dbmodel/ps_product_attribute_shop.go new file mode 100644 index 0000000..86d6d24 --- /dev/null +++ b/app/model/dbmodel/ps_product_attribute_shop.go @@ -0,0 +1,62 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsProductAttributeShop = "ps_product_attribute_shop" + +// PsProductAttributeShop mapped from table +type PsProductAttributeShop struct { + IDProduct int32 `gorm:"column:id_product;not null;uniqueIndex:id_product,priority:1" json:"id_product"` + IDProductAttribute int32 `gorm:"column:id_product_attribute;primaryKey" json:"id_product_attribute"` + IDShop int32 `gorm:"column:id_shop;primaryKey;uniqueIndex:id_product,priority:2" json:"id_shop"` + WholesalePrice float64 `gorm:"column:wholesale_price;not null;default:0.000000" json:"wholesale_price"` + Price float64 `gorm:"column:price;not null;default:0.000000" json:"price"` + Ecotax float64 `gorm:"column:ecotax;not null;default:0.000000" json:"ecotax"` + Weight float64 `gorm:"column:weight;not null;default:0.000000" json:"weight"` + UnitPriceImpact float64 `gorm:"column:unit_price_impact;not null;default:0.000000" json:"unit_price_impact"` + DefaultOn *bool `gorm:"column:default_on;uniqueIndex:id_product,priority:3" json:"default_on"` + MinimalQuantity int32 `gorm:"column:minimal_quantity;not null;default:1" json:"minimal_quantity"` + LowStockThreshold *int32 `gorm:"column:low_stock_threshold" json:"low_stock_threshold"` + LowStockAlert bool `gorm:"column:low_stock_alert;not null" json:"low_stock_alert"` + AvailableDate *time.Time `gorm:"column:available_date" json:"available_date"` +} + +// TableName PsProductAttributeShop's table name +func (*PsProductAttributeShop) TableName() string { + return TableNamePsProductAttributeShop +} + +var PsProductAttributeShopCols = struct { + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + IDShop gormcol.Field + WholesalePrice gormcol.Field + Price gormcol.Field + Ecotax gormcol.Field + Weight gormcol.Field + UnitPriceImpact gormcol.Field + DefaultOn gormcol.Field + MinimalQuantity gormcol.Field + LowStockThreshold gormcol.Field + LowStockAlert gormcol.Field + AvailableDate gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "id_product_attribute"), + IDShop: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "id_shop"), + WholesalePrice: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "wholesale_price"), + Price: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "price"), + Ecotax: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "ecotax"), + Weight: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "weight"), + UnitPriceImpact: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "unit_price_impact"), + DefaultOn: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "default_on"), + MinimalQuantity: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "minimal_quantity"), + LowStockThreshold: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "low_stock_threshold"), + LowStockAlert: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "low_stock_alert"), + AvailableDate: gormcol.Field{}.Set((&PsProductAttributeShop{}).TableName(), "available_date"), +} diff --git a/app/model/prestadb/ps_product_carrier.go b/app/model/dbmodel/ps_product_carrier.go similarity index 52% rename from app/model/prestadb/ps_product_carrier.go rename to app/model/dbmodel/ps_product_carrier.go index 7c1d62c..3bfdd92 100644 --- a/app/model/prestadb/ps_product_carrier.go +++ b/app/model/dbmodel/ps_product_carrier.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductCarrier = "ps_product_carrier" @@ -17,3 +17,13 @@ type PsProductCarrier struct { func (*PsProductCarrier) TableName() string { return TableNamePsProductCarrier } + +var PsProductCarrierCols = struct { + IDProduct gormcol.Field + IDCarrierReference gormcol.Field + IDShop gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductCarrier{}).TableName(), "id_product"), + IDCarrierReference: gormcol.Field{}.Set((&PsProductCarrier{}).TableName(), "id_carrier_reference"), + IDShop: gormcol.Field{}.Set((&PsProductCarrier{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_product_country_tax.go b/app/model/dbmodel/ps_product_country_tax.go similarity index 52% rename from app/model/prestadb/ps_product_country_tax.go rename to app/model/dbmodel/ps_product_country_tax.go index c02b989..e7b3821 100644 --- a/app/model/prestadb/ps_product_country_tax.go +++ b/app/model/dbmodel/ps_product_country_tax.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductCountryTax = "ps_product_country_tax" @@ -17,3 +17,13 @@ type PsProductCountryTax struct { func (*PsProductCountryTax) TableName() string { return TableNamePsProductCountryTax } + +var PsProductCountryTaxCols = struct { + IDProduct gormcol.Field + IDCountry gormcol.Field + IDTax gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductCountryTax{}).TableName(), "id_product"), + IDCountry: gormcol.Field{}.Set((&PsProductCountryTax{}).TableName(), "id_country"), + IDTax: gormcol.Field{}.Set((&PsProductCountryTax{}).TableName(), "id_tax"), +} diff --git a/app/model/dbmodel/ps_product_download.go b/app/model/dbmodel/ps_product_download.go new file mode 100644 index 0000000..c2e7692 --- /dev/null +++ b/app/model/dbmodel/ps_product_download.go @@ -0,0 +1,53 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsProductDownload = "ps_product_download" + +// PsProductDownload mapped from table +type PsProductDownload struct { + IDProductDownload int32 `gorm:"column:id_product_download;primaryKey;autoIncrement:true" json:"id_product_download"` + IDProduct int32 `gorm:"column:id_product;not null" json:"id_product"` + DisplayFilename *string `gorm:"column:display_filename" json:"display_filename"` + Filename *string `gorm:"column:filename" json:"filename"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateExpiration *time.Time `gorm:"column:date_expiration" json:"date_expiration"` + NbDaysAccessible *int32 `gorm:"column:nb_days_accessible" json:"nb_days_accessible"` + NbDownloadable *int32 `gorm:"column:nb_downloadable;default:1" json:"nb_downloadable"` + Active bool `gorm:"column:active;not null;default:1" json:"active"` + IsShareable bool `gorm:"column:is_shareable;not null" json:"is_shareable"` +} + +// TableName PsProductDownload's table name +func (*PsProductDownload) TableName() string { + return TableNamePsProductDownload +} + +var PsProductDownloadCols = struct { + IDProductDownload gormcol.Field + IDProduct gormcol.Field + DisplayFilename gormcol.Field + Filename gormcol.Field + DateAdd gormcol.Field + DateExpiration gormcol.Field + NbDaysAccessible gormcol.Field + NbDownloadable gormcol.Field + Active gormcol.Field + IsShareable gormcol.Field +}{ + IDProductDownload: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "id_product_download"), + IDProduct: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "id_product"), + DisplayFilename: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "display_filename"), + Filename: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "filename"), + DateAdd: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "date_add"), + DateExpiration: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "date_expiration"), + NbDaysAccessible: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "nb_days_accessible"), + NbDownloadable: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "nb_downloadable"), + Active: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "active"), + IsShareable: gormcol.Field{}.Set((&PsProductDownload{}).TableName(), "is_shareable"), +} diff --git a/app/model/prestadb/ps_product_group_reduction_cache.go b/app/model/dbmodel/ps_product_group_reduction_cache.go similarity index 54% rename from app/model/prestadb/ps_product_group_reduction_cache.go rename to app/model/dbmodel/ps_product_group_reduction_cache.go index 4cc8430..8f323d3 100644 --- a/app/model/prestadb/ps_product_group_reduction_cache.go +++ b/app/model/dbmodel/ps_product_group_reduction_cache.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductGroupReductionCache = "ps_product_group_reduction_cache" @@ -17,3 +17,13 @@ type PsProductGroupReductionCache struct { func (*PsProductGroupReductionCache) TableName() string { return TableNamePsProductGroupReductionCache } + +var PsProductGroupReductionCacheCols = struct { + IDProduct gormcol.Field + IDGroup gormcol.Field + Reduction gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductGroupReductionCache{}).TableName(), "id_product"), + IDGroup: gormcol.Field{}.Set((&PsProductGroupReductionCache{}).TableName(), "id_group"), + Reduction: gormcol.Field{}.Set((&PsProductGroupReductionCache{}).TableName(), "reduction"), +} diff --git a/app/model/dbmodel/ps_product_lang.go b/app/model/dbmodel/ps_product_lang.go new file mode 100644 index 0000000..55537eb --- /dev/null +++ b/app/model/dbmodel/ps_product_lang.go @@ -0,0 +1,65 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsProductLang = "ps_product_lang" + +// PsProductLang mapped from table +type PsProductLang struct { + IDProduct int32 `gorm:"column:id_product;primaryKey;index:idx_ps_product_lang,priority:1" json:"id_product"` + IDShop int32 `gorm:"column:id_shop;primaryKey;index:idx_ps_product_lang,priority:2;default:1" json:"id_shop"` + IDLang int32 `gorm:"column:id_lang;primaryKey;index:idx_ps_product_lang,priority:3;index:id_lang,priority:1" json:"id_lang"` + Description *string `gorm:"column:description" json:"description"` + DescriptionShort *string `gorm:"column:description_short" json:"description_short"` + LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` + MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` + MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` + Name string `gorm:"column:name;not null;index:name,priority:1" json:"name"` + AvailableNow *string `gorm:"column:available_now" json:"available_now"` + AvailableLater *string `gorm:"column:available_later" json:"available_later"` + DeliveryInStock *string `gorm:"column:delivery_in_stock" json:"delivery_in_stock"` + DeliveryOutStock *string `gorm:"column:delivery_out_stock" json:"delivery_out_stock"` + Usage *string `gorm:"column:usage" json:"usage"` +} + +// TableName PsProductLang's table name +func (*PsProductLang) TableName() string { + return TableNamePsProductLang +} + +var PsProductLangCols = struct { + IDProduct gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + Description gormcol.Field + DescriptionShort gormcol.Field + LinkRewrite gormcol.Field + MetaDescription gormcol.Field + MetaKeywords gormcol.Field + MetaTitle gormcol.Field + Name gormcol.Field + AvailableNow gormcol.Field + AvailableLater gormcol.Field + DeliveryInStock gormcol.Field + DeliveryOutStock gormcol.Field + Usage gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "id_product"), + IDShop: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "id_lang"), + Description: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "description"), + DescriptionShort: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "description_short"), + LinkRewrite: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "link_rewrite"), + MetaDescription: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "meta_description"), + MetaKeywords: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "meta_keywords"), + MetaTitle: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "meta_title"), + Name: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "name"), + AvailableNow: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "available_now"), + AvailableLater: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "available_later"), + DeliveryInStock: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "delivery_in_stock"), + DeliveryOutStock: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "delivery_out_stock"), + Usage: gormcol.Field{}.Set((&PsProductLang{}).TableName(), "usage"), +} diff --git a/app/model/prestadb/ps_product_sale.go b/app/model/dbmodel/ps_product_sale.go similarity index 52% rename from app/model/prestadb/ps_product_sale.go rename to app/model/dbmodel/ps_product_sale.go index 8a89098..882fa63 100644 --- a/app/model/prestadb/ps_product_sale.go +++ b/app/model/dbmodel/ps_product_sale.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -22,3 +21,15 @@ type PsProductSale struct { func (*PsProductSale) TableName() string { return TableNamePsProductSale } + +var PsProductSaleCols = struct { + IDProduct gormcol.Field + Quantity gormcol.Field + SaleNbr gormcol.Field + DateUpd gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductSale{}).TableName(), "id_product"), + Quantity: gormcol.Field{}.Set((&PsProductSale{}).TableName(), "quantity"), + SaleNbr: gormcol.Field{}.Set((&PsProductSale{}).TableName(), "sale_nbr"), + DateUpd: gormcol.Field{}.Set((&PsProductSale{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_product_shop.go b/app/model/dbmodel/ps_product_shop.go similarity index 50% rename from app/model/prestadb/ps_product_shop.go rename to app/model/dbmodel/ps_product_shop.go index 5f0961e..58c0311 100644 --- a/app/model/prestadb/ps_product_shop.go +++ b/app/model/dbmodel/ps_product_shop.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -51,3 +50,73 @@ type PsProductShop struct { func (*PsProductShop) TableName() string { return TableNamePsProductShop } + +var PsProductShopCols = struct { + IDProduct gormcol.Field + IDShop gormcol.Field + IDCategoryDefault gormcol.Field + IDTaxRulesGroup gormcol.Field + OnSale gormcol.Field + OnlineOnly gormcol.Field + Ecotax gormcol.Field + MinimalQuantity gormcol.Field + LowStockThreshold gormcol.Field + LowStockAlert gormcol.Field + Price gormcol.Field + WholesalePrice gormcol.Field + Unity gormcol.Field + UnitPriceRatio gormcol.Field + AdditionalShippingCost gormcol.Field + Customizable gormcol.Field + UploadableFiles gormcol.Field + TextFields gormcol.Field + Active gormcol.Field + RedirectType gormcol.Field + IDTypeRedirected gormcol.Field + AvailableForOrder gormcol.Field + AvailableDate gormcol.Field + ShowCondition gormcol.Field + Condition gormcol.Field + ShowPrice gormcol.Field + Indexed gormcol.Field + Visibility gormcol.Field + CacheDefaultAttribute gormcol.Field + AdvancedStockManagement gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + PackStockType gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "id_product"), + IDShop: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "id_shop"), + IDCategoryDefault: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "id_category_default"), + IDTaxRulesGroup: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "id_tax_rules_group"), + OnSale: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "on_sale"), + OnlineOnly: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "online_only"), + Ecotax: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "ecotax"), + MinimalQuantity: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "minimal_quantity"), + LowStockThreshold: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "low_stock_threshold"), + LowStockAlert: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "low_stock_alert"), + Price: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "price"), + WholesalePrice: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "wholesale_price"), + Unity: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "unity"), + UnitPriceRatio: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "unit_price_ratio"), + AdditionalShippingCost: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "additional_shipping_cost"), + Customizable: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "customizable"), + UploadableFiles: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "uploadable_files"), + TextFields: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "text_fields"), + Active: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "active"), + RedirectType: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "redirect_type"), + IDTypeRedirected: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "id_type_redirected"), + AvailableForOrder: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "available_for_order"), + AvailableDate: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "available_date"), + ShowCondition: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "show_condition"), + Condition: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "condition"), + ShowPrice: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "show_price"), + Indexed: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "indexed"), + Visibility: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "visibility"), + CacheDefaultAttribute: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "cache_default_attribute"), + AdvancedStockManagement: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "advanced_stock_management"), + DateAdd: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "date_upd"), + PackStockType: gormcol.Field{}.Set((&PsProductShop{}).TableName(), "pack_stock_type"), +} diff --git a/app/model/prestadb/ps_product_supplier.go b/app/model/dbmodel/ps_product_supplier.go similarity index 53% rename from app/model/prestadb/ps_product_supplier.go rename to app/model/dbmodel/ps_product_supplier.go index c1815dd..e65e94c 100644 --- a/app/model/prestadb/ps_product_supplier.go +++ b/app/model/dbmodel/ps_product_supplier.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductSupplier = "ps_product_supplier" @@ -21,3 +21,21 @@ type PsProductSupplier struct { func (*PsProductSupplier) TableName() string { return TableNamePsProductSupplier } + +var PsProductSupplierCols = struct { + IDProductSupplier gormcol.Field + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + IDSupplier gormcol.Field + ProductSupplierReference gormcol.Field + ProductSupplierPriceTe gormcol.Field + IDCurrency gormcol.Field +}{ + IDProductSupplier: gormcol.Field{}.Set((&PsProductSupplier{}).TableName(), "id_product_supplier"), + IDProduct: gormcol.Field{}.Set((&PsProductSupplier{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsProductSupplier{}).TableName(), "id_product_attribute"), + IDSupplier: gormcol.Field{}.Set((&PsProductSupplier{}).TableName(), "id_supplier"), + ProductSupplierReference: gormcol.Field{}.Set((&PsProductSupplier{}).TableName(), "product_supplier_reference"), + ProductSupplierPriceTe: gormcol.Field{}.Set((&PsProductSupplier{}).TableName(), "product_supplier_price_te"), + IDCurrency: gormcol.Field{}.Set((&PsProductSupplier{}).TableName(), "id_currency"), +} diff --git a/app/model/prestadb/ps_product_tag.go b/app/model/dbmodel/ps_product_tag.go similarity index 54% rename from app/model/prestadb/ps_product_tag.go rename to app/model/dbmodel/ps_product_tag.go index e33c8ab..cd4721f 100644 --- a/app/model/prestadb/ps_product_tag.go +++ b/app/model/dbmodel/ps_product_tag.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProductTag = "ps_product_tag" @@ -17,3 +17,13 @@ type PsProductTag struct { func (*PsProductTag) TableName() string { return TableNamePsProductTag } + +var PsProductTagCols = struct { + IDProduct gormcol.Field + IDTag gormcol.Field + IDLang gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsProductTag{}).TableName(), "id_product"), + IDTag: gormcol.Field{}.Set((&PsProductTag{}).TableName(), "id_tag"), + IDLang: gormcol.Field{}.Set((&PsProductTag{}).TableName(), "id_lang"), +} diff --git a/app/model/prestadb/ps_profile.go b/app/model/dbmodel/ps_profile.go similarity index 56% rename from app/model/prestadb/ps_profile.go rename to app/model/dbmodel/ps_profile.go index 5ad0c6c..3c1007a 100644 --- a/app/model/prestadb/ps_profile.go +++ b/app/model/dbmodel/ps_profile.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProfile = "ps_profile" @@ -15,3 +15,9 @@ type PsProfile struct { func (*PsProfile) TableName() string { return TableNamePsProfile } + +var PsProfileCols = struct { + IDProfile gormcol.Field +}{ + IDProfile: gormcol.Field{}.Set((&PsProfile{}).TableName(), "id_profile"), +} diff --git a/app/model/prestadb/ps_profile_lang.go b/app/model/dbmodel/ps_profile_lang.go similarity index 51% rename from app/model/prestadb/ps_profile_lang.go rename to app/model/dbmodel/ps_profile_lang.go index e34e9e5..5f6ffd5 100644 --- a/app/model/prestadb/ps_profile_lang.go +++ b/app/model/dbmodel/ps_profile_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsProfileLang = "ps_profile_lang" @@ -17,3 +17,13 @@ type PsProfileLang struct { func (*PsProfileLang) TableName() string { return TableNamePsProfileLang } + +var PsProfileLangCols = struct { + IDLang gormcol.Field + IDProfile gormcol.Field + Name gormcol.Field +}{ + IDLang: gormcol.Field{}.Set((&PsProfileLang{}).TableName(), "id_lang"), + IDProfile: gormcol.Field{}.Set((&PsProfileLang{}).TableName(), "id_profile"), + Name: gormcol.Field{}.Set((&PsProfileLang{}).TableName(), "name"), +} diff --git a/app/model/dbmodel/ps_psgdpr_consent.go b/app/model/dbmodel/ps_psgdpr_consent.go new file mode 100644 index 0000000..02d615e --- /dev/null +++ b/app/model/dbmodel/ps_psgdpr_consent.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsPsgdprConsent = "ps_psgdpr_consent" + +// PsPsgdprConsent mapped from table +type PsPsgdprConsent struct { + IDGdprConsent int32 `gorm:"column:id_gdpr_consent;primaryKey;autoIncrement:true" json:"id_gdpr_consent"` + IDModule int32 `gorm:"column:id_module;primaryKey" json:"id_module"` + Active int32 `gorm:"column:active;not null" json:"active"` + Error *int32 `gorm:"column:error" json:"error"` + ErrorMessage *string `gorm:"column:error_message" json:"error_message"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsPsgdprConsent's table name +func (*PsPsgdprConsent) TableName() string { + return TableNamePsPsgdprConsent +} + +var PsPsgdprConsentCols = struct { + IDGdprConsent gormcol.Field + IDModule gormcol.Field + Active gormcol.Field + Error gormcol.Field + ErrorMessage gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDGdprConsent: gormcol.Field{}.Set((&PsPsgdprConsent{}).TableName(), "id_gdpr_consent"), + IDModule: gormcol.Field{}.Set((&PsPsgdprConsent{}).TableName(), "id_module"), + Active: gormcol.Field{}.Set((&PsPsgdprConsent{}).TableName(), "active"), + Error: gormcol.Field{}.Set((&PsPsgdprConsent{}).TableName(), "error"), + ErrorMessage: gormcol.Field{}.Set((&PsPsgdprConsent{}).TableName(), "error_message"), + DateAdd: gormcol.Field{}.Set((&PsPsgdprConsent{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsPsgdprConsent{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_psgdpr_consent_lang.go b/app/model/dbmodel/ps_psgdpr_consent_lang.go similarity index 51% rename from app/model/prestadb/ps_psgdpr_consent_lang.go rename to app/model/dbmodel/ps_psgdpr_consent_lang.go index 9d56705..26fb36d 100644 --- a/app/model/prestadb/ps_psgdpr_consent_lang.go +++ b/app/model/dbmodel/ps_psgdpr_consent_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsPsgdprConsentLang = "ps_psgdpr_consent_lang" @@ -18,3 +18,15 @@ type PsPsgdprConsentLang struct { func (*PsPsgdprConsentLang) TableName() string { return TableNamePsPsgdprConsentLang } + +var PsPsgdprConsentLangCols = struct { + IDGdprConsent gormcol.Field + IDLang gormcol.Field + Message gormcol.Field + IDShop gormcol.Field +}{ + IDGdprConsent: gormcol.Field{}.Set((&PsPsgdprConsentLang{}).TableName(), "id_gdpr_consent"), + IDLang: gormcol.Field{}.Set((&PsPsgdprConsentLang{}).TableName(), "id_lang"), + Message: gormcol.Field{}.Set((&PsPsgdprConsentLang{}).TableName(), "message"), + IDShop: gormcol.Field{}.Set((&PsPsgdprConsentLang{}).TableName(), "id_shop"), +} diff --git a/app/model/dbmodel/ps_psgdpr_log.go b/app/model/dbmodel/ps_psgdpr_log.go new file mode 100644 index 0000000..0554977 --- /dev/null +++ b/app/model/dbmodel/ps_psgdpr_log.go @@ -0,0 +1,47 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsPsgdprLog = "ps_psgdpr_log" + +// PsPsgdprLog mapped from table +type PsPsgdprLog struct { + IDGdprLog int32 `gorm:"column:id_gdpr_log;primaryKey;autoIncrement:true" json:"id_gdpr_log"` + IDCustomer *int32 `gorm:"column:id_customer" json:"id_customer"` + IDGuest *int32 `gorm:"column:id_guest" json:"id_guest"` + ClientName *string `gorm:"column:client_name" json:"client_name"` + IDModule int32 `gorm:"column:id_module;not null" json:"id_module"` + RequestType int32 `gorm:"column:request_type;not null" json:"request_type"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsPsgdprLog's table name +func (*PsPsgdprLog) TableName() string { + return TableNamePsPsgdprLog +} + +var PsPsgdprLogCols = struct { + IDGdprLog gormcol.Field + IDCustomer gormcol.Field + IDGuest gormcol.Field + ClientName gormcol.Field + IDModule gormcol.Field + RequestType gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDGdprLog: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "id_gdpr_log"), + IDCustomer: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "id_customer"), + IDGuest: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "id_guest"), + ClientName: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "client_name"), + IDModule: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "id_module"), + RequestType: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "request_type"), + DateAdd: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsPsgdprLog{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_pshow_pshowproducttabs_hook.go b/app/model/dbmodel/ps_pshow_pshowproducttabs_hook.go similarity index 54% rename from app/model/prestadb/ps_pshow_pshowproducttabs_hook.go rename to app/model/dbmodel/ps_pshow_pshowproducttabs_hook.go index c38b750..1f8ae38 100644 --- a/app/model/prestadb/ps_pshow_pshowproducttabs_hook.go +++ b/app/model/dbmodel/ps_pshow_pshowproducttabs_hook.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsPshowPshowproducttabsHook = "ps_pshow_pshowproducttabs_hook" @@ -17,3 +17,13 @@ type PsPshowPshowproducttabsHook struct { func (*PsPshowPshowproducttabsHook) TableName() string { return TableNamePsPshowPshowproducttabsHook } + +var PsPshowPshowproducttabsHookCols = struct { + IDHook gormcol.Field + HookName gormcol.Field + PrestaIDHook gormcol.Field +}{ + IDHook: gormcol.Field{}.Set((&PsPshowPshowproducttabsHook{}).TableName(), "id_hook"), + HookName: gormcol.Field{}.Set((&PsPshowPshowproducttabsHook{}).TableName(), "hook_name"), + PrestaIDHook: gormcol.Field{}.Set((&PsPshowPshowproducttabsHook{}).TableName(), "presta_id_hook"), +} diff --git a/app/model/prestadb/ps_quick_access.go b/app/model/dbmodel/ps_quick_access.go similarity index 52% rename from app/model/prestadb/ps_quick_access.go rename to app/model/dbmodel/ps_quick_access.go index cfaa1bf..27e0c84 100644 --- a/app/model/prestadb/ps_quick_access.go +++ b/app/model/dbmodel/ps_quick_access.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsQuickAccess = "ps_quick_access" @@ -17,3 +17,13 @@ type PsQuickAccess struct { func (*PsQuickAccess) TableName() string { return TableNamePsQuickAccess } + +var PsQuickAccessCols = struct { + IDQuickAccess gormcol.Field + NewWindow gormcol.Field + Link gormcol.Field +}{ + IDQuickAccess: gormcol.Field{}.Set((&PsQuickAccess{}).TableName(), "id_quick_access"), + NewWindow: gormcol.Field{}.Set((&PsQuickAccess{}).TableName(), "new_window"), + Link: gormcol.Field{}.Set((&PsQuickAccess{}).TableName(), "link"), +} diff --git a/app/model/prestadb/ps_quick_access_lang.go b/app/model/dbmodel/ps_quick_access_lang.go similarity index 52% rename from app/model/prestadb/ps_quick_access_lang.go rename to app/model/dbmodel/ps_quick_access_lang.go index e02ab4c..1f0c112 100644 --- a/app/model/prestadb/ps_quick_access_lang.go +++ b/app/model/dbmodel/ps_quick_access_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsQuickAccessLang = "ps_quick_access_lang" @@ -17,3 +17,13 @@ type PsQuickAccessLang struct { func (*PsQuickAccessLang) TableName() string { return TableNamePsQuickAccessLang } + +var PsQuickAccessLangCols = struct { + IDQuickAccess gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDQuickAccess: gormcol.Field{}.Set((&PsQuickAccessLang{}).TableName(), "id_quick_access"), + IDLang: gormcol.Field{}.Set((&PsQuickAccessLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsQuickAccessLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_range_price.go b/app/model/dbmodel/ps_range_price.go similarity index 54% rename from app/model/prestadb/ps_range_price.go rename to app/model/dbmodel/ps_range_price.go index b28d7cd..5b75f16 100644 --- a/app/model/prestadb/ps_range_price.go +++ b/app/model/dbmodel/ps_range_price.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsRangePrice = "ps_range_price" @@ -18,3 +18,15 @@ type PsRangePrice struct { func (*PsRangePrice) TableName() string { return TableNamePsRangePrice } + +var PsRangePriceCols = struct { + IDRangePrice gormcol.Field + IDCarrier gormcol.Field + Delimiter1 gormcol.Field + Delimiter2 gormcol.Field +}{ + IDRangePrice: gormcol.Field{}.Set((&PsRangePrice{}).TableName(), "id_range_price"), + IDCarrier: gormcol.Field{}.Set((&PsRangePrice{}).TableName(), "id_carrier"), + Delimiter1: gormcol.Field{}.Set((&PsRangePrice{}).TableName(), "delimiter1"), + Delimiter2: gormcol.Field{}.Set((&PsRangePrice{}).TableName(), "delimiter2"), +} diff --git a/app/model/prestadb/ps_range_weight.go b/app/model/dbmodel/ps_range_weight.go similarity index 54% rename from app/model/prestadb/ps_range_weight.go rename to app/model/dbmodel/ps_range_weight.go index 0c2055c..8e4913e 100644 --- a/app/model/prestadb/ps_range_weight.go +++ b/app/model/dbmodel/ps_range_weight.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsRangeWeight = "ps_range_weight" @@ -18,3 +18,15 @@ type PsRangeWeight struct { func (*PsRangeWeight) TableName() string { return TableNamePsRangeWeight } + +var PsRangeWeightCols = struct { + IDRangeWeight gormcol.Field + IDCarrier gormcol.Field + Delimiter1 gormcol.Field + Delimiter2 gormcol.Field +}{ + IDRangeWeight: gormcol.Field{}.Set((&PsRangeWeight{}).TableName(), "id_range_weight"), + IDCarrier: gormcol.Field{}.Set((&PsRangeWeight{}).TableName(), "id_carrier"), + Delimiter1: gormcol.Field{}.Set((&PsRangeWeight{}).TableName(), "delimiter1"), + Delimiter2: gormcol.Field{}.Set((&PsRangeWeight{}).TableName(), "delimiter2"), +} diff --git a/app/model/prestadb/ps_reassurance.go b/app/model/dbmodel/ps_reassurance.go similarity index 52% rename from app/model/prestadb/ps_reassurance.go rename to app/model/dbmodel/ps_reassurance.go index 32bddf0..a7372dc 100644 --- a/app/model/prestadb/ps_reassurance.go +++ b/app/model/dbmodel/ps_reassurance.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsReassurance = "ps_reassurance" @@ -17,3 +17,13 @@ type PsReassurance struct { func (*PsReassurance) TableName() string { return TableNamePsReassurance } + +var PsReassuranceCols = struct { + IDReassurance gormcol.Field + IDShop gormcol.Field + FileName gormcol.Field +}{ + IDReassurance: gormcol.Field{}.Set((&PsReassurance{}).TableName(), "id_reassurance"), + IDShop: gormcol.Field{}.Set((&PsReassurance{}).TableName(), "id_shop"), + FileName: gormcol.Field{}.Set((&PsReassurance{}).TableName(), "file_name"), +} diff --git a/app/model/prestadb/ps_reassurance_lang.go b/app/model/dbmodel/ps_reassurance_lang.go similarity index 53% rename from app/model/prestadb/ps_reassurance_lang.go rename to app/model/dbmodel/ps_reassurance_lang.go index fc51776..9b870aa 100644 --- a/app/model/prestadb/ps_reassurance_lang.go +++ b/app/model/dbmodel/ps_reassurance_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsReassuranceLang = "ps_reassurance_lang" @@ -17,3 +17,13 @@ type PsReassuranceLang struct { func (*PsReassuranceLang) TableName() string { return TableNamePsReassuranceLang } + +var PsReassuranceLangCols = struct { + IDReassurance gormcol.Field + IDLang gormcol.Field + Text gormcol.Field +}{ + IDReassurance: gormcol.Field{}.Set((&PsReassuranceLang{}).TableName(), "id_reassurance"), + IDLang: gormcol.Field{}.Set((&PsReassuranceLang{}).TableName(), "id_lang"), + Text: gormcol.Field{}.Set((&PsReassuranceLang{}).TableName(), "text"), +} diff --git a/app/model/dbmodel/ps_referrer.go b/app/model/dbmodel/ps_referrer.go new file mode 100644 index 0000000..5409b36 --- /dev/null +++ b/app/model/dbmodel/ps_referrer.go @@ -0,0 +1,68 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsReferrer = "ps_referrer" + +// PsReferrer mapped from table +type PsReferrer struct { + IDReferrer int32 `gorm:"column:id_referrer;primaryKey;autoIncrement:true" json:"id_referrer"` + Name string `gorm:"column:name;not null" json:"name"` + Passwd *string `gorm:"column:passwd" json:"passwd"` + HTTPRefererRegexp *string `gorm:"column:http_referer_regexp" json:"http_referer_regexp"` + HTTPRefererLike *string `gorm:"column:http_referer_like" json:"http_referer_like"` + RequestURIRegexp *string `gorm:"column:request_uri_regexp" json:"request_uri_regexp"` + RequestURILike *string `gorm:"column:request_uri_like" json:"request_uri_like"` + HTTPRefererRegexpNot *string `gorm:"column:http_referer_regexp_not" json:"http_referer_regexp_not"` + HTTPRefererLikeNot *string `gorm:"column:http_referer_like_not" json:"http_referer_like_not"` + RequestURIRegexpNot *string `gorm:"column:request_uri_regexp_not" json:"request_uri_regexp_not"` + RequestURILikeNot *string `gorm:"column:request_uri_like_not" json:"request_uri_like_not"` + BaseFee float64 `gorm:"column:base_fee;not null;default:0.00" json:"base_fee"` + PercentFee float64 `gorm:"column:percent_fee;not null;default:0.00" json:"percent_fee"` + ClickFee float64 `gorm:"column:click_fee;not null;default:0.00" json:"click_fee"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` +} + +// TableName PsReferrer's table name +func (*PsReferrer) TableName() string { + return TableNamePsReferrer +} + +var PsReferrerCols = struct { + IDReferrer gormcol.Field + Name gormcol.Field + Passwd gormcol.Field + HTTPRefererRegexp gormcol.Field + HTTPRefererLike gormcol.Field + RequestURIRegexp gormcol.Field + RequestURILike gormcol.Field + HTTPRefererRegexpNot gormcol.Field + HTTPRefererLikeNot gormcol.Field + RequestURIRegexpNot gormcol.Field + RequestURILikeNot gormcol.Field + BaseFee gormcol.Field + PercentFee gormcol.Field + ClickFee gormcol.Field + DateAdd gormcol.Field +}{ + IDReferrer: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "id_referrer"), + Name: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "name"), + Passwd: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "passwd"), + HTTPRefererRegexp: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "http_referer_regexp"), + HTTPRefererLike: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "http_referer_like"), + RequestURIRegexp: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "request_uri_regexp"), + RequestURILike: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "request_uri_like"), + HTTPRefererRegexpNot: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "http_referer_regexp_not"), + HTTPRefererLikeNot: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "http_referer_like_not"), + RequestURIRegexpNot: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "request_uri_regexp_not"), + RequestURILikeNot: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "request_uri_like_not"), + BaseFee: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "base_fee"), + PercentFee: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "percent_fee"), + ClickFee: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "click_fee"), + DateAdd: gormcol.Field{}.Set((&PsReferrer{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_referrer_cache.go b/app/model/dbmodel/ps_referrer_cache.go similarity index 54% rename from app/model/prestadb/ps_referrer_cache.go rename to app/model/dbmodel/ps_referrer_cache.go index 1918e82..2e75b1b 100644 --- a/app/model/prestadb/ps_referrer_cache.go +++ b/app/model/dbmodel/ps_referrer_cache.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsReferrerCache = "ps_referrer_cache" @@ -16,3 +16,11 @@ type PsReferrerCache struct { func (*PsReferrerCache) TableName() string { return TableNamePsReferrerCache } + +var PsReferrerCacheCols = struct { + IDConnectionsSource gormcol.Field + IDReferrer gormcol.Field +}{ + IDConnectionsSource: gormcol.Field{}.Set((&PsReferrerCache{}).TableName(), "id_connections_source"), + IDReferrer: gormcol.Field{}.Set((&PsReferrerCache{}).TableName(), "id_referrer"), +} diff --git a/app/model/dbmodel/ps_referrer_shop.go b/app/model/dbmodel/ps_referrer_shop.go new file mode 100644 index 0000000..68beef7 --- /dev/null +++ b/app/model/dbmodel/ps_referrer_shop.go @@ -0,0 +1,50 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsReferrerShop = "ps_referrer_shop" + +// PsReferrerShop mapped from table +type PsReferrerShop struct { + IDReferrer int32 `gorm:"column:id_referrer;primaryKey;autoIncrement:true" json:"id_referrer"` + IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` + CacheVisitors *int32 `gorm:"column:cache_visitors" json:"cache_visitors"` + CacheVisits *int32 `gorm:"column:cache_visits" json:"cache_visits"` + CachePages *int32 `gorm:"column:cache_pages" json:"cache_pages"` + CacheRegistrations *int32 `gorm:"column:cache_registrations" json:"cache_registrations"` + CacheOrders *int32 `gorm:"column:cache_orders" json:"cache_orders"` + CacheSales *float64 `gorm:"column:cache_sales" json:"cache_sales"` + CacheRegRate *float64 `gorm:"column:cache_reg_rate" json:"cache_reg_rate"` + CacheOrderRate *float64 `gorm:"column:cache_order_rate" json:"cache_order_rate"` +} + +// TableName PsReferrerShop's table name +func (*PsReferrerShop) TableName() string { + return TableNamePsReferrerShop +} + +var PsReferrerShopCols = struct { + IDReferrer gormcol.Field + IDShop gormcol.Field + CacheVisitors gormcol.Field + CacheVisits gormcol.Field + CachePages gormcol.Field + CacheRegistrations gormcol.Field + CacheOrders gormcol.Field + CacheSales gormcol.Field + CacheRegRate gormcol.Field + CacheOrderRate gormcol.Field +}{ + IDReferrer: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "id_referrer"), + IDShop: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "id_shop"), + CacheVisitors: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_visitors"), + CacheVisits: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_visits"), + CachePages: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_pages"), + CacheRegistrations: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_registrations"), + CacheOrders: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_orders"), + CacheSales: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_sales"), + CacheRegRate: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_reg_rate"), + CacheOrderRate: gormcol.Field{}.Set((&PsReferrerShop{}).TableName(), "cache_order_rate"), +} diff --git a/app/model/prestadb/ps_request_sql.go b/app/model/dbmodel/ps_request_sql.go similarity index 52% rename from app/model/prestadb/ps_request_sql.go rename to app/model/dbmodel/ps_request_sql.go index 7d77496..69d0451 100644 --- a/app/model/prestadb/ps_request_sql.go +++ b/app/model/dbmodel/ps_request_sql.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsRequestSql = "ps_request_sql" @@ -17,3 +17,13 @@ type PsRequestSql struct { func (*PsRequestSql) TableName() string { return TableNamePsRequestSql } + +var PsRequestSqlCols = struct { + IDRequestSql gormcol.Field + Name gormcol.Field + Sql gormcol.Field +}{ + IDRequestSql: gormcol.Field{}.Set((&PsRequestSql{}).TableName(), "id_request_sql"), + Name: gormcol.Field{}.Set((&PsRequestSql{}).TableName(), "name"), + Sql: gormcol.Field{}.Set((&PsRequestSql{}).TableName(), "sql"), +} diff --git a/app/model/prestadb/ps_required_field.go b/app/model/dbmodel/ps_required_field.go similarity index 54% rename from app/model/prestadb/ps_required_field.go rename to app/model/dbmodel/ps_required_field.go index 33205cf..17e8bda 100644 --- a/app/model/prestadb/ps_required_field.go +++ b/app/model/dbmodel/ps_required_field.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsRequiredField = "ps_required_field" @@ -17,3 +17,13 @@ type PsRequiredField struct { func (*PsRequiredField) TableName() string { return TableNamePsRequiredField } + +var PsRequiredFieldCols = struct { + IDRequiredField gormcol.Field + ObjectName gormcol.Field + FieldName gormcol.Field +}{ + IDRequiredField: gormcol.Field{}.Set((&PsRequiredField{}).TableName(), "id_required_field"), + ObjectName: gormcol.Field{}.Set((&PsRequiredField{}).TableName(), "object_name"), + FieldName: gormcol.Field{}.Set((&PsRequiredField{}).TableName(), "field_name"), +} diff --git a/app/model/prestadb/ps_risk.go b/app/model/dbmodel/ps_risk.go similarity index 50% rename from app/model/prestadb/ps_risk.go rename to app/model/dbmodel/ps_risk.go index b9020c5..dabe337 100644 --- a/app/model/prestadb/ps_risk.go +++ b/app/model/dbmodel/ps_risk.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsRisk = "ps_risk" @@ -17,3 +17,13 @@ type PsRisk struct { func (*PsRisk) TableName() string { return TableNamePsRisk } + +var PsRiskCols = struct { + IDRisk gormcol.Field + Percent gormcol.Field + Color gormcol.Field +}{ + IDRisk: gormcol.Field{}.Set((&PsRisk{}).TableName(), "id_risk"), + Percent: gormcol.Field{}.Set((&PsRisk{}).TableName(), "percent"), + Color: gormcol.Field{}.Set((&PsRisk{}).TableName(), "color"), +} diff --git a/app/model/prestadb/ps_risk_lang.go b/app/model/dbmodel/ps_risk_lang.go similarity index 52% rename from app/model/prestadb/ps_risk_lang.go rename to app/model/dbmodel/ps_risk_lang.go index 1c7804f..8e34ddb 100644 --- a/app/model/prestadb/ps_risk_lang.go +++ b/app/model/dbmodel/ps_risk_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsRiskLang = "ps_risk_lang" @@ -17,3 +17,13 @@ type PsRiskLang struct { func (*PsRiskLang) TableName() string { return TableNamePsRiskLang } + +var PsRiskLangCols = struct { + IDRisk gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDRisk: gormcol.Field{}.Set((&PsRiskLang{}).TableName(), "id_risk"), + IDLang: gormcol.Field{}.Set((&PsRiskLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsRiskLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_search_engine.go b/app/model/dbmodel/ps_search_engine.go similarity index 52% rename from app/model/prestadb/ps_search_engine.go rename to app/model/dbmodel/ps_search_engine.go index 7cbe910..85227cd 100644 --- a/app/model/prestadb/ps_search_engine.go +++ b/app/model/dbmodel/ps_search_engine.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSearchEngine = "ps_search_engine" @@ -17,3 +17,13 @@ type PsSearchEngine struct { func (*PsSearchEngine) TableName() string { return TableNamePsSearchEngine } + +var PsSearchEngineCols = struct { + IDSearchEngine gormcol.Field + Server gormcol.Field + Getvar gormcol.Field +}{ + IDSearchEngine: gormcol.Field{}.Set((&PsSearchEngine{}).TableName(), "id_search_engine"), + Server: gormcol.Field{}.Set((&PsSearchEngine{}).TableName(), "server"), + Getvar: gormcol.Field{}.Set((&PsSearchEngine{}).TableName(), "getvar"), +} diff --git a/app/model/prestadb/ps_search_index.go b/app/model/dbmodel/ps_search_index.go similarity index 54% rename from app/model/prestadb/ps_search_index.go rename to app/model/dbmodel/ps_search_index.go index 830207b..c355e5d 100644 --- a/app/model/prestadb/ps_search_index.go +++ b/app/model/dbmodel/ps_search_index.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSearchIndex = "ps_search_index" @@ -17,3 +17,13 @@ type PsSearchIndex struct { func (*PsSearchIndex) TableName() string { return TableNamePsSearchIndex } + +var PsSearchIndexCols = struct { + IDProduct gormcol.Field + IDWord gormcol.Field + Weight gormcol.Field +}{ + IDProduct: gormcol.Field{}.Set((&PsSearchIndex{}).TableName(), "id_product"), + IDWord: gormcol.Field{}.Set((&PsSearchIndex{}).TableName(), "id_word"), + Weight: gormcol.Field{}.Set((&PsSearchIndex{}).TableName(), "weight"), +} diff --git a/app/model/prestadb/ps_search_word.go b/app/model/dbmodel/ps_search_word.go similarity index 54% rename from app/model/prestadb/ps_search_word.go rename to app/model/dbmodel/ps_search_word.go index 8609915..c34d333 100644 --- a/app/model/prestadb/ps_search_word.go +++ b/app/model/dbmodel/ps_search_word.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSearchWord = "ps_search_word" @@ -18,3 +18,15 @@ type PsSearchWord struct { func (*PsSearchWord) TableName() string { return TableNamePsSearchWord } + +var PsSearchWordCols = struct { + IDWord gormcol.Field + IDShop gormcol.Field + IDLang gormcol.Field + Word gormcol.Field +}{ + IDWord: gormcol.Field{}.Set((&PsSearchWord{}).TableName(), "id_word"), + IDShop: gormcol.Field{}.Set((&PsSearchWord{}).TableName(), "id_shop"), + IDLang: gormcol.Field{}.Set((&PsSearchWord{}).TableName(), "id_lang"), + Word: gormcol.Field{}.Set((&PsSearchWord{}).TableName(), "word"), +} diff --git a/app/model/prestadb/ps_sekeyword.go b/app/model/dbmodel/ps_sekeyword.go similarity index 51% rename from app/model/prestadb/ps_sekeyword.go rename to app/model/dbmodel/ps_sekeyword.go index e438c9f..2103030 100644 --- a/app/model/prestadb/ps_sekeyword.go +++ b/app/model/dbmodel/ps_sekeyword.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsSekeyword struct { func (*PsSekeyword) TableName() string { return TableNamePsSekeyword } + +var PsSekeywordCols = struct { + IDSekeyword gormcol.Field + IDShop gormcol.Field + IDShopGroup gormcol.Field + Keyword gormcol.Field + DateAdd gormcol.Field +}{ + IDSekeyword: gormcol.Field{}.Set((&PsSekeyword{}).TableName(), "id_sekeyword"), + IDShop: gormcol.Field{}.Set((&PsSekeyword{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsSekeyword{}).TableName(), "id_shop_group"), + Keyword: gormcol.Field{}.Set((&PsSekeyword{}).TableName(), "keyword"), + DateAdd: gormcol.Field{}.Set((&PsSekeyword{}).TableName(), "date_add"), +} diff --git a/app/model/dbmodel/ps_shop.go b/app/model/dbmodel/ps_shop.go new file mode 100644 index 0000000..d2aa6b5 --- /dev/null +++ b/app/model/dbmodel/ps_shop.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsShop = "ps_shop" + +// PsShop mapped from table +type PsShop struct { + IDShop int32 `gorm:"column:id_shop;primaryKey;autoIncrement:true" json:"id_shop"` + IDShopGroup int32 `gorm:"column:id_shop_group;not null;index:IDX_CBDFBB9EF5C9E40,priority:1" json:"id_shop_group"` + Name string `gorm:"column:name;not null" json:"name"` + IDCategory int32 `gorm:"column:id_category;not null" json:"id_category"` + ThemeName string `gorm:"column:theme_name;not null" json:"theme_name"` + Active bool `gorm:"column:active;not null" json:"active"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` +} + +// TableName PsShop's table name +func (*PsShop) TableName() string { + return TableNamePsShop +} + +var PsShopCols = struct { + IDShop gormcol.Field + IDShopGroup gormcol.Field + Name gormcol.Field + IDCategory gormcol.Field + ThemeName gormcol.Field + Active gormcol.Field + Deleted gormcol.Field +}{ + IDShop: gormcol.Field{}.Set((&PsShop{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsShop{}).TableName(), "id_shop_group"), + Name: gormcol.Field{}.Set((&PsShop{}).TableName(), "name"), + IDCategory: gormcol.Field{}.Set((&PsShop{}).TableName(), "id_category"), + ThemeName: gormcol.Field{}.Set((&PsShop{}).TableName(), "theme_name"), + Active: gormcol.Field{}.Set((&PsShop{}).TableName(), "active"), + Deleted: gormcol.Field{}.Set((&PsShop{}).TableName(), "deleted"), +} diff --git a/app/model/dbmodel/ps_shop_company.go b/app/model/dbmodel/ps_shop_company.go new file mode 100644 index 0000000..3d1d50c --- /dev/null +++ b/app/model/dbmodel/ps_shop_company.go @@ -0,0 +1,68 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsShopCompany = "ps_shop_company" + +// PsShopCompany mapped from table +type PsShopCompany struct { + IDShopCompany int32 `gorm:"column:id_shop_company;primaryKey;autoIncrement:true" json:"id_shop_company"` + Name *string `gorm:"column:name" json:"name"` + Address *string `gorm:"column:address" json:"address"` + Postcode *string `gorm:"column:postcode" json:"postcode"` + City *string `gorm:"column:city" json:"city"` + Phone *string `gorm:"column:phone" json:"phone"` + IDCountry int32 `gorm:"column:id_country;not null" json:"id_country"` + VatNumber *string `gorm:"column:vat_number;uniqueIndex:UQ_ps_shop_company_vat_number,priority:1" json:"vat_number"` + Email *string `gorm:"column:email" json:"email"` + BankAccount *string `gorm:"column:bank_account" json:"bank_account"` + LastNumber *int32 `gorm:"column:last_number" json:"last_number"` + IsDefault int32 `gorm:"column:is_default;not null" json:"is_default"` + Color *string `gorm:"column:color" json:"color"` + DateAdd *time.Time `gorm:"column:date_add;default:current_timestamp()" json:"date_add"` + DateUpd *time.Time `gorm:"column:date_upd;default:current_timestamp()" json:"date_upd"` +} + +// TableName PsShopCompany's table name +func (*PsShopCompany) TableName() string { + return TableNamePsShopCompany +} + +var PsShopCompanyCols = struct { + IDShopCompany gormcol.Field + Name gormcol.Field + Address gormcol.Field + Postcode gormcol.Field + City gormcol.Field + Phone gormcol.Field + IDCountry gormcol.Field + VatNumber gormcol.Field + Email gormcol.Field + BankAccount gormcol.Field + LastNumber gormcol.Field + IsDefault gormcol.Field + Color gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDShopCompany: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "id_shop_company"), + Name: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "name"), + Address: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "address"), + Postcode: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "postcode"), + City: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "city"), + Phone: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "phone"), + IDCountry: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "id_country"), + VatNumber: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "vat_number"), + Email: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "email"), + BankAccount: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "bank_account"), + LastNumber: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "last_number"), + IsDefault: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "is_default"), + Color: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "color"), + DateAdd: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsShopCompany{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_shop_group.go b/app/model/dbmodel/ps_shop_group.go new file mode 100644 index 0000000..74d2f00 --- /dev/null +++ b/app/model/dbmodel/ps_shop_group.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsShopGroup = "ps_shop_group" + +// PsShopGroup mapped from table +type PsShopGroup struct { + IDShopGroup int32 `gorm:"column:id_shop_group;primaryKey;autoIncrement:true" json:"id_shop_group"` + Name string `gorm:"column:name;not null" json:"name"` + ShareCustomer bool `gorm:"column:share_customer;not null" json:"share_customer"` + ShareOrder bool `gorm:"column:share_order;not null" json:"share_order"` + ShareStock bool `gorm:"column:share_stock;not null" json:"share_stock"` + Active bool `gorm:"column:active;not null" json:"active"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` +} + +// TableName PsShopGroup's table name +func (*PsShopGroup) TableName() string { + return TableNamePsShopGroup +} + +var PsShopGroupCols = struct { + IDShopGroup gormcol.Field + Name gormcol.Field + ShareCustomer gormcol.Field + ShareOrder gormcol.Field + ShareStock gormcol.Field + Active gormcol.Field + Deleted gormcol.Field +}{ + IDShopGroup: gormcol.Field{}.Set((&PsShopGroup{}).TableName(), "id_shop_group"), + Name: gormcol.Field{}.Set((&PsShopGroup{}).TableName(), "name"), + ShareCustomer: gormcol.Field{}.Set((&PsShopGroup{}).TableName(), "share_customer"), + ShareOrder: gormcol.Field{}.Set((&PsShopGroup{}).TableName(), "share_order"), + ShareStock: gormcol.Field{}.Set((&PsShopGroup{}).TableName(), "share_stock"), + Active: gormcol.Field{}.Set((&PsShopGroup{}).TableName(), "active"), + Deleted: gormcol.Field{}.Set((&PsShopGroup{}).TableName(), "deleted"), +} diff --git a/app/model/prestadb/ps_shop_url.go b/app/model/dbmodel/ps_shop_url.go similarity index 54% rename from app/model/prestadb/ps_shop_url.go rename to app/model/dbmodel/ps_shop_url.go index 467eaae..01c4c7c 100644 --- a/app/model/prestadb/ps_shop_url.go +++ b/app/model/dbmodel/ps_shop_url.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsShopURL = "ps_shop_url" @@ -22,3 +22,23 @@ type PsShopURL struct { func (*PsShopURL) TableName() string { return TableNamePsShopURL } + +var PsShopURLCols = struct { + IDShopURL gormcol.Field + IDShop gormcol.Field + Domain gormcol.Field + DomainSsl gormcol.Field + PhysicalURI gormcol.Field + VirtualURI gormcol.Field + Main gormcol.Field + Active gormcol.Field +}{ + IDShopURL: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "id_shop_url"), + IDShop: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "id_shop"), + Domain: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "domain"), + DomainSsl: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "domain_ssl"), + PhysicalURI: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "physical_uri"), + VirtualURI: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "virtual_uri"), + Main: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "main"), + Active: gormcol.Field{}.Set((&PsShopURL{}).TableName(), "active"), +} diff --git a/app/model/prestadb/ps_smarty_cache.go b/app/model/dbmodel/ps_smarty_cache.go similarity index 54% rename from app/model/prestadb/ps_smarty_cache.go rename to app/model/dbmodel/ps_smarty_cache.go index 30ddd67..25636bc 100644 --- a/app/model/prestadb/ps_smarty_cache.go +++ b/app/model/dbmodel/ps_smarty_cache.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsSmartyCache struct { func (*PsSmartyCache) TableName() string { return TableNamePsSmartyCache } + +var PsSmartyCacheCols = struct { + IDSmartyCache gormcol.Field + Name gormcol.Field + CacheID gormcol.Field + Modified gormcol.Field + Content gormcol.Field +}{ + IDSmartyCache: gormcol.Field{}.Set((&PsSmartyCache{}).TableName(), "id_smarty_cache"), + Name: gormcol.Field{}.Set((&PsSmartyCache{}).TableName(), "name"), + CacheID: gormcol.Field{}.Set((&PsSmartyCache{}).TableName(), "cache_id"), + Modified: gormcol.Field{}.Set((&PsSmartyCache{}).TableName(), "modified"), + Content: gormcol.Field{}.Set((&PsSmartyCache{}).TableName(), "content"), +} diff --git a/app/model/prestadb/ps_smarty_last_flush.go b/app/model/dbmodel/ps_smarty_last_flush.go similarity index 58% rename from app/model/prestadb/ps_smarty_last_flush.go rename to app/model/dbmodel/ps_smarty_last_flush.go index 0d09bee..d6e7729 100644 --- a/app/model/prestadb/ps_smarty_last_flush.go +++ b/app/model/dbmodel/ps_smarty_last_flush.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -20,3 +19,11 @@ type PsSmartyLastFlush struct { func (*PsSmartyLastFlush) TableName() string { return TableNamePsSmartyLastFlush } + +var PsSmartyLastFlushCols = struct { + Type gormcol.Field + LastFlush gormcol.Field +}{ + Type: gormcol.Field{}.Set((&PsSmartyLastFlush{}).TableName(), "type"), + LastFlush: gormcol.Field{}.Set((&PsSmartyLastFlush{}).TableName(), "last_flush"), +} diff --git a/app/model/prestadb/ps_smarty_lazy_cache.go b/app/model/dbmodel/ps_smarty_lazy_cache.go similarity index 51% rename from app/model/prestadb/ps_smarty_lazy_cache.go rename to app/model/dbmodel/ps_smarty_lazy_cache.go index 3c70aa3..6f0af21 100644 --- a/app/model/prestadb/ps_smarty_lazy_cache.go +++ b/app/model/dbmodel/ps_smarty_lazy_cache.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsSmartyLazyCache struct { func (*PsSmartyLazyCache) TableName() string { return TableNamePsSmartyLazyCache } + +var PsSmartyLazyCacheCols = struct { + TemplateHash gormcol.Field + CacheID gormcol.Field + CompileID gormcol.Field + Filepath gormcol.Field + LastUpdate gormcol.Field +}{ + TemplateHash: gormcol.Field{}.Set((&PsSmartyLazyCache{}).TableName(), "template_hash"), + CacheID: gormcol.Field{}.Set((&PsSmartyLazyCache{}).TableName(), "cache_id"), + CompileID: gormcol.Field{}.Set((&PsSmartyLazyCache{}).TableName(), "compile_id"), + Filepath: gormcol.Field{}.Set((&PsSmartyLazyCache{}).TableName(), "filepath"), + LastUpdate: gormcol.Field{}.Set((&PsSmartyLazyCache{}).TableName(), "last_update"), +} diff --git a/app/model/prestadb/ps_specific_price.go b/app/model/dbmodel/ps_specific_price.go similarity index 57% rename from app/model/prestadb/ps_specific_price.go rename to app/model/dbmodel/ps_specific_price.go index 08f3137..de90046 100644 --- a/app/model/prestadb/ps_specific_price.go +++ b/app/model/dbmodel/ps_specific_price.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -36,3 +35,43 @@ type PsSpecificPrice struct { func (*PsSpecificPrice) TableName() string { return TableNamePsSpecificPrice } + +var PsSpecificPriceCols = struct { + IDSpecificPrice gormcol.Field + IDSpecificPriceRule gormcol.Field + IDCart gormcol.Field + IDProduct gormcol.Field + IDShop gormcol.Field + IDShopGroup gormcol.Field + IDCurrency gormcol.Field + IDCountry gormcol.Field + IDGroup gormcol.Field + IDCustomer gormcol.Field + IDProductAttribute gormcol.Field + Price gormcol.Field + FromQuantity gormcol.Field + Reduction gormcol.Field + ReductionTax gormcol.Field + ReductionType gormcol.Field + From gormcol.Field + To gormcol.Field +}{ + IDSpecificPrice: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_specific_price"), + IDSpecificPriceRule: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_specific_price_rule"), + IDCart: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_cart"), + IDProduct: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_product"), + IDShop: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_shop_group"), + IDCurrency: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_currency"), + IDCountry: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_country"), + IDGroup: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_group"), + IDCustomer: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_customer"), + IDProductAttribute: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "id_product_attribute"), + Price: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "price"), + FromQuantity: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "from_quantity"), + Reduction: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "reduction"), + ReductionTax: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "reduction_tax"), + ReductionType: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "reduction_type"), + From: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "from"), + To: gormcol.Field{}.Set((&PsSpecificPrice{}).TableName(), "to"), +} diff --git a/app/model/prestadb/ps_specific_price_priority.go b/app/model/dbmodel/ps_specific_price_priority.go similarity index 55% rename from app/model/prestadb/ps_specific_price_priority.go rename to app/model/dbmodel/ps_specific_price_priority.go index 6cb7260..d1714ef 100644 --- a/app/model/prestadb/ps_specific_price_priority.go +++ b/app/model/dbmodel/ps_specific_price_priority.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSpecificPricePriority = "ps_specific_price_priority" @@ -17,3 +17,13 @@ type PsSpecificPricePriority struct { func (*PsSpecificPricePriority) TableName() string { return TableNamePsSpecificPricePriority } + +var PsSpecificPricePriorityCols = struct { + IDSpecificPricePriority gormcol.Field + IDProduct gormcol.Field + Priority gormcol.Field +}{ + IDSpecificPricePriority: gormcol.Field{}.Set((&PsSpecificPricePriority{}).TableName(), "id_specific_price_priority"), + IDProduct: gormcol.Field{}.Set((&PsSpecificPricePriority{}).TableName(), "id_product"), + Priority: gormcol.Field{}.Set((&PsSpecificPricePriority{}).TableName(), "priority"), +} diff --git a/app/model/prestadb/ps_specific_price_rule.go b/app/model/dbmodel/ps_specific_price_rule.go similarity index 51% rename from app/model/prestadb/ps_specific_price_rule.go rename to app/model/dbmodel/ps_specific_price_rule.go index 459633b..33070de 100644 --- a/app/model/prestadb/ps_specific_price_rule.go +++ b/app/model/dbmodel/ps_specific_price_rule.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -31,3 +30,33 @@ type PsSpecificPriceRule struct { func (*PsSpecificPriceRule) TableName() string { return TableNamePsSpecificPriceRule } + +var PsSpecificPriceRuleCols = struct { + IDSpecificPriceRule gormcol.Field + Name gormcol.Field + IDShop gormcol.Field + IDCurrency gormcol.Field + IDCountry gormcol.Field + IDGroup gormcol.Field + FromQuantity gormcol.Field + Price gormcol.Field + Reduction gormcol.Field + ReductionTax gormcol.Field + ReductionType gormcol.Field + From gormcol.Field + To gormcol.Field +}{ + IDSpecificPriceRule: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_specific_price_rule"), + Name: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "name"), + IDShop: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_shop"), + IDCurrency: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_currency"), + IDCountry: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_country"), + IDGroup: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "id_group"), + FromQuantity: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "from_quantity"), + Price: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "price"), + Reduction: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "reduction"), + ReductionTax: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "reduction_tax"), + ReductionType: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "reduction_type"), + From: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "from"), + To: gormcol.Field{}.Set((&PsSpecificPriceRule{}).TableName(), "to"), +} diff --git a/app/model/prestadb/ps_specific_price_rule_condition.go b/app/model/dbmodel/ps_specific_price_rule_condition.go similarity index 55% rename from app/model/prestadb/ps_specific_price_rule_condition.go rename to app/model/dbmodel/ps_specific_price_rule_condition.go index baa7caf..26a6f85 100644 --- a/app/model/prestadb/ps_specific_price_rule_condition.go +++ b/app/model/dbmodel/ps_specific_price_rule_condition.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSpecificPriceRuleCondition = "ps_specific_price_rule_condition" @@ -18,3 +18,15 @@ type PsSpecificPriceRuleCondition struct { func (*PsSpecificPriceRuleCondition) TableName() string { return TableNamePsSpecificPriceRuleCondition } + +var PsSpecificPriceRuleConditionCols = struct { + IDSpecificPriceRuleCondition gormcol.Field + IDSpecificPriceRuleConditionGroup gormcol.Field + Type gormcol.Field + Value gormcol.Field +}{ + IDSpecificPriceRuleCondition: gormcol.Field{}.Set((&PsSpecificPriceRuleCondition{}).TableName(), "id_specific_price_rule_condition"), + IDSpecificPriceRuleConditionGroup: gormcol.Field{}.Set((&PsSpecificPriceRuleCondition{}).TableName(), "id_specific_price_rule_condition_group"), + Type: gormcol.Field{}.Set((&PsSpecificPriceRuleCondition{}).TableName(), "type"), + Value: gormcol.Field{}.Set((&PsSpecificPriceRuleCondition{}).TableName(), "value"), +} diff --git a/app/model/prestadb/ps_specific_price_rule_condition_group.go b/app/model/dbmodel/ps_specific_price_rule_condition_group.go similarity index 57% rename from app/model/prestadb/ps_specific_price_rule_condition_group.go rename to app/model/dbmodel/ps_specific_price_rule_condition_group.go index 37b17f2..52a8453 100644 --- a/app/model/prestadb/ps_specific_price_rule_condition_group.go +++ b/app/model/dbmodel/ps_specific_price_rule_condition_group.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSpecificPriceRuleConditionGroup = "ps_specific_price_rule_condition_group" @@ -16,3 +16,11 @@ type PsSpecificPriceRuleConditionGroup struct { func (*PsSpecificPriceRuleConditionGroup) TableName() string { return TableNamePsSpecificPriceRuleConditionGroup } + +var PsSpecificPriceRuleConditionGroupCols = struct { + IDSpecificPriceRuleConditionGroup gormcol.Field + IDSpecificPriceRule gormcol.Field +}{ + IDSpecificPriceRuleConditionGroup: gormcol.Field{}.Set((&PsSpecificPriceRuleConditionGroup{}).TableName(), "id_specific_price_rule_condition_group"), + IDSpecificPriceRule: gormcol.Field{}.Set((&PsSpecificPriceRuleConditionGroup{}).TableName(), "id_specific_price_rule"), +} diff --git a/app/model/prestadb/ps_state.go b/app/model/dbmodel/ps_state.go similarity index 50% rename from app/model/prestadb/ps_state.go rename to app/model/dbmodel/ps_state.go index eecf901..fa74c73 100644 --- a/app/model/prestadb/ps_state.go +++ b/app/model/dbmodel/ps_state.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsState = "ps_state" @@ -21,3 +21,21 @@ type PsState struct { func (*PsState) TableName() string { return TableNamePsState } + +var PsStateCols = struct { + IDState gormcol.Field + IDCountry gormcol.Field + IDZone gormcol.Field + Name gormcol.Field + IsoCode gormcol.Field + TaxBehavior gormcol.Field + Active gormcol.Field +}{ + IDState: gormcol.Field{}.Set((&PsState{}).TableName(), "id_state"), + IDCountry: gormcol.Field{}.Set((&PsState{}).TableName(), "id_country"), + IDZone: gormcol.Field{}.Set((&PsState{}).TableName(), "id_zone"), + Name: gormcol.Field{}.Set((&PsState{}).TableName(), "name"), + IsoCode: gormcol.Field{}.Set((&PsState{}).TableName(), "iso_code"), + TaxBehavior: gormcol.Field{}.Set((&PsState{}).TableName(), "tax_behavior"), + Active: gormcol.Field{}.Set((&PsState{}).TableName(), "active"), +} diff --git a/app/model/prestadb/ps_statssearch.go b/app/model/dbmodel/ps_statssearch.go similarity index 50% rename from app/model/prestadb/ps_statssearch.go rename to app/model/dbmodel/ps_statssearch.go index 608be9d..8996c12 100644 --- a/app/model/prestadb/ps_statssearch.go +++ b/app/model/dbmodel/ps_statssearch.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsStatssearch struct { func (*PsStatssearch) TableName() string { return TableNamePsStatssearch } + +var PsStatssearchCols = struct { + IDStatssearch gormcol.Field + IDShop gormcol.Field + IDShopGroup gormcol.Field + Keywords gormcol.Field + Results gormcol.Field + DateAdd gormcol.Field +}{ + IDStatssearch: gormcol.Field{}.Set((&PsStatssearch{}).TableName(), "id_statssearch"), + IDShop: gormcol.Field{}.Set((&PsStatssearch{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsStatssearch{}).TableName(), "id_shop_group"), + Keywords: gormcol.Field{}.Set((&PsStatssearch{}).TableName(), "keywords"), + Results: gormcol.Field{}.Set((&PsStatssearch{}).TableName(), "results"), + DateAdd: gormcol.Field{}.Set((&PsStatssearch{}).TableName(), "date_add"), +} diff --git a/app/model/dbmodel/ps_stock.go b/app/model/dbmodel/ps_stock.go new file mode 100644 index 0000000..499c2c8 --- /dev/null +++ b/app/model/dbmodel/ps_stock.go @@ -0,0 +1,53 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsStock = "ps_stock" + +// PsStock mapped from table +type PsStock struct { + IDStock int32 `gorm:"column:id_stock;primaryKey;autoIncrement:true" json:"id_stock"` + IDWarehouse int32 `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"` + IDProduct int32 `gorm:"column:id_product;not null;index:id_product,priority:1" json:"id_product"` + IDProductAttribute int32 `gorm:"column:id_product_attribute;not null;index:id_product_attribute,priority:1" json:"id_product_attribute"` + Reference string `gorm:"column:reference;not null" json:"reference"` + Ean13 *string `gorm:"column:ean13" json:"ean13"` + Isbn *string `gorm:"column:isbn" json:"isbn"` + Upc *string `gorm:"column:upc" json:"upc"` + PhysicalQuantity int32 `gorm:"column:physical_quantity;not null" json:"physical_quantity"` + UsableQuantity int32 `gorm:"column:usable_quantity;not null" json:"usable_quantity"` + PriceTe *float64 `gorm:"column:price_te;default:0.000000" json:"price_te"` +} + +// TableName PsStock's table name +func (*PsStock) TableName() string { + return TableNamePsStock +} + +var PsStockCols = struct { + IDStock gormcol.Field + IDWarehouse gormcol.Field + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + Reference gormcol.Field + Ean13 gormcol.Field + Isbn gormcol.Field + Upc gormcol.Field + PhysicalQuantity gormcol.Field + UsableQuantity gormcol.Field + PriceTe gormcol.Field +}{ + IDStock: gormcol.Field{}.Set((&PsStock{}).TableName(), "id_stock"), + IDWarehouse: gormcol.Field{}.Set((&PsStock{}).TableName(), "id_warehouse"), + IDProduct: gormcol.Field{}.Set((&PsStock{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsStock{}).TableName(), "id_product_attribute"), + Reference: gormcol.Field{}.Set((&PsStock{}).TableName(), "reference"), + Ean13: gormcol.Field{}.Set((&PsStock{}).TableName(), "ean13"), + Isbn: gormcol.Field{}.Set((&PsStock{}).TableName(), "isbn"), + Upc: gormcol.Field{}.Set((&PsStock{}).TableName(), "upc"), + PhysicalQuantity: gormcol.Field{}.Set((&PsStock{}).TableName(), "physical_quantity"), + UsableQuantity: gormcol.Field{}.Set((&PsStock{}).TableName(), "usable_quantity"), + PriceTe: gormcol.Field{}.Set((&PsStock{}).TableName(), "price_te"), +} diff --git a/app/model/prestadb/ps_stock_available.go b/app/model/dbmodel/ps_stock_available.go similarity index 58% rename from app/model/prestadb/ps_stock_available.go rename to app/model/dbmodel/ps_stock_available.go index 8730aa7..0695f4b 100644 --- a/app/model/prestadb/ps_stock_available.go +++ b/app/model/dbmodel/ps_stock_available.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsStockAvailable = "ps_stock_available" @@ -25,3 +25,29 @@ type PsStockAvailable struct { func (*PsStockAvailable) TableName() string { return TableNamePsStockAvailable } + +var PsStockAvailableCols = struct { + IDStockAvailable gormcol.Field + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + IDShop gormcol.Field + IDShopGroup gormcol.Field + Quantity gormcol.Field + PhysicalQuantity gormcol.Field + ReservedQuantity gormcol.Field + DependsOnStock gormcol.Field + OutOfStock gormcol.Field + Location gormcol.Field +}{ + IDStockAvailable: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "id_stock_available"), + IDProduct: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "id_product_attribute"), + IDShop: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "id_shop"), + IDShopGroup: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "id_shop_group"), + Quantity: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "quantity"), + PhysicalQuantity: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "physical_quantity"), + ReservedQuantity: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "reserved_quantity"), + DependsOnStock: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "depends_on_stock"), + OutOfStock: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "out_of_stock"), + Location: gormcol.Field{}.Set((&PsStockAvailable{}).TableName(), "location"), +} diff --git a/app/model/dbmodel/ps_stock_mvt.go b/app/model/dbmodel/ps_stock_mvt.go new file mode 100644 index 0000000..0f81e1c --- /dev/null +++ b/app/model/dbmodel/ps_stock_mvt.go @@ -0,0 +1,68 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsStockMvt = "ps_stock_mvt" + +// PsStockMvt mapped from table +type PsStockMvt struct { + IDStockMvt int64 `gorm:"column:id_stock_mvt;primaryKey;autoIncrement:true" json:"id_stock_mvt"` + IDStock int32 `gorm:"column:id_stock;not null;index:id_stock,priority:1" json:"id_stock"` + IDOrder *int32 `gorm:"column:id_order" json:"id_order"` + IDSupplyOrder *int32 `gorm:"column:id_supply_order" json:"id_supply_order"` + IDStockMvtReason int32 `gorm:"column:id_stock_mvt_reason;not null;index:id_stock_mvt_reason,priority:1" json:"id_stock_mvt_reason"` + IDEmployee int32 `gorm:"column:id_employee;not null" json:"id_employee"` + EmployeeLastname *string `gorm:"column:employee_lastname" json:"employee_lastname"` + EmployeeFirstname *string `gorm:"column:employee_firstname" json:"employee_firstname"` + PhysicalQuantity int32 `gorm:"column:physical_quantity;not null" json:"physical_quantity"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + Sign int32 `gorm:"column:sign;not null;default:1" json:"sign"` + PriceTe *float64 `gorm:"column:price_te;default:0.000000" json:"price_te"` + LastWa *float64 `gorm:"column:last_wa;default:0.000000" json:"last_wa"` + CurrentWa *float64 `gorm:"column:current_wa;default:0.000000" json:"current_wa"` + Referer *int64 `gorm:"column:referer" json:"referer"` +} + +// TableName PsStockMvt's table name +func (*PsStockMvt) TableName() string { + return TableNamePsStockMvt +} + +var PsStockMvtCols = struct { + IDStockMvt gormcol.Field + IDStock gormcol.Field + IDOrder gormcol.Field + IDSupplyOrder gormcol.Field + IDStockMvtReason gormcol.Field + IDEmployee gormcol.Field + EmployeeLastname gormcol.Field + EmployeeFirstname gormcol.Field + PhysicalQuantity gormcol.Field + DateAdd gormcol.Field + Sign gormcol.Field + PriceTe gormcol.Field + LastWa gormcol.Field + CurrentWa gormcol.Field + Referer gormcol.Field +}{ + IDStockMvt: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "id_stock_mvt"), + IDStock: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "id_stock"), + IDOrder: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "id_order"), + IDSupplyOrder: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "id_supply_order"), + IDStockMvtReason: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "id_stock_mvt_reason"), + IDEmployee: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "id_employee"), + EmployeeLastname: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "employee_lastname"), + EmployeeFirstname: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "employee_firstname"), + PhysicalQuantity: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "physical_quantity"), + DateAdd: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "date_add"), + Sign: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "sign"), + PriceTe: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "price_te"), + LastWa: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "last_wa"), + CurrentWa: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "current_wa"), + Referer: gormcol.Field{}.Set((&PsStockMvt{}).TableName(), "referer"), +} diff --git a/app/model/prestadb/ps_stock_mvt_reason.go b/app/model/dbmodel/ps_stock_mvt_reason.go similarity index 52% rename from app/model/prestadb/ps_stock_mvt_reason.go rename to app/model/dbmodel/ps_stock_mvt_reason.go index fdb8e3e..d611d09 100644 --- a/app/model/prestadb/ps_stock_mvt_reason.go +++ b/app/model/dbmodel/ps_stock_mvt_reason.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsStockMvtReason struct { func (*PsStockMvtReason) TableName() string { return TableNamePsStockMvtReason } + +var PsStockMvtReasonCols = struct { + IDStockMvtReason gormcol.Field + Sign gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Deleted gormcol.Field +}{ + IDStockMvtReason: gormcol.Field{}.Set((&PsStockMvtReason{}).TableName(), "id_stock_mvt_reason"), + Sign: gormcol.Field{}.Set((&PsStockMvtReason{}).TableName(), "sign"), + DateAdd: gormcol.Field{}.Set((&PsStockMvtReason{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsStockMvtReason{}).TableName(), "date_upd"), + Deleted: gormcol.Field{}.Set((&PsStockMvtReason{}).TableName(), "deleted"), +} diff --git a/app/model/prestadb/ps_stock_mvt_reason_lang.go b/app/model/dbmodel/ps_stock_mvt_reason_lang.go similarity index 53% rename from app/model/prestadb/ps_stock_mvt_reason_lang.go rename to app/model/dbmodel/ps_stock_mvt_reason_lang.go index 95f46d9..b80594c 100644 --- a/app/model/prestadb/ps_stock_mvt_reason_lang.go +++ b/app/model/dbmodel/ps_stock_mvt_reason_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsStockMvtReasonLang = "ps_stock_mvt_reason_lang" @@ -17,3 +17,13 @@ type PsStockMvtReasonLang struct { func (*PsStockMvtReasonLang) TableName() string { return TableNamePsStockMvtReasonLang } + +var PsStockMvtReasonLangCols = struct { + IDStockMvtReason gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDStockMvtReason: gormcol.Field{}.Set((&PsStockMvtReasonLang{}).TableName(), "id_stock_mvt_reason"), + IDLang: gormcol.Field{}.Set((&PsStockMvtReasonLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsStockMvtReasonLang{}).TableName(), "name"), +} diff --git a/app/model/dbmodel/ps_store.go b/app/model/dbmodel/ps_store.go new file mode 100644 index 0000000..2570725 --- /dev/null +++ b/app/model/dbmodel/ps_store.go @@ -0,0 +1,62 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsStore = "ps_store" + +// PsStore mapped from table +type PsStore struct { + IDStore int32 `gorm:"column:id_store;primaryKey;autoIncrement:true" json:"id_store"` + IDCountry int32 `gorm:"column:id_country;not null" json:"id_country"` + IDState *int32 `gorm:"column:id_state" json:"id_state"` + City string `gorm:"column:city;not null" json:"city"` + Postcode string `gorm:"column:postcode;not null" json:"postcode"` + Latitude *float64 `gorm:"column:latitude" json:"latitude"` + Longitude *float64 `gorm:"column:longitude" json:"longitude"` + Phone *string `gorm:"column:phone" json:"phone"` + Fax *string `gorm:"column:fax" json:"fax"` + Email *string `gorm:"column:email" json:"email"` + Active bool `gorm:"column:active;not null" json:"active"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` +} + +// TableName PsStore's table name +func (*PsStore) TableName() string { + return TableNamePsStore +} + +var PsStoreCols = struct { + IDStore gormcol.Field + IDCountry gormcol.Field + IDState gormcol.Field + City gormcol.Field + Postcode gormcol.Field + Latitude gormcol.Field + Longitude gormcol.Field + Phone gormcol.Field + Fax gormcol.Field + Email gormcol.Field + Active gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDStore: gormcol.Field{}.Set((&PsStore{}).TableName(), "id_store"), + IDCountry: gormcol.Field{}.Set((&PsStore{}).TableName(), "id_country"), + IDState: gormcol.Field{}.Set((&PsStore{}).TableName(), "id_state"), + City: gormcol.Field{}.Set((&PsStore{}).TableName(), "city"), + Postcode: gormcol.Field{}.Set((&PsStore{}).TableName(), "postcode"), + Latitude: gormcol.Field{}.Set((&PsStore{}).TableName(), "latitude"), + Longitude: gormcol.Field{}.Set((&PsStore{}).TableName(), "longitude"), + Phone: gormcol.Field{}.Set((&PsStore{}).TableName(), "phone"), + Fax: gormcol.Field{}.Set((&PsStore{}).TableName(), "fax"), + Email: gormcol.Field{}.Set((&PsStore{}).TableName(), "email"), + Active: gormcol.Field{}.Set((&PsStore{}).TableName(), "active"), + DateAdd: gormcol.Field{}.Set((&PsStore{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsStore{}).TableName(), "date_upd"), +} diff --git a/app/model/dbmodel/ps_store_lang.go b/app/model/dbmodel/ps_store_lang.go new file mode 100644 index 0000000..7395e1b --- /dev/null +++ b/app/model/dbmodel/ps_store_lang.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsStoreLang = "ps_store_lang" + +// PsStoreLang mapped from table +type PsStoreLang struct { + IDStore int32 `gorm:"column:id_store;primaryKey" json:"id_store"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Name string `gorm:"column:name;not null" json:"name"` + Address1 string `gorm:"column:address1;not null" json:"address1"` + Address2 *string `gorm:"column:address2" json:"address2"` + Hours *string `gorm:"column:hours" json:"hours"` + Note *string `gorm:"column:note" json:"note"` +} + +// TableName PsStoreLang's table name +func (*PsStoreLang) TableName() string { + return TableNamePsStoreLang +} + +var PsStoreLangCols = struct { + IDStore gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Address1 gormcol.Field + Address2 gormcol.Field + Hours gormcol.Field + Note gormcol.Field +}{ + IDStore: gormcol.Field{}.Set((&PsStoreLang{}).TableName(), "id_store"), + IDLang: gormcol.Field{}.Set((&PsStoreLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsStoreLang{}).TableName(), "name"), + Address1: gormcol.Field{}.Set((&PsStoreLang{}).TableName(), "address1"), + Address2: gormcol.Field{}.Set((&PsStoreLang{}).TableName(), "address2"), + Hours: gormcol.Field{}.Set((&PsStoreLang{}).TableName(), "hours"), + Note: gormcol.Field{}.Set((&PsStoreLang{}).TableName(), "note"), +} diff --git a/app/model/prestadb/ps_store_shop.go b/app/model/dbmodel/ps_store_shop.go similarity index 54% rename from app/model/prestadb/ps_store_shop.go rename to app/model/dbmodel/ps_store_shop.go index 30d1327..81374a8 100644 --- a/app/model/prestadb/ps_store_shop.go +++ b/app/model/dbmodel/ps_store_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsStoreShop = "ps_store_shop" @@ -16,3 +16,11 @@ type PsStoreShop struct { func (*PsStoreShop) TableName() string { return TableNamePsStoreShop } + +var PsStoreShopCols = struct { + IDStore gormcol.Field + IDShop gormcol.Field +}{ + IDStore: gormcol.Field{}.Set((&PsStoreShop{}).TableName(), "id_store"), + IDShop: gormcol.Field{}.Set((&PsStoreShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_supplier.go b/app/model/dbmodel/ps_supplier.go similarity index 50% rename from app/model/prestadb/ps_supplier.go rename to app/model/dbmodel/ps_supplier.go index 8ac59c0..d9d8735 100644 --- a/app/model/prestadb/ps_supplier.go +++ b/app/model/dbmodel/ps_supplier.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -23,3 +22,17 @@ type PsSupplier struct { func (*PsSupplier) TableName() string { return TableNamePsSupplier } + +var PsSupplierCols = struct { + IDSupplier gormcol.Field + Name gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + Active gormcol.Field +}{ + IDSupplier: gormcol.Field{}.Set((&PsSupplier{}).TableName(), "id_supplier"), + Name: gormcol.Field{}.Set((&PsSupplier{}).TableName(), "name"), + DateAdd: gormcol.Field{}.Set((&PsSupplier{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsSupplier{}).TableName(), "date_upd"), + Active: gormcol.Field{}.Set((&PsSupplier{}).TableName(), "active"), +} diff --git a/app/model/dbmodel/ps_supplier_lang.go b/app/model/dbmodel/ps_supplier_lang.go new file mode 100644 index 0000000..54d3bd7 --- /dev/null +++ b/app/model/dbmodel/ps_supplier_lang.go @@ -0,0 +1,38 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsSupplierLang = "ps_supplier_lang" + +// PsSupplierLang mapped from table +type PsSupplierLang struct { + IDSupplier int32 `gorm:"column:id_supplier;primaryKey" json:"id_supplier"` + IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` + Description *string `gorm:"column:description" json:"description"` + MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` + MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` + MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` +} + +// TableName PsSupplierLang's table name +func (*PsSupplierLang) TableName() string { + return TableNamePsSupplierLang +} + +var PsSupplierLangCols = struct { + IDSupplier gormcol.Field + IDLang gormcol.Field + Description gormcol.Field + MetaTitle gormcol.Field + MetaKeywords gormcol.Field + MetaDescription gormcol.Field +}{ + IDSupplier: gormcol.Field{}.Set((&PsSupplierLang{}).TableName(), "id_supplier"), + IDLang: gormcol.Field{}.Set((&PsSupplierLang{}).TableName(), "id_lang"), + Description: gormcol.Field{}.Set((&PsSupplierLang{}).TableName(), "description"), + MetaTitle: gormcol.Field{}.Set((&PsSupplierLang{}).TableName(), "meta_title"), + MetaKeywords: gormcol.Field{}.Set((&PsSupplierLang{}).TableName(), "meta_keywords"), + MetaDescription: gormcol.Field{}.Set((&PsSupplierLang{}).TableName(), "meta_description"), +} diff --git a/app/model/prestadb/ps_supplier_shop.go b/app/model/dbmodel/ps_supplier_shop.go similarity index 55% rename from app/model/prestadb/ps_supplier_shop.go rename to app/model/dbmodel/ps_supplier_shop.go index fc0f7c7..96e7d12 100644 --- a/app/model/prestadb/ps_supplier_shop.go +++ b/app/model/dbmodel/ps_supplier_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSupplierShop = "ps_supplier_shop" @@ -16,3 +16,11 @@ type PsSupplierShop struct { func (*PsSupplierShop) TableName() string { return TableNamePsSupplierShop } + +var PsSupplierShopCols = struct { + IDSupplier gormcol.Field + IDShop gormcol.Field +}{ + IDSupplier: gormcol.Field{}.Set((&PsSupplierShop{}).TableName(), "id_supplier"), + IDShop: gormcol.Field{}.Set((&PsSupplierShop{}).TableName(), "id_shop"), +} diff --git a/app/model/dbmodel/ps_supply_order.go b/app/model/dbmodel/ps_supply_order.go new file mode 100644 index 0000000..98f6946 --- /dev/null +++ b/app/model/dbmodel/ps_supply_order.go @@ -0,0 +1,80 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import ( + "git.ma-al.com/goc_marek/gormcol" + "time" +) + +const TableNamePsSupplyOrder = "ps_supply_order" + +// PsSupplyOrder mapped from table +type PsSupplyOrder struct { + IDSupplyOrder int32 `gorm:"column:id_supply_order;primaryKey;autoIncrement:true" json:"id_supply_order"` + IDSupplier int32 `gorm:"column:id_supplier;not null;index:id_supplier,priority:1" json:"id_supplier"` + SupplierName string `gorm:"column:supplier_name;not null" json:"supplier_name"` + IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` + IDWarehouse int32 `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"` + IDSupplyOrderState int32 `gorm:"column:id_supply_order_state;not null" json:"id_supply_order_state"` + IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` + IDRefCurrency int32 `gorm:"column:id_ref_currency;not null" json:"id_ref_currency"` + Reference string `gorm:"column:reference;not null;index:reference,priority:1" json:"reference"` + DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` + DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` + DateDeliveryExpected *time.Time `gorm:"column:date_delivery_expected" json:"date_delivery_expected"` + TotalTe *float64 `gorm:"column:total_te;default:0.000000" json:"total_te"` + TotalWithDiscountTe *float64 `gorm:"column:total_with_discount_te;default:0.000000" json:"total_with_discount_te"` + TotalTax *float64 `gorm:"column:total_tax;default:0.000000" json:"total_tax"` + TotalTi *float64 `gorm:"column:total_ti;default:0.000000" json:"total_ti"` + DiscountRate *float64 `gorm:"column:discount_rate;default:0.000000" json:"discount_rate"` + DiscountValueTe *float64 `gorm:"column:discount_value_te;default:0.000000" json:"discount_value_te"` + IsTemplate *bool `gorm:"column:is_template" json:"is_template"` +} + +// TableName PsSupplyOrder's table name +func (*PsSupplyOrder) TableName() string { + return TableNamePsSupplyOrder +} + +var PsSupplyOrderCols = struct { + IDSupplyOrder gormcol.Field + IDSupplier gormcol.Field + SupplierName gormcol.Field + IDLang gormcol.Field + IDWarehouse gormcol.Field + IDSupplyOrderState gormcol.Field + IDCurrency gormcol.Field + IDRefCurrency gormcol.Field + Reference gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field + DateDeliveryExpected gormcol.Field + TotalTe gormcol.Field + TotalWithDiscountTe gormcol.Field + TotalTax gormcol.Field + TotalTi gormcol.Field + DiscountRate gormcol.Field + DiscountValueTe gormcol.Field + IsTemplate gormcol.Field +}{ + IDSupplyOrder: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_supply_order"), + IDSupplier: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_supplier"), + SupplierName: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "supplier_name"), + IDLang: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_lang"), + IDWarehouse: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_warehouse"), + IDSupplyOrderState: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_supply_order_state"), + IDCurrency: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_currency"), + IDRefCurrency: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "id_ref_currency"), + Reference: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "reference"), + DateAdd: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "date_upd"), + DateDeliveryExpected: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "date_delivery_expected"), + TotalTe: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_te"), + TotalWithDiscountTe: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_with_discount_te"), + TotalTax: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_tax"), + TotalTi: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "total_ti"), + DiscountRate: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "discount_rate"), + DiscountValueTe: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "discount_value_te"), + IsTemplate: gormcol.Field{}.Set((&PsSupplyOrder{}).TableName(), "is_template"), +} diff --git a/app/model/dbmodel/ps_supply_order_detail.go b/app/model/dbmodel/ps_supply_order_detail.go new file mode 100644 index 0000000..b0f10b0 --- /dev/null +++ b/app/model/dbmodel/ps_supply_order_detail.go @@ -0,0 +1,92 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsSupplyOrderDetail = "ps_supply_order_detail" + +// PsSupplyOrderDetail mapped from table +type PsSupplyOrderDetail struct { + IDSupplyOrderDetail int32 `gorm:"column:id_supply_order_detail;primaryKey;autoIncrement:true" json:"id_supply_order_detail"` + IDSupplyOrder int32 `gorm:"column:id_supply_order;not null;index:id_supply_order,priority:1" json:"id_supply_order"` + IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` + IDProduct int32 `gorm:"column:id_product;not null;index:id_product_product_attribute,priority:1;index:id_supply_order,priority:2" json:"id_product"` + IDProductAttribute int32 `gorm:"column:id_product_attribute;not null;index:id_product_attribute,priority:1;index:id_product_product_attribute,priority:2" json:"id_product_attribute"` + Reference string `gorm:"column:reference;not null" json:"reference"` + SupplierReference string `gorm:"column:supplier_reference;not null" json:"supplier_reference"` + Name string `gorm:"column:name;not null" json:"name"` + Ean13 *string `gorm:"column:ean13" json:"ean13"` + Isbn *string `gorm:"column:isbn" json:"isbn"` + Upc *string `gorm:"column:upc" json:"upc"` + ExchangeRate *float64 `gorm:"column:exchange_rate;default:0.000000" json:"exchange_rate"` + UnitPriceTe *float64 `gorm:"column:unit_price_te;default:0.000000" json:"unit_price_te"` + QuantityExpected int32 `gorm:"column:quantity_expected;not null" json:"quantity_expected"` + QuantityReceived int32 `gorm:"column:quantity_received;not null" json:"quantity_received"` + PriceTe *float64 `gorm:"column:price_te;default:0.000000" json:"price_te"` + DiscountRate *float64 `gorm:"column:discount_rate;default:0.000000" json:"discount_rate"` + DiscountValueTe *float64 `gorm:"column:discount_value_te;default:0.000000" json:"discount_value_te"` + PriceWithDiscountTe *float64 `gorm:"column:price_with_discount_te;default:0.000000" json:"price_with_discount_te"` + TaxRate *float64 `gorm:"column:tax_rate;default:0.000000" json:"tax_rate"` + TaxValue *float64 `gorm:"column:tax_value;default:0.000000" json:"tax_value"` + PriceTi *float64 `gorm:"column:price_ti;default:0.000000" json:"price_ti"` + TaxValueWithOrderDiscount *float64 `gorm:"column:tax_value_with_order_discount;default:0.000000" json:"tax_value_with_order_discount"` + PriceWithOrderDiscountTe *float64 `gorm:"column:price_with_order_discount_te;default:0.000000" json:"price_with_order_discount_te"` +} + +// TableName PsSupplyOrderDetail's table name +func (*PsSupplyOrderDetail) TableName() string { + return TableNamePsSupplyOrderDetail +} + +var PsSupplyOrderDetailCols = struct { + IDSupplyOrderDetail gormcol.Field + IDSupplyOrder gormcol.Field + IDCurrency gormcol.Field + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + Reference gormcol.Field + SupplierReference gormcol.Field + Name gormcol.Field + Ean13 gormcol.Field + Isbn gormcol.Field + Upc gormcol.Field + ExchangeRate gormcol.Field + UnitPriceTe gormcol.Field + QuantityExpected gormcol.Field + QuantityReceived gormcol.Field + PriceTe gormcol.Field + DiscountRate gormcol.Field + DiscountValueTe gormcol.Field + PriceWithDiscountTe gormcol.Field + TaxRate gormcol.Field + TaxValue gormcol.Field + PriceTi gormcol.Field + TaxValueWithOrderDiscount gormcol.Field + PriceWithOrderDiscountTe gormcol.Field +}{ + IDSupplyOrderDetail: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "id_supply_order_detail"), + IDSupplyOrder: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "id_supply_order"), + IDCurrency: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "id_currency"), + IDProduct: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "id_product_attribute"), + Reference: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "reference"), + SupplierReference: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "supplier_reference"), + Name: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "name"), + Ean13: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "ean13"), + Isbn: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "isbn"), + Upc: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "upc"), + ExchangeRate: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "exchange_rate"), + UnitPriceTe: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "unit_price_te"), + QuantityExpected: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "quantity_expected"), + QuantityReceived: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "quantity_received"), + PriceTe: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "price_te"), + DiscountRate: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "discount_rate"), + DiscountValueTe: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "discount_value_te"), + PriceWithDiscountTe: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "price_with_discount_te"), + TaxRate: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "tax_rate"), + TaxValue: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "tax_value"), + PriceTi: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "price_ti"), + TaxValueWithOrderDiscount: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "tax_value_with_order_discount"), + PriceWithOrderDiscountTe: gormcol.Field{}.Set((&PsSupplyOrderDetail{}).TableName(), "price_with_order_discount_te"), +} diff --git a/app/model/prestadb/ps_supply_order_history.go b/app/model/dbmodel/ps_supply_order_history.go similarity index 51% rename from app/model/prestadb/ps_supply_order_history.go rename to app/model/dbmodel/ps_supply_order_history.go index c59132f..a795c1f 100644 --- a/app/model/prestadb/ps_supply_order_history.go +++ b/app/model/dbmodel/ps_supply_order_history.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -25,3 +24,21 @@ type PsSupplyOrderHistory struct { func (*PsSupplyOrderHistory) TableName() string { return TableNamePsSupplyOrderHistory } + +var PsSupplyOrderHistoryCols = struct { + IDSupplyOrderHistory gormcol.Field + IDSupplyOrder gormcol.Field + IDEmployee gormcol.Field + EmployeeLastname gormcol.Field + EmployeeFirstname gormcol.Field + IDState gormcol.Field + DateAdd gormcol.Field +}{ + IDSupplyOrderHistory: gormcol.Field{}.Set((&PsSupplyOrderHistory{}).TableName(), "id_supply_order_history"), + IDSupplyOrder: gormcol.Field{}.Set((&PsSupplyOrderHistory{}).TableName(), "id_supply_order"), + IDEmployee: gormcol.Field{}.Set((&PsSupplyOrderHistory{}).TableName(), "id_employee"), + EmployeeLastname: gormcol.Field{}.Set((&PsSupplyOrderHistory{}).TableName(), "employee_lastname"), + EmployeeFirstname: gormcol.Field{}.Set((&PsSupplyOrderHistory{}).TableName(), "employee_firstname"), + IDState: gormcol.Field{}.Set((&PsSupplyOrderHistory{}).TableName(), "id_state"), + DateAdd: gormcol.Field{}.Set((&PsSupplyOrderHistory{}).TableName(), "date_add"), +} diff --git a/app/model/prestadb/ps_supply_order_receipt_history.go b/app/model/dbmodel/ps_supply_order_receipt_history.go similarity index 51% rename from app/model/prestadb/ps_supply_order_receipt_history.go rename to app/model/dbmodel/ps_supply_order_receipt_history.go index ee26f80..397d8df 100644 --- a/app/model/prestadb/ps_supply_order_receipt_history.go +++ b/app/model/dbmodel/ps_supply_order_receipt_history.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -26,3 +25,23 @@ type PsSupplyOrderReceiptHistory struct { func (*PsSupplyOrderReceiptHistory) TableName() string { return TableNamePsSupplyOrderReceiptHistory } + +var PsSupplyOrderReceiptHistoryCols = struct { + IDSupplyOrderReceiptHistory gormcol.Field + IDSupplyOrderDetail gormcol.Field + IDEmployee gormcol.Field + EmployeeLastname gormcol.Field + EmployeeFirstname gormcol.Field + IDSupplyOrderState gormcol.Field + Quantity gormcol.Field + DateAdd gormcol.Field +}{ + IDSupplyOrderReceiptHistory: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "id_supply_order_receipt_history"), + IDSupplyOrderDetail: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "id_supply_order_detail"), + IDEmployee: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "id_employee"), + EmployeeLastname: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "employee_lastname"), + EmployeeFirstname: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "employee_firstname"), + IDSupplyOrderState: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "id_supply_order_state"), + Quantity: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "quantity"), + DateAdd: gormcol.Field{}.Set((&PsSupplyOrderReceiptHistory{}).TableName(), "date_add"), +} diff --git a/app/model/dbmodel/ps_supply_order_state.go b/app/model/dbmodel/ps_supply_order_state.go new file mode 100644 index 0000000..6172232 --- /dev/null +++ b/app/model/dbmodel/ps_supply_order_state.go @@ -0,0 +1,41 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsSupplyOrderState = "ps_supply_order_state" + +// PsSupplyOrderState mapped from table +type PsSupplyOrderState struct { + IDSupplyOrderState int32 `gorm:"column:id_supply_order_state;primaryKey;autoIncrement:true" json:"id_supply_order_state"` + DeliveryNote bool `gorm:"column:delivery_note;not null" json:"delivery_note"` + Editable bool `gorm:"column:editable;not null" json:"editable"` + ReceiptState bool `gorm:"column:receipt_state;not null" json:"receipt_state"` + PendingReceipt bool `gorm:"column:pending_receipt;not null" json:"pending_receipt"` + Enclosed bool `gorm:"column:enclosed;not null" json:"enclosed"` + Color *string `gorm:"column:color" json:"color"` +} + +// TableName PsSupplyOrderState's table name +func (*PsSupplyOrderState) TableName() string { + return TableNamePsSupplyOrderState +} + +var PsSupplyOrderStateCols = struct { + IDSupplyOrderState gormcol.Field + DeliveryNote gormcol.Field + Editable gormcol.Field + ReceiptState gormcol.Field + PendingReceipt gormcol.Field + Enclosed gormcol.Field + Color gormcol.Field +}{ + IDSupplyOrderState: gormcol.Field{}.Set((&PsSupplyOrderState{}).TableName(), "id_supply_order_state"), + DeliveryNote: gormcol.Field{}.Set((&PsSupplyOrderState{}).TableName(), "delivery_note"), + Editable: gormcol.Field{}.Set((&PsSupplyOrderState{}).TableName(), "editable"), + ReceiptState: gormcol.Field{}.Set((&PsSupplyOrderState{}).TableName(), "receipt_state"), + PendingReceipt: gormcol.Field{}.Set((&PsSupplyOrderState{}).TableName(), "pending_receipt"), + Enclosed: gormcol.Field{}.Set((&PsSupplyOrderState{}).TableName(), "enclosed"), + Color: gormcol.Field{}.Set((&PsSupplyOrderState{}).TableName(), "color"), +} diff --git a/app/model/prestadb/ps_supply_order_state_lang.go b/app/model/dbmodel/ps_supply_order_state_lang.go similarity index 53% rename from app/model/prestadb/ps_supply_order_state_lang.go rename to app/model/dbmodel/ps_supply_order_state_lang.go index 2702fbe..f648986 100644 --- a/app/model/prestadb/ps_supply_order_state_lang.go +++ b/app/model/dbmodel/ps_supply_order_state_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsSupplyOrderStateLang = "ps_supply_order_state_lang" @@ -17,3 +17,13 @@ type PsSupplyOrderStateLang struct { func (*PsSupplyOrderStateLang) TableName() string { return TableNamePsSupplyOrderStateLang } + +var PsSupplyOrderStateLangCols = struct { + IDSupplyOrderState gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDSupplyOrderState: gormcol.Field{}.Set((&PsSupplyOrderStateLang{}).TableName(), "id_supply_order_state"), + IDLang: gormcol.Field{}.Set((&PsSupplyOrderStateLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsSupplyOrderStateLang{}).TableName(), "name"), +} diff --git a/app/model/dbmodel/ps_tab.go b/app/model/dbmodel/ps_tab.go new file mode 100644 index 0000000..007ae3c --- /dev/null +++ b/app/model/dbmodel/ps_tab.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsTab = "ps_tab" + +// PsTab mapped from table +type PsTab struct { + IDTab int32 `gorm:"column:id_tab;primaryKey;autoIncrement:true" json:"id_tab"` + IDParent int32 `gorm:"column:id_parent;not null" json:"id_parent"` + Position int32 `gorm:"column:position;not null" json:"position"` + Module *string `gorm:"column:module" json:"module"` + ClassName *string `gorm:"column:class_name" json:"class_name"` + Active bool `gorm:"column:active;not null" json:"active"` + HideHostMode bool `gorm:"column:hide_host_mode;not null" json:"hide_host_mode"` + Icon *string `gorm:"column:icon" json:"icon"` +} + +// TableName PsTab's table name +func (*PsTab) TableName() string { + return TableNamePsTab +} + +var PsTabCols = struct { + IDTab gormcol.Field + IDParent gormcol.Field + Position gormcol.Field + Module gormcol.Field + ClassName gormcol.Field + Active gormcol.Field + HideHostMode gormcol.Field + Icon gormcol.Field +}{ + IDTab: gormcol.Field{}.Set((&PsTab{}).TableName(), "id_tab"), + IDParent: gormcol.Field{}.Set((&PsTab{}).TableName(), "id_parent"), + Position: gormcol.Field{}.Set((&PsTab{}).TableName(), "position"), + Module: gormcol.Field{}.Set((&PsTab{}).TableName(), "module"), + ClassName: gormcol.Field{}.Set((&PsTab{}).TableName(), "class_name"), + Active: gormcol.Field{}.Set((&PsTab{}).TableName(), "active"), + HideHostMode: gormcol.Field{}.Set((&PsTab{}).TableName(), "hide_host_mode"), + Icon: gormcol.Field{}.Set((&PsTab{}).TableName(), "icon"), +} diff --git a/app/model/prestadb/ps_tab_advice.go b/app/model/dbmodel/ps_tab_advice.go similarity index 53% rename from app/model/prestadb/ps_tab_advice.go rename to app/model/dbmodel/ps_tab_advice.go index de3383b..8a82dc3 100644 --- a/app/model/prestadb/ps_tab_advice.go +++ b/app/model/dbmodel/ps_tab_advice.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTabAdvice = "ps_tab_advice" @@ -16,3 +16,11 @@ type PsTabAdvice struct { func (*PsTabAdvice) TableName() string { return TableNamePsTabAdvice } + +var PsTabAdviceCols = struct { + IDTab gormcol.Field + IDAdvice gormcol.Field +}{ + IDTab: gormcol.Field{}.Set((&PsTabAdvice{}).TableName(), "id_tab"), + IDAdvice: gormcol.Field{}.Set((&PsTabAdvice{}).TableName(), "id_advice"), +} diff --git a/app/model/prestadb/ps_tab_lang.go b/app/model/dbmodel/ps_tab_lang.go similarity index 54% rename from app/model/prestadb/ps_tab_lang.go rename to app/model/dbmodel/ps_tab_lang.go index 4f34e2e..b806899 100644 --- a/app/model/prestadb/ps_tab_lang.go +++ b/app/model/dbmodel/ps_tab_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTabLang = "ps_tab_lang" @@ -17,3 +17,13 @@ type PsTabLang struct { func (*PsTabLang) TableName() string { return TableNamePsTabLang } + +var PsTabLangCols = struct { + IDTab gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDTab: gormcol.Field{}.Set((&PsTabLang{}).TableName(), "id_tab"), + IDLang: gormcol.Field{}.Set((&PsTabLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsTabLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_tab_module_preference.go b/app/model/dbmodel/ps_tab_module_preference.go similarity index 56% rename from app/model/prestadb/ps_tab_module_preference.go rename to app/model/dbmodel/ps_tab_module_preference.go index f0238a3..4fbf719 100644 --- a/app/model/prestadb/ps_tab_module_preference.go +++ b/app/model/dbmodel/ps_tab_module_preference.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTabModulePreference = "ps_tab_module_preference" @@ -18,3 +18,15 @@ type PsTabModulePreference struct { func (*PsTabModulePreference) TableName() string { return TableNamePsTabModulePreference } + +var PsTabModulePreferenceCols = struct { + IDTabModulePreference gormcol.Field + IDEmployee gormcol.Field + IDTab gormcol.Field + Module gormcol.Field +}{ + IDTabModulePreference: gormcol.Field{}.Set((&PsTabModulePreference{}).TableName(), "id_tab_module_preference"), + IDEmployee: gormcol.Field{}.Set((&PsTabModulePreference{}).TableName(), "id_employee"), + IDTab: gormcol.Field{}.Set((&PsTabModulePreference{}).TableName(), "id_tab"), + Module: gormcol.Field{}.Set((&PsTabModulePreference{}).TableName(), "module"), +} diff --git a/app/model/prestadb/ps_tag.go b/app/model/dbmodel/ps_tag.go similarity index 53% rename from app/model/prestadb/ps_tag.go rename to app/model/dbmodel/ps_tag.go index 9c4d454..43c0146 100644 --- a/app/model/prestadb/ps_tag.go +++ b/app/model/dbmodel/ps_tag.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTag = "ps_tag" @@ -17,3 +17,13 @@ type PsTag struct { func (*PsTag) TableName() string { return TableNamePsTag } + +var PsTagCols = struct { + IDTag gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDTag: gormcol.Field{}.Set((&PsTag{}).TableName(), "id_tag"), + IDLang: gormcol.Field{}.Set((&PsTag{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsTag{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_tag_count.go b/app/model/dbmodel/ps_tag_count.go similarity index 52% rename from app/model/prestadb/ps_tag_count.go rename to app/model/dbmodel/ps_tag_count.go index 4f3c03d..4b0777c 100644 --- a/app/model/prestadb/ps_tag_count.go +++ b/app/model/dbmodel/ps_tag_count.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTagCount = "ps_tag_count" @@ -19,3 +19,17 @@ type PsTagCount struct { func (*PsTagCount) TableName() string { return TableNamePsTagCount } + +var PsTagCountCols = struct { + IDGroup gormcol.Field + IDTag gormcol.Field + IDLang gormcol.Field + IDShop gormcol.Field + Counter gormcol.Field +}{ + IDGroup: gormcol.Field{}.Set((&PsTagCount{}).TableName(), "id_group"), + IDTag: gormcol.Field{}.Set((&PsTagCount{}).TableName(), "id_tag"), + IDLang: gormcol.Field{}.Set((&PsTagCount{}).TableName(), "id_lang"), + IDShop: gormcol.Field{}.Set((&PsTagCount{}).TableName(), "id_shop"), + Counter: gormcol.Field{}.Set((&PsTagCount{}).TableName(), "counter"), +} diff --git a/app/model/dbmodel/ps_tax.go b/app/model/dbmodel/ps_tax.go new file mode 100644 index 0000000..b991744 --- /dev/null +++ b/app/model/dbmodel/ps_tax.go @@ -0,0 +1,32 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsTax = "ps_tax" + +// PsTax mapped from table +type PsTax struct { + IDTax int32 `gorm:"column:id_tax;primaryKey;autoIncrement:true" json:"id_tax"` + Rate float64 `gorm:"column:rate;not null" json:"rate"` + Active bool `gorm:"column:active;not null;default:1" json:"active"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` +} + +// TableName PsTax's table name +func (*PsTax) TableName() string { + return TableNamePsTax +} + +var PsTaxCols = struct { + IDTax gormcol.Field + Rate gormcol.Field + Active gormcol.Field + Deleted gormcol.Field +}{ + IDTax: gormcol.Field{}.Set((&PsTax{}).TableName(), "id_tax"), + Rate: gormcol.Field{}.Set((&PsTax{}).TableName(), "rate"), + Active: gormcol.Field{}.Set((&PsTax{}).TableName(), "active"), + Deleted: gormcol.Field{}.Set((&PsTax{}).TableName(), "deleted"), +} diff --git a/app/model/prestadb/ps_tax_lang.go b/app/model/dbmodel/ps_tax_lang.go similarity index 50% rename from app/model/prestadb/ps_tax_lang.go rename to app/model/dbmodel/ps_tax_lang.go index 0c98088..006f645 100644 --- a/app/model/prestadb/ps_tax_lang.go +++ b/app/model/dbmodel/ps_tax_lang.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTaxLang = "ps_tax_lang" @@ -17,3 +17,13 @@ type PsTaxLang struct { func (*PsTaxLang) TableName() string { return TableNamePsTaxLang } + +var PsTaxLangCols = struct { + IDTax gormcol.Field + IDLang gormcol.Field + Name gormcol.Field +}{ + IDTax: gormcol.Field{}.Set((&PsTaxLang{}).TableName(), "id_tax"), + IDLang: gormcol.Field{}.Set((&PsTaxLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsTaxLang{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_tax_rule.go b/app/model/dbmodel/ps_tax_rule.go similarity index 52% rename from app/model/prestadb/ps_tax_rule.go rename to app/model/dbmodel/ps_tax_rule.go index d3cc9bb..137e6df 100644 --- a/app/model/prestadb/ps_tax_rule.go +++ b/app/model/dbmodel/ps_tax_rule.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTaxRule = "ps_tax_rule" @@ -23,3 +23,25 @@ type PsTaxRule struct { func (*PsTaxRule) TableName() string { return TableNamePsTaxRule } + +var PsTaxRuleCols = struct { + IDTaxRule gormcol.Field + IDTaxRulesGroup gormcol.Field + IDCountry gormcol.Field + IDState gormcol.Field + ZipcodeFrom gormcol.Field + ZipcodeTo gormcol.Field + IDTax gormcol.Field + Behavior gormcol.Field + Description gormcol.Field +}{ + IDTaxRule: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "id_tax_rule"), + IDTaxRulesGroup: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "id_tax_rules_group"), + IDCountry: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "id_country"), + IDState: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "id_state"), + ZipcodeFrom: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "zipcode_from"), + ZipcodeTo: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "zipcode_to"), + IDTax: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "id_tax"), + Behavior: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "behavior"), + Description: gormcol.Field{}.Set((&PsTaxRule{}).TableName(), "description"), +} diff --git a/app/model/prestadb/ps_tax_rules_group.go b/app/model/dbmodel/ps_tax_rules_group.go similarity index 51% rename from app/model/prestadb/ps_tax_rules_group.go rename to app/model/dbmodel/ps_tax_rules_group.go index 51bff1b..d13e9fb 100644 --- a/app/model/prestadb/ps_tax_rules_group.go +++ b/app/model/dbmodel/ps_tax_rules_group.go @@ -1,10 +1,9 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel import ( + "git.ma-al.com/goc_marek/gormcol" "time" ) @@ -24,3 +23,19 @@ type PsTaxRulesGroup struct { func (*PsTaxRulesGroup) TableName() string { return TableNamePsTaxRulesGroup } + +var PsTaxRulesGroupCols = struct { + IDTaxRulesGroup gormcol.Field + Name gormcol.Field + Active gormcol.Field + Deleted gormcol.Field + DateAdd gormcol.Field + DateUpd gormcol.Field +}{ + IDTaxRulesGroup: gormcol.Field{}.Set((&PsTaxRulesGroup{}).TableName(), "id_tax_rules_group"), + Name: gormcol.Field{}.Set((&PsTaxRulesGroup{}).TableName(), "name"), + Active: gormcol.Field{}.Set((&PsTaxRulesGroup{}).TableName(), "active"), + Deleted: gormcol.Field{}.Set((&PsTaxRulesGroup{}).TableName(), "deleted"), + DateAdd: gormcol.Field{}.Set((&PsTaxRulesGroup{}).TableName(), "date_add"), + DateUpd: gormcol.Field{}.Set((&PsTaxRulesGroup{}).TableName(), "date_upd"), +} diff --git a/app/model/prestadb/ps_tax_rules_group_shop.go b/app/model/dbmodel/ps_tax_rules_group_shop.go similarity index 56% rename from app/model/prestadb/ps_tax_rules_group_shop.go rename to app/model/dbmodel/ps_tax_rules_group_shop.go index 865ae4a..28a1f11 100644 --- a/app/model/prestadb/ps_tax_rules_group_shop.go +++ b/app/model/dbmodel/ps_tax_rules_group_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTaxRulesGroupShop = "ps_tax_rules_group_shop" @@ -16,3 +16,11 @@ type PsTaxRulesGroupShop struct { func (*PsTaxRulesGroupShop) TableName() string { return TableNamePsTaxRulesGroupShop } + +var PsTaxRulesGroupShopCols = struct { + IDTaxRulesGroup gormcol.Field + IDShop gormcol.Field +}{ + IDTaxRulesGroup: gormcol.Field{}.Set((&PsTaxRulesGroupShop{}).TableName(), "id_tax_rules_group"), + IDShop: gormcol.Field{}.Set((&PsTaxRulesGroupShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_timezone.go b/app/model/dbmodel/ps_timezone.go similarity index 54% rename from app/model/prestadb/ps_timezone.go rename to app/model/dbmodel/ps_timezone.go index 66be37a..04188b6 100644 --- a/app/model/prestadb/ps_timezone.go +++ b/app/model/dbmodel/ps_timezone.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTimezone = "ps_timezone" @@ -16,3 +16,11 @@ type PsTimezone struct { func (*PsTimezone) TableName() string { return TableNamePsTimezone } + +var PsTimezoneCols = struct { + IDTimezone gormcol.Field + Name gormcol.Field +}{ + IDTimezone: gormcol.Field{}.Set((&PsTimezone{}).TableName(), "id_timezone"), + Name: gormcol.Field{}.Set((&PsTimezone{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_translation.go b/app/model/dbmodel/ps_translation.go similarity index 50% rename from app/model/prestadb/ps_translation.go rename to app/model/dbmodel/ps_translation.go index dc7a673..7d13f2f 100644 --- a/app/model/prestadb/ps_translation.go +++ b/app/model/dbmodel/ps_translation.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsTranslation = "ps_translation" @@ -20,3 +20,19 @@ type PsTranslation struct { func (*PsTranslation) TableName() string { return TableNamePsTranslation } + +var PsTranslationCols = struct { + IDTranslation gormcol.Field + IDLang gormcol.Field + Key gormcol.Field + Translation gormcol.Field + Domain gormcol.Field + Theme gormcol.Field +}{ + IDTranslation: gormcol.Field{}.Set((&PsTranslation{}).TableName(), "id_translation"), + IDLang: gormcol.Field{}.Set((&PsTranslation{}).TableName(), "id_lang"), + Key: gormcol.Field{}.Set((&PsTranslation{}).TableName(), "key"), + Translation: gormcol.Field{}.Set((&PsTranslation{}).TableName(), "translation"), + Domain: gormcol.Field{}.Set((&PsTranslation{}).TableName(), "domain"), + Theme: gormcol.Field{}.Set((&PsTranslation{}).TableName(), "theme"), +} diff --git a/app/model/prestadb/ps_unit.go b/app/model/dbmodel/ps_unit.go similarity index 52% rename from app/model/prestadb/ps_unit.go rename to app/model/dbmodel/ps_unit.go index 805604d..0a45840 100644 --- a/app/model/prestadb/ps_unit.go +++ b/app/model/dbmodel/ps_unit.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsUnit = "ps_unit" @@ -16,3 +16,11 @@ type PsUnit struct { func (*PsUnit) TableName() string { return TableNamePsUnit } + +var PsUnitCols = struct { + IDUnit gormcol.Field + Precision gormcol.Field +}{ + IDUnit: gormcol.Field{}.Set((&PsUnit{}).TableName(), "id_unit"), + Precision: gormcol.Field{}.Set((&PsUnit{}).TableName(), "precision"), +} diff --git a/app/model/dbmodel/ps_unit_lang.go b/app/model/dbmodel/ps_unit_lang.go new file mode 100644 index 0000000..76045b1 --- /dev/null +++ b/app/model/dbmodel/ps_unit_lang.go @@ -0,0 +1,32 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsUnitLang = "ps_unit_lang" + +// PsUnitLang mapped from table +type PsUnitLang struct { + IDUnit int32 `gorm:"column:id_unit;not null" json:"id_unit"` + IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` + Name string `gorm:"column:name;not null" json:"name"` + Symbol string `gorm:"column:symbol;not null" json:"symbol"` +} + +// TableName PsUnitLang's table name +func (*PsUnitLang) TableName() string { + return TableNamePsUnitLang +} + +var PsUnitLangCols = struct { + IDUnit gormcol.Field + IDLang gormcol.Field + Name gormcol.Field + Symbol gormcol.Field +}{ + IDUnit: gormcol.Field{}.Set((&PsUnitLang{}).TableName(), "id_unit"), + IDLang: gormcol.Field{}.Set((&PsUnitLang{}).TableName(), "id_lang"), + Name: gormcol.Field{}.Set((&PsUnitLang{}).TableName(), "name"), + Symbol: gormcol.Field{}.Set((&PsUnitLang{}).TableName(), "symbol"), +} diff --git a/app/model/dbmodel/ps_warehouse.go b/app/model/dbmodel/ps_warehouse.go new file mode 100644 index 0000000..22c6034 --- /dev/null +++ b/app/model/dbmodel/ps_warehouse.go @@ -0,0 +1,44 @@ +// Code generated by gormcol. DO NOT EDIT. + +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" + +const TableNamePsWarehouse = "ps_warehouse" + +// PsWarehouse mapped from table +type PsWarehouse struct { + IDWarehouse int32 `gorm:"column:id_warehouse;primaryKey;autoIncrement:true" json:"id_warehouse"` + IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` + IDAddress int32 `gorm:"column:id_address;not null" json:"id_address"` + IDEmployee int32 `gorm:"column:id_employee;not null" json:"id_employee"` + Reference *string `gorm:"column:reference" json:"reference"` + Name string `gorm:"column:name;not null" json:"name"` + ManagementType string `gorm:"column:management_type;not null;default:WA" json:"management_type"` + Deleted bool `gorm:"column:deleted;not null" json:"deleted"` +} + +// TableName PsWarehouse's table name +func (*PsWarehouse) TableName() string { + return TableNamePsWarehouse +} + +var PsWarehouseCols = struct { + IDWarehouse gormcol.Field + IDCurrency gormcol.Field + IDAddress gormcol.Field + IDEmployee gormcol.Field + Reference gormcol.Field + Name gormcol.Field + ManagementType gormcol.Field + Deleted gormcol.Field +}{ + IDWarehouse: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "id_warehouse"), + IDCurrency: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "id_currency"), + IDAddress: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "id_address"), + IDEmployee: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "id_employee"), + Reference: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "reference"), + Name: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "name"), + ManagementType: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "management_type"), + Deleted: gormcol.Field{}.Set((&PsWarehouse{}).TableName(), "deleted"), +} diff --git a/app/model/prestadb/ps_warehouse_carrier.go b/app/model/dbmodel/ps_warehouse_carrier.go similarity index 57% rename from app/model/prestadb/ps_warehouse_carrier.go rename to app/model/dbmodel/ps_warehouse_carrier.go index 3f0bff6..7f9afc1 100644 --- a/app/model/prestadb/ps_warehouse_carrier.go +++ b/app/model/dbmodel/ps_warehouse_carrier.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsWarehouseCarrier = "ps_warehouse_carrier" @@ -16,3 +16,11 @@ type PsWarehouseCarrier struct { func (*PsWarehouseCarrier) TableName() string { return TableNamePsWarehouseCarrier } + +var PsWarehouseCarrierCols = struct { + IDCarrier gormcol.Field + IDWarehouse gormcol.Field +}{ + IDCarrier: gormcol.Field{}.Set((&PsWarehouseCarrier{}).TableName(), "id_carrier"), + IDWarehouse: gormcol.Field{}.Set((&PsWarehouseCarrier{}).TableName(), "id_warehouse"), +} diff --git a/app/model/prestadb/ps_warehouse_product_location.go b/app/model/dbmodel/ps_warehouse_product_location.go similarity index 54% rename from app/model/prestadb/ps_warehouse_product_location.go rename to app/model/dbmodel/ps_warehouse_product_location.go index 7e4301d..7470c1b 100644 --- a/app/model/prestadb/ps_warehouse_product_location.go +++ b/app/model/dbmodel/ps_warehouse_product_location.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsWarehouseProductLocation = "ps_warehouse_product_location" @@ -19,3 +19,17 @@ type PsWarehouseProductLocation struct { func (*PsWarehouseProductLocation) TableName() string { return TableNamePsWarehouseProductLocation } + +var PsWarehouseProductLocationCols = struct { + IDWarehouseProductLocation gormcol.Field + IDProduct gormcol.Field + IDProductAttribute gormcol.Field + IDWarehouse gormcol.Field + Location gormcol.Field +}{ + IDWarehouseProductLocation: gormcol.Field{}.Set((&PsWarehouseProductLocation{}).TableName(), "id_warehouse_product_location"), + IDProduct: gormcol.Field{}.Set((&PsWarehouseProductLocation{}).TableName(), "id_product"), + IDProductAttribute: gormcol.Field{}.Set((&PsWarehouseProductLocation{}).TableName(), "id_product_attribute"), + IDWarehouse: gormcol.Field{}.Set((&PsWarehouseProductLocation{}).TableName(), "id_warehouse"), + Location: gormcol.Field{}.Set((&PsWarehouseProductLocation{}).TableName(), "location"), +} diff --git a/app/model/prestadb/ps_warehouse_shop.go b/app/model/dbmodel/ps_warehouse_shop.go similarity index 57% rename from app/model/prestadb/ps_warehouse_shop.go rename to app/model/dbmodel/ps_warehouse_shop.go index 3fb883f..b3ceae6 100644 --- a/app/model/prestadb/ps_warehouse_shop.go +++ b/app/model/dbmodel/ps_warehouse_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsWarehouseShop = "ps_warehouse_shop" @@ -16,3 +16,11 @@ type PsWarehouseShop struct { func (*PsWarehouseShop) TableName() string { return TableNamePsWarehouseShop } + +var PsWarehouseShopCols = struct { + IDShop gormcol.Field + IDWarehouse gormcol.Field +}{ + IDShop: gormcol.Field{}.Set((&PsWarehouseShop{}).TableName(), "id_shop"), + IDWarehouse: gormcol.Field{}.Set((&PsWarehouseShop{}).TableName(), "id_warehouse"), +} diff --git a/app/model/prestadb/ps_web_browser.go b/app/model/dbmodel/ps_web_browser.go similarity index 54% rename from app/model/prestadb/ps_web_browser.go rename to app/model/dbmodel/ps_web_browser.go index 63739cd..5cb7054 100644 --- a/app/model/prestadb/ps_web_browser.go +++ b/app/model/dbmodel/ps_web_browser.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsWebBrowser = "ps_web_browser" @@ -16,3 +16,11 @@ type PsWebBrowser struct { func (*PsWebBrowser) TableName() string { return TableNamePsWebBrowser } + +var PsWebBrowserCols = struct { + IDWebBrowser gormcol.Field + Name gormcol.Field +}{ + IDWebBrowser: gormcol.Field{}.Set((&PsWebBrowser{}).TableName(), "id_web_browser"), + Name: gormcol.Field{}.Set((&PsWebBrowser{}).TableName(), "name"), +} diff --git a/app/model/prestadb/ps_webservice_account.go b/app/model/dbmodel/ps_webservice_account.go similarity index 50% rename from app/model/prestadb/ps_webservice_account.go rename to app/model/dbmodel/ps_webservice_account.go index 5fa1c3b..d2d4913 100644 --- a/app/model/prestadb/ps_webservice_account.go +++ b/app/model/dbmodel/ps_webservice_account.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsWebserviceAccount = "ps_webservice_account" @@ -21,3 +21,21 @@ type PsWebserviceAccount struct { func (*PsWebserviceAccount) TableName() string { return TableNamePsWebserviceAccount } + +var PsWebserviceAccountCols = struct { + IDWebserviceAccount gormcol.Field + Key gormcol.Field + Description gormcol.Field + ClassName gormcol.Field + IsModule gormcol.Field + ModuleName gormcol.Field + Active gormcol.Field +}{ + IDWebserviceAccount: gormcol.Field{}.Set((&PsWebserviceAccount{}).TableName(), "id_webservice_account"), + Key: gormcol.Field{}.Set((&PsWebserviceAccount{}).TableName(), "key"), + Description: gormcol.Field{}.Set((&PsWebserviceAccount{}).TableName(), "description"), + ClassName: gormcol.Field{}.Set((&PsWebserviceAccount{}).TableName(), "class_name"), + IsModule: gormcol.Field{}.Set((&PsWebserviceAccount{}).TableName(), "is_module"), + ModuleName: gormcol.Field{}.Set((&PsWebserviceAccount{}).TableName(), "module_name"), + Active: gormcol.Field{}.Set((&PsWebserviceAccount{}).TableName(), "active"), +} diff --git a/app/model/prestadb/ps_webservice_account_shop.go b/app/model/dbmodel/ps_webservice_account_shop.go similarity index 57% rename from app/model/prestadb/ps_webservice_account_shop.go rename to app/model/dbmodel/ps_webservice_account_shop.go index d07de13..41fb6fc 100644 --- a/app/model/prestadb/ps_webservice_account_shop.go +++ b/app/model/dbmodel/ps_webservice_account_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsWebserviceAccountShop = "ps_webservice_account_shop" @@ -16,3 +16,11 @@ type PsWebserviceAccountShop struct { func (*PsWebserviceAccountShop) TableName() string { return TableNamePsWebserviceAccountShop } + +var PsWebserviceAccountShopCols = struct { + IDWebserviceAccount gormcol.Field + IDShop gormcol.Field +}{ + IDWebserviceAccount: gormcol.Field{}.Set((&PsWebserviceAccountShop{}).TableName(), "id_webservice_account"), + IDShop: gormcol.Field{}.Set((&PsWebserviceAccountShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_webservice_permission.go b/app/model/dbmodel/ps_webservice_permission.go similarity index 58% rename from app/model/prestadb/ps_webservice_permission.go rename to app/model/dbmodel/ps_webservice_permission.go index 910c6ef..232eac5 100644 --- a/app/model/prestadb/ps_webservice_permission.go +++ b/app/model/dbmodel/ps_webservice_permission.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsWebservicePermission = "ps_webservice_permission" @@ -18,3 +18,15 @@ type PsWebservicePermission struct { func (*PsWebservicePermission) TableName() string { return TableNamePsWebservicePermission } + +var PsWebservicePermissionCols = struct { + IDWebservicePermission gormcol.Field + Resource gormcol.Field + Method gormcol.Field + IDWebserviceAccount gormcol.Field +}{ + IDWebservicePermission: gormcol.Field{}.Set((&PsWebservicePermission{}).TableName(), "id_webservice_permission"), + Resource: gormcol.Field{}.Set((&PsWebservicePermission{}).TableName(), "resource"), + Method: gormcol.Field{}.Set((&PsWebservicePermission{}).TableName(), "method"), + IDWebserviceAccount: gormcol.Field{}.Set((&PsWebservicePermission{}).TableName(), "id_webservice_account"), +} diff --git a/app/model/prestadb/ps_zone.go b/app/model/dbmodel/ps_zone.go similarity index 50% rename from app/model/prestadb/ps_zone.go rename to app/model/dbmodel/ps_zone.go index e6643d1..fbb82a6 100644 --- a/app/model/prestadb/ps_zone.go +++ b/app/model/dbmodel/ps_zone.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsZone = "ps_zone" @@ -17,3 +17,13 @@ type PsZone struct { func (*PsZone) TableName() string { return TableNamePsZone } + +var PsZoneCols = struct { + IDZone gormcol.Field + Name gormcol.Field + Active gormcol.Field +}{ + IDZone: gormcol.Field{}.Set((&PsZone{}).TableName(), "id_zone"), + Name: gormcol.Field{}.Set((&PsZone{}).TableName(), "name"), + Active: gormcol.Field{}.Set((&PsZone{}).TableName(), "active"), +} diff --git a/app/model/prestadb/ps_zone_shop.go b/app/model/dbmodel/ps_zone_shop.go similarity index 54% rename from app/model/prestadb/ps_zone_shop.go rename to app/model/dbmodel/ps_zone_shop.go index 8dcdd87..d74e8f4 100644 --- a/app/model/prestadb/ps_zone_shop.go +++ b/app/model/dbmodel/ps_zone_shop.go @@ -1,8 +1,8 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gormcol. DO NOT EDIT. -package prestadb +package dbmodel + +import "git.ma-al.com/goc_marek/gormcol" const TableNamePsZoneShop = "ps_zone_shop" @@ -16,3 +16,11 @@ type PsZoneShop struct { func (*PsZoneShop) TableName() string { return TableNamePsZoneShop } + +var PsZoneShopCols = struct { + IDZone gormcol.Field + IDShop gormcol.Field +}{ + IDZone: gormcol.Field{}.Set((&PsZoneShop{}).TableName(), "id_zone"), + IDShop: gormcol.Field{}.Set((&PsZoneShop{}).TableName(), "id_shop"), +} diff --git a/app/model/prestadb/ps_address.go b/app/model/prestadb/ps_address.go deleted file mode 100644 index 94dcdba..0000000 --- a/app/model/prestadb/ps_address.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsAddress = "ps_address" - -// PsAddress mapped from table -type PsAddress struct { - IDAddress int32 `gorm:"column:id_address;primaryKey;autoIncrement:true" json:"id_address"` - IDCountry int32 `gorm:"column:id_country;not null;index:id_country,priority:1" json:"id_country"` - IDState *int32 `gorm:"column:id_state;index:id_state,priority:1" json:"id_state"` - IDCustomer int32 `gorm:"column:id_customer;not null;index:address_customer,priority:1" json:"id_customer"` - IDManufacturer int32 `gorm:"column:id_manufacturer;not null;index:id_manufacturer,priority:1" json:"id_manufacturer"` - IDSupplier int32 `gorm:"column:id_supplier;not null;index:id_supplier,priority:1" json:"id_supplier"` - IDWarehouse int32 `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"` - Alias string `gorm:"column:alias;not null" json:"alias"` - Company *string `gorm:"column:company" json:"company"` - Lastname string `gorm:"column:lastname;not null" json:"lastname"` - Firstname string `gorm:"column:firstname;not null" json:"firstname"` - Address1 string `gorm:"column:address1;not null" json:"address1"` - Address2 *string `gorm:"column:address2" json:"address2"` - Postcode *string `gorm:"column:postcode" json:"postcode"` - City string `gorm:"column:city;not null" json:"city"` - Other *string `gorm:"column:other" json:"other"` - Phone *string `gorm:"column:phone" json:"phone"` - PhoneMobile *string `gorm:"column:phone_mobile" json:"phone_mobile"` - VatNumber *string `gorm:"column:vat_number" json:"vat_number"` - Dni *string `gorm:"column:dni" json:"dni"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` - Active bool `gorm:"column:active;not null;default:1" json:"active"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` - IsNovat int32 `gorm:"column:is_novat;not null" json:"is_novat"` -} - -// TableName PsAddress's table name -func (*PsAddress) TableName() string { - return TableNamePsAddress -} diff --git a/app/model/prestadb/ps_advice.go b/app/model/prestadb/ps_advice.go deleted file mode 100644 index aa1f0d0..0000000 --- a/app/model/prestadb/ps_advice.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsAdvice = "ps_advice" - -// PsAdvice mapped from table -type PsAdvice struct { - IDAdvice int32 `gorm:"column:id_advice;primaryKey;autoIncrement:true" json:"id_advice"` - IDPsAdvice int32 `gorm:"column:id_ps_advice;not null" json:"id_ps_advice"` - IDTab int32 `gorm:"column:id_tab;not null" json:"id_tab"` - IdsTab *string `gorm:"column:ids_tab" json:"ids_tab"` - Validated bool `gorm:"column:validated;not null" json:"validated"` - Hide bool `gorm:"column:hide;not null" json:"hide"` - Location string `gorm:"column:location;not null" json:"location"` - Selector *string `gorm:"column:selector" json:"selector"` - StartDay int32 `gorm:"column:start_day;not null" json:"start_day"` - StopDay int32 `gorm:"column:stop_day;not null" json:"stop_day"` - Weight *int32 `gorm:"column:weight;default:1" json:"weight"` -} - -// TableName PsAdvice's table name -func (*PsAdvice) TableName() string { - return TableNamePsAdvice -} diff --git a/app/model/prestadb/ps_attachment.go b/app/model/prestadb/ps_attachment.go deleted file mode 100644 index c7e49a9..0000000 --- a/app/model/prestadb/ps_attachment.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsAttachment = "ps_attachment" - -// PsAttachment mapped from table -type PsAttachment struct { - IDAttachment int32 `gorm:"column:id_attachment;primaryKey;autoIncrement:true" json:"id_attachment"` - File string `gorm:"column:file;not null" json:"file"` - FileName string `gorm:"column:file_name;not null" json:"file_name"` - FileSize int64 `gorm:"column:file_size;not null" json:"file_size"` - Mime string `gorm:"column:mime;not null" json:"mime"` -} - -// TableName PsAttachment's table name -func (*PsAttachment) TableName() string { - return TableNamePsAttachment -} diff --git a/app/model/prestadb/ps_badge.go b/app/model/prestadb/ps_badge.go deleted file mode 100644 index 5c8d9ae..0000000 --- a/app/model/prestadb/ps_badge.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsBadge = "ps_badge" - -// PsBadge mapped from table -type PsBadge struct { - IDBadge int32 `gorm:"column:id_badge;primaryKey;autoIncrement:true" json:"id_badge"` - IDPsBadge int32 `gorm:"column:id_ps_badge;not null" json:"id_ps_badge"` - Type string `gorm:"column:type;not null" json:"type"` - IDGroup int32 `gorm:"column:id_group;not null" json:"id_group"` - GroupPosition int32 `gorm:"column:group_position;not null" json:"group_position"` - Scoring int32 `gorm:"column:scoring;not null" json:"scoring"` - Awb *int32 `gorm:"column:awb" json:"awb"` - Validated bool `gorm:"column:validated;not null" json:"validated"` -} - -// TableName PsBadge's table name -func (*PsBadge) TableName() string { - return TableNamePsBadge -} diff --git a/app/model/prestadb/ps_badge_lang.go b/app/model/prestadb/ps_badge_lang.go deleted file mode 100644 index 4e1874d..0000000 --- a/app/model/prestadb/ps_badge_lang.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsBadgeLang = "ps_badge_lang" - -// PsBadgeLang mapped from table -type PsBadgeLang struct { - IDBadge int32 `gorm:"column:id_badge;primaryKey" json:"id_badge"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Name *string `gorm:"column:name" json:"name"` - Description *string `gorm:"column:description" json:"description"` - GroupName *string `gorm:"column:group_name" json:"group_name"` -} - -// TableName PsBadgeLang's table name -func (*PsBadgeLang) TableName() string { - return TableNamePsBadgeLang -} diff --git a/app/model/prestadb/ps_carrier.go b/app/model/prestadb/ps_carrier.go deleted file mode 100644 index 15fb93b..0000000 --- a/app/model/prestadb/ps_carrier.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCarrier = "ps_carrier" - -// PsCarrier mapped from table -type PsCarrier struct { - IDCarrier int32 `gorm:"column:id_carrier;primaryKey;autoIncrement:true" json:"id_carrier"` - IDReference int32 `gorm:"column:id_reference;not null;index:reference,priority:1" json:"id_reference"` - IDTaxRulesGroup *int32 `gorm:"column:id_tax_rules_group;index:id_tax_rules_group,priority:1" json:"id_tax_rules_group"` - Name string `gorm:"column:name;not null" json:"name"` - URL *string `gorm:"column:url" json:"url"` - Active bool `gorm:"column:active;not null;index:deleted,priority:2;index:reference,priority:3" json:"active"` - Deleted bool `gorm:"column:deleted;not null;index:deleted,priority:1;index:reference,priority:2" json:"deleted"` - ShippingHandling bool `gorm:"column:shipping_handling;not null;default:1" json:"shipping_handling"` - RangeBehavior bool `gorm:"column:range_behavior;not null" json:"range_behavior"` - IsModule bool `gorm:"column:is_module;not null" json:"is_module"` - IsFree bool `gorm:"column:is_free;not null" json:"is_free"` - ShippingExternal bool `gorm:"column:shipping_external;not null" json:"shipping_external"` - NeedRange bool `gorm:"column:need_range;not null" json:"need_range"` - ExternalModuleName *string `gorm:"column:external_module_name" json:"external_module_name"` - ShippingMethod int32 `gorm:"column:shipping_method;not null" json:"shipping_method"` - Position int32 `gorm:"column:position;not null" json:"position"` - MaxWidth *int32 `gorm:"column:max_width" json:"max_width"` - MaxHeight *int32 `gorm:"column:max_height" json:"max_height"` - MaxDepth *int32 `gorm:"column:max_depth" json:"max_depth"` - MaxWeight *float64 `gorm:"column:max_weight;default:0.000000" json:"max_weight"` - Grade *int32 `gorm:"column:grade" json:"grade"` -} - -// TableName PsCarrier's table name -func (*PsCarrier) TableName() string { - return TableNamePsCarrier -} diff --git a/app/model/prestadb/ps_category_lang.go b/app/model/prestadb/ps_category_lang.go deleted file mode 100644 index 9798500..0000000 --- a/app/model/prestadb/ps_category_lang.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCategoryLang = "ps_category_lang" - -// PsCategoryLang mapped from table -type PsCategoryLang struct { - IDCategory int32 `gorm:"column:id_category;primaryKey" json:"id_category"` - IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Name string `gorm:"column:name;not null;index:category_name,priority:1" json:"name"` - Description *string `gorm:"column:description" json:"description"` - LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` - MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` - MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` -} - -// TableName PsCategoryLang's table name -func (*PsCategoryLang) TableName() string { - return TableNamePsCategoryLang -} diff --git a/app/model/prestadb/ps_cms.go b/app/model/prestadb/ps_cms.go deleted file mode 100644 index cc13161..0000000 --- a/app/model/prestadb/ps_cms.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCm = "ps_cms" - -// PsCm mapped from table -type PsCm struct { - IDCms int32 `gorm:"column:id_cms;primaryKey;autoIncrement:true" json:"id_cms"` - IDCmsCategory int32 `gorm:"column:id_cms_category;not null" json:"id_cms_category"` - Position int32 `gorm:"column:position;not null" json:"position"` - Active bool `gorm:"column:active;not null" json:"active"` - Indexation bool `gorm:"column:indexation;not null;default:1" json:"indexation"` -} - -// TableName PsCm's table name -func (*PsCm) TableName() string { - return TableNamePsCm -} diff --git a/app/model/prestadb/ps_cms_category_lang.go b/app/model/prestadb/ps_cms_category_lang.go deleted file mode 100644 index af61212..0000000 --- a/app/model/prestadb/ps_cms_category_lang.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCmsCategoryLang = "ps_cms_category_lang" - -// PsCmsCategoryLang mapped from table -type PsCmsCategoryLang struct { - IDCmsCategory int32 `gorm:"column:id_cms_category;primaryKey" json:"id_cms_category"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` - Name string `gorm:"column:name;not null;index:category_name,priority:1" json:"name"` - Description *string `gorm:"column:description" json:"description"` - LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` - MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` - MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` -} - -// TableName PsCmsCategoryLang's table name -func (*PsCmsCategoryLang) TableName() string { - return TableNamePsCmsCategoryLang -} diff --git a/app/model/prestadb/ps_cms_lang.go b/app/model/prestadb/ps_cms_lang.go deleted file mode 100644 index b9cff9f..0000000 --- a/app/model/prestadb/ps_cms_lang.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCmsLang = "ps_cms_lang" - -// PsCmsLang mapped from table -type PsCmsLang struct { - IDCms int32 `gorm:"column:id_cms;primaryKey" json:"id_cms"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` - MetaTitle string `gorm:"column:meta_title;not null" json:"meta_title"` - HeadSeoTitle *string `gorm:"column:head_seo_title" json:"head_seo_title"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` - MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` - Content *string `gorm:"column:content" json:"content"` - LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` -} - -// TableName PsCmsLang's table name -func (*PsCmsLang) TableName() string { - return TableNamePsCmsLang -} diff --git a/app/model/prestadb/ps_cms_role_lang.go b/app/model/prestadb/ps_cms_role_lang.go deleted file mode 100644 index c133921..0000000 --- a/app/model/prestadb/ps_cms_role_lang.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCmsRoleLang = "ps_cms_role_lang" - -// PsCmsRoleLang mapped from table -type PsCmsRoleLang struct { - IDCmsRole int32 `gorm:"column:id_cms_role;primaryKey" json:"id_cms_role"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"` - Name *string `gorm:"column:name" json:"name"` -} - -// TableName PsCmsRoleLang's table name -func (*PsCmsRoleLang) TableName() string { - return TableNamePsCmsRoleLang -} diff --git a/app/model/prestadb/ps_condition.go b/app/model/prestadb/ps_condition.go deleted file mode 100644 index fb4b9f5..0000000 --- a/app/model/prestadb/ps_condition.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsCondition = "ps_condition" - -// PsCondition mapped from table -type PsCondition struct { - IDCondition int32 `gorm:"column:id_condition;primaryKey;autoIncrement:true" json:"id_condition"` - IDPsCondition int32 `gorm:"column:id_ps_condition;primaryKey" json:"id_ps_condition"` - Type string `gorm:"column:type;not null" json:"type"` - Request *string `gorm:"column:request" json:"request"` - Operator *string `gorm:"column:operator" json:"operator"` - Value *string `gorm:"column:value" json:"value"` - Result *string `gorm:"column:result" json:"result"` - CalculationType *string `gorm:"column:calculation_type" json:"calculation_type"` - CalculationDetail *string `gorm:"column:calculation_detail" json:"calculation_detail"` - Validated bool `gorm:"column:validated;not null" json:"validated"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsCondition's table name -func (*PsCondition) TableName() string { - return TableNamePsCondition -} diff --git a/app/model/prestadb/ps_contact_lang.go b/app/model/prestadb/ps_contact_lang.go deleted file mode 100644 index 96bb079..0000000 --- a/app/model/prestadb/ps_contact_lang.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsContactLang = "ps_contact_lang" - -// PsContactLang mapped from table -type PsContactLang struct { - IDContact int32 `gorm:"column:id_contact;primaryKey" json:"id_contact"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Name string `gorm:"column:name;not null" json:"name"` - Description *string `gorm:"column:description" json:"description"` -} - -// TableName PsContactLang's table name -func (*PsContactLang) TableName() string { - return TableNamePsContactLang -} diff --git a/app/model/prestadb/ps_currency.go b/app/model/prestadb/ps_currency.go deleted file mode 100644 index b83634d..0000000 --- a/app/model/prestadb/ps_currency.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCurrency = "ps_currency" - -// PsCurrency mapped from table -type PsCurrency struct { - IDCurrency int32 `gorm:"column:id_currency;primaryKey;autoIncrement:true" json:"id_currency"` - Name string `gorm:"column:name;not null" json:"name"` - IsoCode string `gorm:"column:iso_code;not null;index:currency_iso_code,priority:1;default:0" json:"iso_code"` - NumericIsoCode *string `gorm:"column:numeric_iso_code" json:"numeric_iso_code"` - Precision int32 `gorm:"column:precision;not null;default:6" json:"precision"` - ConversionRate float64 `gorm:"column:conversion_rate;not null" json:"conversion_rate"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` - Active bool `gorm:"column:active;not null;default:1" json:"active"` -} - -// TableName PsCurrency's table name -func (*PsCurrency) TableName() string { - return TableNamePsCurrency -} diff --git a/app/model/prestadb/ps_customer_message.go b/app/model/prestadb/ps_customer_message.go deleted file mode 100644 index 96e0109..0000000 --- a/app/model/prestadb/ps_customer_message.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsCustomerMessage = "ps_customer_message" - -// PsCustomerMessage mapped from table -type PsCustomerMessage struct { - IDCustomerMessage int32 `gorm:"column:id_customer_message;primaryKey;autoIncrement:true" json:"id_customer_message"` - IDCustomerThread *int32 `gorm:"column:id_customer_thread;index:id_customer_thread,priority:1" json:"id_customer_thread"` - IDEmployee *int32 `gorm:"column:id_employee;index:id_employee,priority:1" json:"id_employee"` - Message string `gorm:"column:message;not null" json:"message"` - FileName *string `gorm:"column:file_name" json:"file_name"` - IPAddress *string `gorm:"column:ip_address" json:"ip_address"` - UserAgent *string `gorm:"column:user_agent" json:"user_agent"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` - Private int32 `gorm:"column:private;not null" json:"private"` - Read bool `gorm:"column:read;not null" json:"read"` - Product *string `gorm:"column:product" json:"product"` -} - -// TableName PsCustomerMessage's table name -func (*PsCustomerMessage) TableName() string { - return TableNamePsCustomerMessage -} diff --git a/app/model/prestadb/ps_customized_data.go b/app/model/prestadb/ps_customized_data.go deleted file mode 100644 index b3df209..0000000 --- a/app/model/prestadb/ps_customized_data.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsCustomizedDatum = "ps_customized_data" - -// PsCustomizedDatum mapped from table -type PsCustomizedDatum struct { - IDCustomization int32 `gorm:"column:id_customization;primaryKey" json:"id_customization"` - Type bool `gorm:"column:type;primaryKey" json:"type"` - Index int32 `gorm:"column:index;primaryKey" json:"index"` - Value string `gorm:"column:value;not null" json:"value"` - IDModule int32 `gorm:"column:id_module;not null" json:"id_module"` - Price float64 `gorm:"column:price;not null;default:0.000000" json:"price"` - Weight float64 `gorm:"column:weight;not null;default:0.000000" json:"weight"` -} - -// TableName PsCustomizedDatum's table name -func (*PsCustomizedDatum) TableName() string { - return TableNamePsCustomizedDatum -} diff --git a/app/model/prestadb/ps_dpdpoland_package.go b/app/model/prestadb/ps_dpdpoland_package.go deleted file mode 100644 index f58e972..0000000 --- a/app/model/prestadb/ps_dpdpoland_package.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsDpdpolandPackage = "ps_dpdpoland_package" - -// PsDpdpolandPackage mapped from table -type PsDpdpolandPackage struct { - IDPackage int32 `gorm:"column:id_package;primaryKey;autoIncrement:true" json:"id_package"` - IDPackageWs int32 `gorm:"column:id_package_ws;not null;uniqueIndex:id_package_ws,priority:1" json:"id_package_ws"` - IDOrder int32 `gorm:"column:id_order;not null" json:"id_order"` - SessionID int32 `gorm:"column:sessionId;not null" json:"sessionId"` - SessionType string `gorm:"column:sessionType;not null" json:"sessionType"` - PayerNumber string `gorm:"column:payerNumber;not null" json:"payerNumber"` - IDAddressSender int32 `gorm:"column:id_address_sender;not null" json:"id_address_sender"` - IDAddressDelivery int32 `gorm:"column:id_address_delivery;not null" json:"id_address_delivery"` - CodAmount *float64 `gorm:"column:cod_amount" json:"cod_amount"` - DeclaredValueAmount *float64 `gorm:"column:declaredValue_amount" json:"declaredValue_amount"` - Ref1 *string `gorm:"column:ref1" json:"ref1"` - Ref2 *string `gorm:"column:ref2" json:"ref2"` - AdditionalInfo *string `gorm:"column:additional_info" json:"additional_info"` - LabelsPrinted bool `gorm:"column:labels_printed;not null" json:"labels_printed"` - IDSenderAddress int32 `gorm:"column:id_sender_address;not null" json:"id_sender_address"` - Cud bool `gorm:"column:cud;not null" json:"cud"` - Rod bool `gorm:"column:rod;not null" json:"rod"` - Dpde bool `gorm:"column:dpde;not null" json:"dpde"` - Dpdnd bool `gorm:"column:dpdnd;not null" json:"dpdnd"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsDpdpolandPackage's table name -func (*PsDpdpolandPackage) TableName() string { - return TableNamePsDpdpolandPackage -} diff --git a/app/model/prestadb/ps_dpdpoland_parcel.go b/app/model/prestadb/ps_dpdpoland_parcel.go deleted file mode 100644 index 0ca5c64..0000000 --- a/app/model/prestadb/ps_dpdpoland_parcel.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsDpdpolandParcel = "ps_dpdpoland_parcel" - -// PsDpdpolandParcel mapped from table -type PsDpdpolandParcel struct { - IDParcel int32 `gorm:"column:id_parcel;primaryKey" json:"id_parcel"` - IDPackageWs int32 `gorm:"column:id_package_ws;not null" json:"id_package_ws"` - Waybill string `gorm:"column:waybill;not null" json:"waybill"` - Content string `gorm:"column:content;not null" json:"content"` - Weight float64 `gorm:"column:weight;not null" json:"weight"` - Height float64 `gorm:"column:height;not null" json:"height"` - Length float64 `gorm:"column:length;not null" json:"length"` - Width float64 `gorm:"column:width;not null" json:"width"` - Number int32 `gorm:"column:number;not null" json:"number"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsDpdpolandParcel's table name -func (*PsDpdpolandParcel) TableName() string { - return TableNamePsDpdpolandParcel -} diff --git a/app/model/prestadb/ps_dpdpoland_parcel_product.go b/app/model/prestadb/ps_dpdpoland_parcel_product.go deleted file mode 100644 index f62ec92..0000000 --- a/app/model/prestadb/ps_dpdpoland_parcel_product.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsDpdpolandParcelProduct = "ps_dpdpoland_parcel_product" - -// PsDpdpolandParcelProduct mapped from table -type PsDpdpolandParcelProduct struct { - IDParcelProduct int32 `gorm:"column:id_parcel_product;primaryKey;autoIncrement:true" json:"id_parcel_product"` - IDParcel int32 `gorm:"column:id_parcel;not null" json:"id_parcel"` - IDProduct int32 `gorm:"column:id_product;not null" json:"id_product"` - IDProductAttribute int32 `gorm:"column:id_product_attribute;not null" json:"id_product_attribute"` - Name string `gorm:"column:name;not null" json:"name"` - Weight float64 `gorm:"column:weight;not null" json:"weight"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsDpdpolandParcelProduct's table name -func (*PsDpdpolandParcelProduct) TableName() string { - return TableNamePsDpdpolandParcelProduct -} diff --git a/app/model/prestadb/ps_dpdpoland_price_rule.go b/app/model/prestadb/ps_dpdpoland_price_rule.go deleted file mode 100644 index fd3d99f..0000000 --- a/app/model/prestadb/ps_dpdpoland_price_rule.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsDpdpolandPriceRule = "ps_dpdpoland_price_rule" - -// PsDpdpolandPriceRule mapped from table -type PsDpdpolandPriceRule struct { - IDCsv int32 `gorm:"column:id_csv;primaryKey;autoIncrement:true" json:"id_csv"` - IDShop int32 `gorm:"column:id_shop;not null" json:"id_shop"` - DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` - IsoCountry string `gorm:"column:iso_country;not null" json:"iso_country"` - PriceFrom float64 `gorm:"column:price_from;not null" json:"price_from"` - PriceTo float64 `gorm:"column:price_to;not null" json:"price_to"` - WeightFrom float64 `gorm:"column:weight_from;not null" json:"weight_from"` - WeightTo float64 `gorm:"column:weight_to;not null" json:"weight_to"` - ParcelPrice float32 `gorm:"column:parcel_price;not null" json:"parcel_price"` - CodPrice string `gorm:"column:cod_price;not null" json:"cod_price"` - IDCarrier string `gorm:"column:id_carrier;not null" json:"id_carrier"` -} - -// TableName PsDpdpolandPriceRule's table name -func (*PsDpdpolandPriceRule) TableName() string { - return TableNamePsDpdpolandPriceRule -} diff --git a/app/model/prestadb/ps_dpdpoland_sender_address.go b/app/model/prestadb/ps_dpdpoland_sender_address.go deleted file mode 100644 index 65be19d..0000000 --- a/app/model/prestadb/ps_dpdpoland_sender_address.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsDpdpolandSenderAddress = "ps_dpdpoland_sender_address" - -// PsDpdpolandSenderAddress mapped from table -type PsDpdpolandSenderAddress struct { - IDSenderAddress int32 `gorm:"column:id_sender_address;primaryKey;autoIncrement:true" json:"id_sender_address"` - Alias string `gorm:"column:alias;not null" json:"alias"` - Company string `gorm:"column:company;not null" json:"company"` - Name string `gorm:"column:name;not null" json:"name"` - Address string `gorm:"column:address;not null" json:"address"` - City string `gorm:"column:city;not null" json:"city"` - Email string `gorm:"column:email;not null" json:"email"` - Postcode string `gorm:"column:postcode;not null" json:"postcode"` - Phone string `gorm:"column:phone;not null" json:"phone"` - IDShop int32 `gorm:"column:id_shop;not null" json:"id_shop"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsDpdpolandSenderAddress's table name -func (*PsDpdpolandSenderAddress) TableName() string { - return TableNamePsDpdpolandSenderAddress -} diff --git a/app/model/prestadb/ps_employee.go b/app/model/prestadb/ps_employee.go deleted file mode 100644 index 2be07a6..0000000 --- a/app/model/prestadb/ps_employee.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsEmployee = "ps_employee" - -// PsEmployee mapped from table -type PsEmployee struct { - IDEmployee int32 `gorm:"column:id_employee;primaryKey;autoIncrement:true;index:id_employee_passwd,priority:1" json:"id_employee"` - IDProfile int32 `gorm:"column:id_profile;not null;index:id_profile,priority:1" json:"id_profile"` - IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` - Lastname string `gorm:"column:lastname;not null" json:"lastname"` - Firstname string `gorm:"column:firstname;not null" json:"firstname"` - Email string `gorm:"column:email;not null;index:employee_login,priority:1" json:"email"` - Passwd string `gorm:"column:passwd;not null;index:employee_login,priority:2;index:id_employee_passwd,priority:2" json:"passwd"` - LastPasswdGen time.Time `gorm:"column:last_passwd_gen;not null;default:current_timestamp()" json:"last_passwd_gen"` - StatsDateFrom *time.Time `gorm:"column:stats_date_from" json:"stats_date_from"` - StatsDateTo *time.Time `gorm:"column:stats_date_to" json:"stats_date_to"` - StatsCompareFrom *time.Time `gorm:"column:stats_compare_from" json:"stats_compare_from"` - StatsCompareTo *time.Time `gorm:"column:stats_compare_to" json:"stats_compare_to"` - StatsCompareOption int32 `gorm:"column:stats_compare_option;not null;default:1" json:"stats_compare_option"` - PreselectDateRange *string `gorm:"column:preselect_date_range" json:"preselect_date_range"` - BoColor *string `gorm:"column:bo_color" json:"bo_color"` - BoTheme *string `gorm:"column:bo_theme" json:"bo_theme"` - BoCSS *string `gorm:"column:bo_css" json:"bo_css"` - DefaultTab int32 `gorm:"column:default_tab;not null" json:"default_tab"` - BoWidth int32 `gorm:"column:bo_width;not null" json:"bo_width"` - BoMenu bool `gorm:"column:bo_menu;not null;default:1" json:"bo_menu"` - Active bool `gorm:"column:active;not null" json:"active"` - Optin bool `gorm:"column:optin;not null;default:1" json:"optin"` - IDLastOrder int32 `gorm:"column:id_last_order;not null" json:"id_last_order"` - IDLastCustomerMessage int32 `gorm:"column:id_last_customer_message;not null" json:"id_last_customer_message"` - IDLastCustomer int32 `gorm:"column:id_last_customer;not null" json:"id_last_customer"` - LastConnectionDate *time.Time `gorm:"column:last_connection_date" json:"last_connection_date"` - ResetPasswordToken *string `gorm:"column:reset_password_token" json:"reset_password_token"` - ResetPasswordValidity *time.Time `gorm:"column:reset_password_validity" json:"reset_password_validity"` -} - -// TableName PsEmployee's table name -func (*PsEmployee) TableName() string { - return TableNamePsEmployee -} diff --git a/app/model/prestadb/ps_guest.go b/app/model/prestadb/ps_guest.go deleted file mode 100644 index 6d1d2a5..0000000 --- a/app/model/prestadb/ps_guest.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsGuest = "ps_guest" - -// PsGuest mapped from table -type PsGuest struct { - IDGuest int32 `gorm:"column:id_guest;primaryKey;autoIncrement:true" json:"id_guest"` - IDOperatingSystem *int32 `gorm:"column:id_operating_system;index:id_operating_system,priority:1" json:"id_operating_system"` - IDWebBrowser *int32 `gorm:"column:id_web_browser;index:id_web_browser,priority:1" json:"id_web_browser"` - IDCustomer *int32 `gorm:"column:id_customer;index:id_customer,priority:1" json:"id_customer"` - Javascript *bool `gorm:"column:javascript" json:"javascript"` - ScreenResolutionX *int32 `gorm:"column:screen_resolution_x" json:"screen_resolution_x"` - ScreenResolutionY *int32 `gorm:"column:screen_resolution_y" json:"screen_resolution_y"` - ScreenColor *int32 `gorm:"column:screen_color" json:"screen_color"` - SunJava *bool `gorm:"column:sun_java" json:"sun_java"` - AdobeFlash *bool `gorm:"column:adobe_flash" json:"adobe_flash"` - AdobeDirector *bool `gorm:"column:adobe_director" json:"adobe_director"` - AppleQuicktime *bool `gorm:"column:apple_quicktime" json:"apple_quicktime"` - RealPlayer *bool `gorm:"column:real_player" json:"real_player"` - WindowsMedia *bool `gorm:"column:windows_media" json:"windows_media"` - AcceptLanguage *string `gorm:"column:accept_language" json:"accept_language"` - MobileTheme bool `gorm:"column:mobile_theme;not null" json:"mobile_theme"` -} - -// TableName PsGuest's table name -func (*PsGuest) TableName() string { - return TableNamePsGuest -} diff --git a/app/model/prestadb/ps_homeslider_slides_lang.go b/app/model/prestadb/ps_homeslider_slides_lang.go deleted file mode 100644 index d07b425..0000000 --- a/app/model/prestadb/ps_homeslider_slides_lang.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsHomesliderSlidesLang = "ps_homeslider_slides_lang" - -// PsHomesliderSlidesLang mapped from table -type PsHomesliderSlidesLang struct { - IDHomesliderSlides int32 `gorm:"column:id_homeslider_slides;primaryKey" json:"id_homeslider_slides"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Title string `gorm:"column:title;not null" json:"title"` - Description string `gorm:"column:description;not null" json:"description"` - Legend string `gorm:"column:legend;not null" json:"legend"` - URL string `gorm:"column:url;not null" json:"url"` - Image string `gorm:"column:image;not null" json:"image"` -} - -// TableName PsHomesliderSlidesLang's table name -func (*PsHomesliderSlidesLang) TableName() string { - return TableNamePsHomesliderSlidesLang -} diff --git a/app/model/prestadb/ps_image_type.go b/app/model/prestadb/ps_image_type.go deleted file mode 100644 index fc072da..0000000 --- a/app/model/prestadb/ps_image_type.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsImageType = "ps_image_type" - -// PsImageType mapped from table -type PsImageType struct { - IDImageType int32 `gorm:"column:id_image_type;primaryKey;autoIncrement:true" json:"id_image_type"` - Name string `gorm:"column:name;not null;index:image_type_name,priority:1" json:"name"` - Width int32 `gorm:"column:width;not null" json:"width"` - Height int32 `gorm:"column:height;not null" json:"height"` - Products bool `gorm:"column:products;not null;default:1" json:"products"` - Categories bool `gorm:"column:categories;not null;default:1" json:"categories"` - Manufacturers bool `gorm:"column:manufacturers;not null;default:1" json:"manufacturers"` - Suppliers bool `gorm:"column:suppliers;not null;default:1" json:"suppliers"` - Stores bool `gorm:"column:stores;not null;default:1" json:"stores"` -} - -// TableName PsImageType's table name -func (*PsImageType) TableName() string { - return TableNamePsImageType -} diff --git a/app/model/prestadb/ps_info_lang.go b/app/model/prestadb/ps_info_lang.go deleted file mode 100644 index fce53e1..0000000 --- a/app/model/prestadb/ps_info_lang.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsInfoLang = "ps_info_lang" - -// PsInfoLang mapped from table -type PsInfoLang struct { - IDInfo int32 `gorm:"column:id_info;primaryKey" json:"id_info"` - IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Text string `gorm:"column:text;not null" json:"text"` -} - -// TableName PsInfoLang's table name -func (*PsInfoLang) TableName() string { - return TableNamePsInfoLang -} diff --git a/app/model/prestadb/ps_inpost_cart_choice.go b/app/model/prestadb/ps_inpost_cart_choice.go deleted file mode 100644 index 02ab98f..0000000 --- a/app/model/prestadb/ps_inpost_cart_choice.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsInpostCartChoice = "ps_inpost_cart_choice" - -// PsInpostCartChoice mapped from table -type PsInpostCartChoice struct { - IDCart int32 `gorm:"column:id_cart;primaryKey" json:"id_cart"` - Service string `gorm:"column:service;not null" json:"service"` - Email *string `gorm:"column:email" json:"email"` - Phone *string `gorm:"column:phone" json:"phone"` - Point *string `gorm:"column:point" json:"point"` -} - -// TableName PsInpostCartChoice's table name -func (*PsInpostCartChoice) TableName() string { - return TableNamePsInpostCartChoice -} diff --git a/app/model/prestadb/ps_inpost_dispatch_point.go b/app/model/prestadb/ps_inpost_dispatch_point.go deleted file mode 100644 index a95913f..0000000 --- a/app/model/prestadb/ps_inpost_dispatch_point.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsInpostDispatchPoint = "ps_inpost_dispatch_point" - -// PsInpostDispatchPoint mapped from table -type PsInpostDispatchPoint struct { - IDDispatchPoint int32 `gorm:"column:id_dispatch_point;primaryKey;autoIncrement:true" json:"id_dispatch_point"` - Name string `gorm:"column:name;not null" json:"name"` - OfficeHours *string `gorm:"column:office_hours" json:"office_hours"` - Email *string `gorm:"column:email" json:"email"` - Phone *string `gorm:"column:phone" json:"phone"` - Street string `gorm:"column:street;not null" json:"street"` - BuildingNumber string `gorm:"column:building_number;not null" json:"building_number"` - PostCode string `gorm:"column:post_code;not null" json:"post_code"` - City string `gorm:"column:city;not null" json:"city"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` -} - -// TableName PsInpostDispatchPoint's table name -func (*PsInpostDispatchPoint) TableName() string { - return TableNamePsInpostDispatchPoint -} diff --git a/app/model/prestadb/ps_inpost_shipment.go b/app/model/prestadb/ps_inpost_shipment.go deleted file mode 100644 index ecf345e..0000000 --- a/app/model/prestadb/ps_inpost_shipment.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsInpostShipment = "ps_inpost_shipment" - -// PsInpostShipment mapped from table -type PsInpostShipment struct { - IDShipment int32 `gorm:"column:id_shipment;primaryKey;autoIncrement:true" json:"id_shipment"` - OrganizationID int32 `gorm:"column:organization_id;not null" json:"organization_id"` - IDOrder int32 `gorm:"column:id_order;not null;index:id_order,priority:1" json:"id_order"` - Sandbox bool `gorm:"column:sandbox;not null" json:"sandbox"` - ShipxShipmentID int32 `gorm:"column:shipx_shipment_id;not null" json:"shipx_shipment_id"` - Reference *string `gorm:"column:reference" json:"reference"` - Email string `gorm:"column:email;not null" json:"email"` - Phone string `gorm:"column:phone;not null" json:"phone"` - Service string `gorm:"column:service;not null" json:"service"` - CommercialProductIdentifier *string `gorm:"column:commercial_product_identifier" json:"commercial_product_identifier"` - SendingMethod *string `gorm:"column:sending_method" json:"sending_method"` - SendingPoint *string `gorm:"column:sending_point" json:"sending_point"` - WeekendDelivery *bool `gorm:"column:weekend_delivery" json:"weekend_delivery"` - Template *string `gorm:"column:template" json:"template"` - Dimensions *string `gorm:"column:dimensions" json:"dimensions"` - IDDispatchOrder *int32 `gorm:"column:id_dispatch_order;index:id_dispatch_order,priority:1" json:"id_dispatch_order"` - TargetPoint *string `gorm:"column:target_point" json:"target_point"` - CodAmount *float64 `gorm:"column:cod_amount" json:"cod_amount"` - InsuranceAmount *float64 `gorm:"column:insurance_amount" json:"insurance_amount"` - TrackingNumber *string `gorm:"column:tracking_number" json:"tracking_number"` - Status *string `gorm:"column:status" json:"status"` - Price *float64 `gorm:"column:price" json:"price"` - LabelPrinted bool `gorm:"column:label_printed;not null" json:"label_printed"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` -} - -// TableName PsInpostShipment's table name -func (*PsInpostShipment) TableName() string { - return TableNamePsInpostShipment -} diff --git a/app/model/prestadb/ps_lang.go b/app/model/prestadb/ps_lang.go deleted file mode 100644 index a23ff4b..0000000 --- a/app/model/prestadb/ps_lang.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsLang = "ps_lang" - -// PsLang mapped from table -type PsLang struct { - IDLang int32 `gorm:"column:id_lang;primaryKey;autoIncrement:true" json:"id_lang"` - Name string `gorm:"column:name;not null" json:"name"` - Active bool `gorm:"column:active;not null" json:"active"` - IsoCode string `gorm:"column:iso_code;not null" json:"iso_code"` - CodeLong string `gorm:"column:code_long;not null" json:"code_long"` - LanguageCode string `gorm:"column:language_code;not null" json:"language_code"` - Locale string `gorm:"column:locale;not null" json:"locale"` - DateFormatLite string `gorm:"column:date_format_lite;not null" json:"date_format_lite"` - DateFormatFull string `gorm:"column:date_format_full;not null" json:"date_format_full"` - IsRtl bool `gorm:"column:is_rtl;not null" json:"is_rtl"` -} - -// TableName PsLang's table name -func (*PsLang) TableName() string { - return TableNamePsLang -} diff --git a/app/model/prestadb/ps_link_block.go b/app/model/prestadb/ps_link_block.go deleted file mode 100644 index 189b1c0..0000000 --- a/app/model/prestadb/ps_link_block.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsLinkBlock = "ps_link_block" - -// PsLinkBlock mapped from table -type PsLinkBlock struct { - IDLinkBlock int32 `gorm:"column:id_link_block;primaryKey;autoIncrement:true" json:"id_link_block"` - IDHook *int32 `gorm:"column:id_hook" json:"id_hook"` - Position int32 `gorm:"column:position;not null" json:"position"` - Content *string `gorm:"column:content" json:"content"` -} - -// TableName PsLinkBlock's table name -func (*PsLinkBlock) TableName() string { - return TableNamePsLinkBlock -} diff --git a/app/model/prestadb/ps_log.go b/app/model/prestadb/ps_log.go deleted file mode 100644 index 0050be0..0000000 --- a/app/model/prestadb/ps_log.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsLog = "ps_log" - -// PsLog mapped from table -type PsLog struct { - IDLog int32 `gorm:"column:id_log;primaryKey;autoIncrement:true" json:"id_log"` - Severity bool `gorm:"column:severity;not null" json:"severity"` - ErrorCode *int32 `gorm:"column:error_code" json:"error_code"` - Message string `gorm:"column:message;not null" json:"message"` - ObjectType *string `gorm:"column:object_type" json:"object_type"` - ObjectID *int32 `gorm:"column:object_id" json:"object_id"` - IDEmployee *int32 `gorm:"column:id_employee" json:"id_employee"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsLog's table name -func (*PsLog) TableName() string { - return TableNamePsLog -} diff --git a/app/model/prestadb/ps_maal_cms_category_lang.go b/app/model/prestadb/ps_maal_cms_category_lang.go deleted file mode 100644 index 25e7aa0..0000000 --- a/app/model/prestadb/ps_maal_cms_category_lang.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsMaalCmsCategoryLang = "ps_maal_cms_category_lang" - -// PsMaalCmsCategoryLang mapped from table -type PsMaalCmsCategoryLang struct { - IDCategory int32 `gorm:"column:id_category;primaryKey" json:"id_category"` - IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Name string `gorm:"column:name;not null;index:category_name,priority:1" json:"name"` - Description *string `gorm:"column:description" json:"description"` - LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` - MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` -} - -// TableName PsMaalCmsCategoryLang's table name -func (*PsMaalCmsCategoryLang) TableName() string { - return TableNamePsMaalCmsCategoryLang -} diff --git a/app/model/prestadb/ps_maal_cms_page.go b/app/model/prestadb/ps_maal_cms_page.go deleted file mode 100644 index 647ec55..0000000 --- a/app/model/prestadb/ps_maal_cms_page.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsMaalCmsPage = "ps_maal_cms_page" - -// PsMaalCmsPage mapped from table -type PsMaalCmsPage struct { - IDPage int32 `gorm:"column:id_page;primaryKey;autoIncrement:true" json:"id_page"` - IDCategory *int32 `gorm:"column:id_category" json:"id_category"` - DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` - Content *string `gorm:"column:content" json:"content"` - Jumbotron *string `gorm:"column:jumbotron" json:"jumbotron"` -} - -// TableName PsMaalCmsPage's table name -func (*PsMaalCmsPage) TableName() string { - return TableNamePsMaalCmsPage -} diff --git a/app/model/prestadb/ps_maal_events.go b/app/model/prestadb/ps_maal_events.go deleted file mode 100644 index 12bd7e2..0000000 --- a/app/model/prestadb/ps_maal_events.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsMaalEvent = "ps_maal_events" - -// PsMaalEvent mapped from table -type PsMaalEvent struct { - IDEvent int32 `gorm:"column:id_event;primaryKey;autoIncrement:true" json:"id_event"` - Gallery *string `gorm:"column:gallery" json:"gallery"` - PostImg *string `gorm:"column:post_img" json:"post_img"` - Position *int32 `gorm:"column:position" json:"position"` - Active *int32 `gorm:"column:active" json:"active"` - DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` -} - -// TableName PsMaalEvent's table name -func (*PsMaalEvent) TableName() string { - return TableNamePsMaalEvent -} diff --git a/app/model/prestadb/ps_maal_events_lang.go b/app/model/prestadb/ps_maal_events_lang.go deleted file mode 100644 index 4dd72aa..0000000 --- a/app/model/prestadb/ps_maal_events_lang.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsMaalEventsLang = "ps_maal_events_lang" - -// PsMaalEventsLang mapped from table -type PsMaalEventsLang struct { - IDEventLang int32 `gorm:"column:id_event_lang;primaryKey;autoIncrement:true" json:"id_event_lang"` - IDEvent int32 `gorm:"column:id_event;not null;index:id_event_id_lang,priority:1" json:"id_event"` - IDLang int32 `gorm:"column:id_lang;not null;index:id_event_id_lang,priority:2" json:"id_lang"` - PostTitle *string `gorm:"column:post_title" json:"post_title"` - MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` - ContentTop *string `gorm:"column:content_top" json:"content_top"` - ContentMiddle *string `gorm:"column:content_middle" json:"content_middle"` - ContentBottom *string `gorm:"column:content_bottom" json:"content_bottom"` - LinkRewrite *string `gorm:"column:link_rewrite" json:"link_rewrite"` -} - -// TableName PsMaalEventsLang's table name -func (*PsMaalEventsLang) TableName() string { - return TableNamePsMaalEventsLang -} diff --git a/app/model/prestadb/ps_maal_invoicehelper.go b/app/model/prestadb/ps_maal_invoicehelper.go deleted file mode 100644 index e7fc036..0000000 --- a/app/model/prestadb/ps_maal_invoicehelper.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsMaalInvoicehelper = "ps_maal_invoicehelper" - -// PsMaalInvoicehelper mapped from table -type PsMaalInvoicehelper struct { - IDOrder int32 `gorm:"column:id_order;primaryKey" json:"id_order"` - IDOrderInvoice *int32 `gorm:"column:id_order_invoice" json:"id_order_invoice"` - DateOfIssue *time.Time `gorm:"column:date_of_issue" json:"date_of_issue"` - DateDeliveryExpected *time.Time `gorm:"column:date_delivery_expected" json:"date_delivery_expected"` - DaysToPay *int32 `gorm:"column:days_to_pay" json:"days_to_pay"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsMaalInvoicehelper's table name -func (*PsMaalInvoicehelper) TableName() string { - return TableNamePsMaalInvoicehelper -} diff --git a/app/model/prestadb/ps_maal_links_blok_slides_lang.go b/app/model/prestadb/ps_maal_links_blok_slides_lang.go deleted file mode 100644 index 90a919f..0000000 --- a/app/model/prestadb/ps_maal_links_blok_slides_lang.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsMaalLinksBlokSlidesLang = "ps_maal_links_blok_slides_lang" - -// PsMaalLinksBlokSlidesLang mapped from table -type PsMaalLinksBlokSlidesLang struct { - IDHomesliderSlides int32 `gorm:"column:id_homeslider_slides;primaryKey" json:"id_homeslider_slides"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Title string `gorm:"column:title;not null" json:"title"` - Description string `gorm:"column:description;not null" json:"description"` - Legend string `gorm:"column:legend;not null" json:"legend"` - URL string `gorm:"column:url;not null" json:"url"` - Image string `gorm:"column:image;not null" json:"image"` -} - -// TableName PsMaalLinksBlokSlidesLang's table name -func (*PsMaalLinksBlokSlidesLang) TableName() string { - return TableNamePsMaalLinksBlokSlidesLang -} diff --git a/app/model/prestadb/ps_maal_slider_slides_lang.go b/app/model/prestadb/ps_maal_slider_slides_lang.go deleted file mode 100644 index d9c173e..0000000 --- a/app/model/prestadb/ps_maal_slider_slides_lang.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsMaalSliderSlidesLang = "ps_maal_slider_slides_lang" - -// PsMaalSliderSlidesLang mapped from table -type PsMaalSliderSlidesLang struct { - IDHomesliderSlides int32 `gorm:"column:id_homeslider_slides;primaryKey" json:"id_homeslider_slides"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Title string `gorm:"column:title;not null" json:"title"` - Description string `gorm:"column:description;not null" json:"description"` - Legend string `gorm:"column:legend;not null" json:"legend"` - URL string `gorm:"column:url;not null" json:"url"` - Image string `gorm:"column:image;not null" json:"image"` -} - -// TableName PsMaalSliderSlidesLang's table name -func (*PsMaalSliderSlidesLang) TableName() string { - return TableNamePsMaalSliderSlidesLang -} diff --git a/app/model/prestadb/ps_mailalert_customer_oos.go b/app/model/prestadb/ps_mailalert_customer_oos.go deleted file mode 100644 index 40d1261..0000000 --- a/app/model/prestadb/ps_mailalert_customer_oos.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsMailalertCustomerOo = "ps_mailalert_customer_oos" - -// PsMailalertCustomerOo mapped from table -type PsMailalertCustomerOo struct { - IDCustomer int32 `gorm:"column:id_customer;primaryKey" json:"id_customer"` - CustomerEmail string `gorm:"column:customer_email;primaryKey" json:"customer_email"` - IDProduct int32 `gorm:"column:id_product;primaryKey" json:"id_product"` - IDProductAttribute int32 `gorm:"column:id_product_attribute;primaryKey" json:"id_product_attribute"` - IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"` - IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` -} - -// TableName PsMailalertCustomerOo's table name -func (*PsMailalertCustomerOo) TableName() string { - return TableNamePsMailalertCustomerOo -} diff --git a/app/model/prestadb/ps_manufacturer_lang.go b/app/model/prestadb/ps_manufacturer_lang.go deleted file mode 100644 index 63c70da..0000000 --- a/app/model/prestadb/ps_manufacturer_lang.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsManufacturerLang = "ps_manufacturer_lang" - -// PsManufacturerLang mapped from table -type PsManufacturerLang struct { - IDManufacturer int32 `gorm:"column:id_manufacturer;primaryKey" json:"id_manufacturer"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Description *string `gorm:"column:description" json:"description"` - ShortDescription *string `gorm:"column:short_description" json:"short_description"` - MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` - MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` -} - -// TableName PsManufacturerLang's table name -func (*PsManufacturerLang) TableName() string { - return TableNamePsManufacturerLang -} diff --git a/app/model/prestadb/ps_meta_lang.go b/app/model/prestadb/ps_meta_lang.go deleted file mode 100644 index 3b7bf3d..0000000 --- a/app/model/prestadb/ps_meta_lang.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsMetaLang = "ps_meta_lang" - -// PsMetaLang mapped from table -type PsMetaLang struct { - IDMeta int32 `gorm:"column:id_meta;primaryKey" json:"id_meta"` - IDShop int32 `gorm:"column:id_shop;primaryKey;index:id_shop,priority:1;default:1" json:"id_shop"` - IDLang int32 `gorm:"column:id_lang;primaryKey;index:id_lang,priority:1" json:"id_lang"` - Title *string `gorm:"column:title" json:"title"` - Description *string `gorm:"column:description" json:"description"` - Keywords *string `gorm:"column:keywords" json:"keywords"` - URLRewrite string `gorm:"column:url_rewrite;not null" json:"url_rewrite"` -} - -// TableName PsMetaLang's table name -func (*PsMetaLang) TableName() string { - return TableNamePsMetaLang -} diff --git a/app/model/prestadb/ps_order_detail.go b/app/model/prestadb/ps_order_detail.go deleted file mode 100644 index 95f2f6a..0000000 --- a/app/model/prestadb/ps_order_detail.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsOrderDetail = "ps_order_detail" - -// PsOrderDetail mapped from table -type PsOrderDetail struct { - IDOrderDetail int32 `gorm:"column:id_order_detail;primaryKey;autoIncrement:true;index:id_order_id_order_detail,priority:2" json:"id_order_detail"` - IDOrder int32 `gorm:"column:id_order;not null;index:id_order_id_order_detail,priority:1;index:order_detail_order,priority:1" json:"id_order"` - IDOrderInvoice *int32 `gorm:"column:id_order_invoice" json:"id_order_invoice"` - IDWarehouse *int32 `gorm:"column:id_warehouse" json:"id_warehouse"` - IDShop int32 `gorm:"column:id_shop;not null" json:"id_shop"` - ProductID int32 `gorm:"column:product_id;not null;index:product_id,priority:1" json:"product_id"` - ProductAttributeID *int32 `gorm:"column:product_attribute_id;index:product_attribute_id,priority:1;index:product_id,priority:2" json:"product_attribute_id"` - IDCustomization *int32 `gorm:"column:id_customization" json:"id_customization"` - ProductName string `gorm:"column:product_name;not null" json:"product_name"` - ProductQuantity int32 `gorm:"column:product_quantity;not null" json:"product_quantity"` - ProductQuantityInStock int32 `gorm:"column:product_quantity_in_stock;not null" json:"product_quantity_in_stock"` - ProductQuantityRefunded int32 `gorm:"column:product_quantity_refunded;not null" json:"product_quantity_refunded"` - ProductQuantityReturn int32 `gorm:"column:product_quantity_return;not null" json:"product_quantity_return"` - ProductQuantityReinjected int32 `gorm:"column:product_quantity_reinjected;not null" json:"product_quantity_reinjected"` - ProductPrice float64 `gorm:"column:product_price;not null;default:0.000000" json:"product_price"` - ReductionPercent float64 `gorm:"column:reduction_percent;not null;default:0.00" json:"reduction_percent"` - ReductionAmount float64 `gorm:"column:reduction_amount;not null;default:0.000000" json:"reduction_amount"` - ReductionAmountTaxIncl float64 `gorm:"column:reduction_amount_tax_incl;not null;default:0.000000" json:"reduction_amount_tax_incl"` - ReductionAmountTaxExcl float64 `gorm:"column:reduction_amount_tax_excl;not null;default:0.000000" json:"reduction_amount_tax_excl"` - GroupReduction float64 `gorm:"column:group_reduction;not null;default:0.00" json:"group_reduction"` - ProductQuantityDiscount float64 `gorm:"column:product_quantity_discount;not null;default:0.000000" json:"product_quantity_discount"` - ProductEan13 *string `gorm:"column:product_ean13" json:"product_ean13"` - ProductIsbn *string `gorm:"column:product_isbn" json:"product_isbn"` - ProductUpc *string `gorm:"column:product_upc" json:"product_upc"` - ProductReference *string `gorm:"column:product_reference" json:"product_reference"` - ProductSupplierReference *string `gorm:"column:product_supplier_reference" json:"product_supplier_reference"` - ProductWeight float64 `gorm:"column:product_weight;not null" json:"product_weight"` - IDTaxRulesGroup *int32 `gorm:"column:id_tax_rules_group;index:id_tax_rules_group,priority:1" json:"id_tax_rules_group"` - TaxComputationMethod bool `gorm:"column:tax_computation_method;not null" json:"tax_computation_method"` - TaxName string `gorm:"column:tax_name;not null" json:"tax_name"` - TaxRate float64 `gorm:"column:tax_rate;not null;default:0.000" json:"tax_rate"` - Ecotax float64 `gorm:"column:ecotax;not null;default:0.000000" json:"ecotax"` - EcotaxTaxRate float64 `gorm:"column:ecotax_tax_rate;not null;default:0.000" json:"ecotax_tax_rate"` - DiscountQuantityApplied bool `gorm:"column:discount_quantity_applied;not null" json:"discount_quantity_applied"` - DownloadHash *string `gorm:"column:download_hash" json:"download_hash"` - DownloadNb *int32 `gorm:"column:download_nb" json:"download_nb"` - DownloadDeadline *time.Time `gorm:"column:download_deadline" json:"download_deadline"` - TotalPriceTaxIncl float64 `gorm:"column:total_price_tax_incl;not null;default:0.000000" json:"total_price_tax_incl"` - TotalPriceTaxExcl float64 `gorm:"column:total_price_tax_excl;not null;default:0.000000" json:"total_price_tax_excl"` - UnitPriceTaxIncl float64 `gorm:"column:unit_price_tax_incl;not null;default:0.000000" json:"unit_price_tax_incl"` - UnitPriceTaxExcl float64 `gorm:"column:unit_price_tax_excl;not null;default:0.000000" json:"unit_price_tax_excl"` - TotalShippingPriceTaxIncl float64 `gorm:"column:total_shipping_price_tax_incl;not null;default:0.000000" json:"total_shipping_price_tax_incl"` - TotalShippingPriceTaxExcl float64 `gorm:"column:total_shipping_price_tax_excl;not null;default:0.000000" json:"total_shipping_price_tax_excl"` - TotalPriceTaxInclDiscounted *float64 `gorm:"column:total_price_tax_incl_discounted" json:"total_price_tax_incl_discounted"` - CartRules *string `gorm:"column:cart_rules" json:"cart_rules"` - PurchaseSupplierPrice float64 `gorm:"column:purchase_supplier_price;not null;default:0.000000" json:"purchase_supplier_price"` - OriginalProductPrice float64 `gorm:"column:original_product_price;not null;default:0.000000" json:"original_product_price"` - OriginalWholesalePrice float64 `gorm:"column:original_wholesale_price;not null;default:0.000000" json:"original_wholesale_price"` -} - -// TableName PsOrderDetail's table name -func (*PsOrderDetail) TableName() string { - return TableNamePsOrderDetail -} diff --git a/app/model/prestadb/ps_order_notes.go b/app/model/prestadb/ps_order_notes.go deleted file mode 100644 index 87ce314..0000000 --- a/app/model/prestadb/ps_order_notes.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsOrderNote = "ps_order_notes" - -// PsOrderNote mapped from table -type PsOrderNote struct { - ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` - IDOrder int32 `gorm:"column:id_order;not null" json:"id_order"` - IDEmployee int32 `gorm:"column:id_employee;not null" json:"id_employee"` - Note *string `gorm:"column:note" json:"note"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsOrderNote's table name -func (*PsOrderNote) TableName() string { - return TableNamePsOrderNote -} diff --git a/app/model/prestadb/ps_order_payment.go b/app/model/prestadb/ps_order_payment.go deleted file mode 100644 index 0e7cf6f..0000000 --- a/app/model/prestadb/ps_order_payment.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsOrderPayment = "ps_order_payment" - -// PsOrderPayment mapped from table -type PsOrderPayment struct { - IDOrderPayment int32 `gorm:"column:id_order_payment;primaryKey;autoIncrement:true" json:"id_order_payment"` - OrderReference *string `gorm:"column:order_reference;index:order_reference,priority:1" json:"order_reference"` - IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` - Amount float64 `gorm:"column:amount;not null" json:"amount"` - PaymentMethod string `gorm:"column:payment_method;not null" json:"payment_method"` - ConversionRate float64 `gorm:"column:conversion_rate;not null;default:1.000000" json:"conversion_rate"` - TransactionID *string `gorm:"column:transaction_id" json:"transaction_id"` - CardNumber *string `gorm:"column:card_number" json:"card_number"` - CardBrand *string `gorm:"column:card_brand" json:"card_brand"` - CardExpiration *string `gorm:"column:card_expiration" json:"card_expiration"` - CardHolder *string `gorm:"column:card_holder" json:"card_holder"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - IDPaymentModule int32 `gorm:"column:id_payment_module;not null" json:"id_payment_module"` -} - -// TableName PsOrderPayment's table name -func (*PsOrderPayment) TableName() string { - return TableNamePsOrderPayment -} diff --git a/app/model/prestadb/ps_order_payu_payments.go b/app/model/prestadb/ps_order_payu_payments.go deleted file mode 100644 index 1833eb1..0000000 --- a/app/model/prestadb/ps_order_payu_payments.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsOrderPayuPayment = "ps_order_payu_payments" - -// PsOrderPayuPayment mapped from table -type PsOrderPayuPayment struct { - IDPayuPayment int32 `gorm:"column:id_payu_payment;primaryKey;autoIncrement:true" json:"id_payu_payment"` - IDOrder int32 `gorm:"column:id_order;not null" json:"id_order"` - IDCart int32 `gorm:"column:id_cart;not null" json:"id_cart"` - IDSession string `gorm:"column:id_session;not null" json:"id_session"` - ExtOrderID string `gorm:"column:ext_order_id;not null" json:"ext_order_id"` - Status string `gorm:"column:status;not null" json:"status"` - CreateAt *time.Time `gorm:"column:create_at" json:"create_at"` - UpdateAt *time.Time `gorm:"column:update_at" json:"update_at"` -} - -// TableName PsOrderPayuPayment's table name -func (*PsOrderPayuPayment) TableName() string { - return TableNamePsOrderPayuPayment -} diff --git a/app/model/prestadb/ps_order_slip.go b/app/model/prestadb/ps_order_slip.go deleted file mode 100644 index d665dc8..0000000 --- a/app/model/prestadb/ps_order_slip.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsOrderSlip = "ps_order_slip" - -// PsOrderSlip mapped from table -type PsOrderSlip struct { - IDOrderSlip int32 `gorm:"column:id_order_slip;primaryKey;autoIncrement:true" json:"id_order_slip"` - ConversionRate float64 `gorm:"column:conversion_rate;not null;default:1.000000" json:"conversion_rate"` - IDCustomer int32 `gorm:"column:id_customer;not null;index:order_slip_customer,priority:1" json:"id_customer"` - IDOrder int32 `gorm:"column:id_order;not null;index:id_order,priority:1" json:"id_order"` - TotalProductsTaxExcl *float64 `gorm:"column:total_products_tax_excl" json:"total_products_tax_excl"` - TotalProductsTaxIncl *float64 `gorm:"column:total_products_tax_incl" json:"total_products_tax_incl"` - TotalShippingTaxExcl *float64 `gorm:"column:total_shipping_tax_excl" json:"total_shipping_tax_excl"` - TotalShippingTaxIncl *float64 `gorm:"column:total_shipping_tax_incl" json:"total_shipping_tax_incl"` - ShippingCost int32 `gorm:"column:shipping_cost;not null" json:"shipping_cost"` - Amount float64 `gorm:"column:amount;not null" json:"amount"` - ShippingCostAmount float64 `gorm:"column:shipping_cost_amount;not null" json:"shipping_cost_amount"` - Partial bool `gorm:"column:partial;not null" json:"partial"` - OrderSlipType bool `gorm:"column:order_slip_type;not null" json:"order_slip_type"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsOrderSlip's table name -func (*PsOrderSlip) TableName() string { - return TableNamePsOrderSlip -} diff --git a/app/model/prestadb/ps_order_slip_detail.go b/app/model/prestadb/ps_order_slip_detail.go deleted file mode 100644 index 8a91dff..0000000 --- a/app/model/prestadb/ps_order_slip_detail.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsOrderSlipDetail = "ps_order_slip_detail" - -// PsOrderSlipDetail mapped from table -type PsOrderSlipDetail struct { - IDOrderSlip int32 `gorm:"column:id_order_slip;primaryKey" json:"id_order_slip"` - IDOrderDetail int32 `gorm:"column:id_order_detail;primaryKey" json:"id_order_detail"` - ProductQuantity int32 `gorm:"column:product_quantity;not null" json:"product_quantity"` - UnitPriceTaxExcl *float64 `gorm:"column:unit_price_tax_excl" json:"unit_price_tax_excl"` - UnitPriceTaxIncl *float64 `gorm:"column:unit_price_tax_incl" json:"unit_price_tax_incl"` - TotalPriceTaxExcl *float64 `gorm:"column:total_price_tax_excl" json:"total_price_tax_excl"` - TotalPriceTaxIncl *float64 `gorm:"column:total_price_tax_incl" json:"total_price_tax_incl"` - AmountTaxExcl *float64 `gorm:"column:amount_tax_excl" json:"amount_tax_excl"` - AmountTaxIncl *float64 `gorm:"column:amount_tax_incl" json:"amount_tax_incl"` -} - -// TableName PsOrderSlipDetail's table name -func (*PsOrderSlipDetail) TableName() string { - return TableNamePsOrderSlipDetail -} diff --git a/app/model/prestadb/ps_order_state.go b/app/model/prestadb/ps_order_state.go deleted file mode 100644 index 301bb9f..0000000 --- a/app/model/prestadb/ps_order_state.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsOrderState = "ps_order_state" - -// PsOrderState mapped from table -type PsOrderState struct { - IDOrderState int32 `gorm:"column:id_order_state;primaryKey;autoIncrement:true" json:"id_order_state"` - Invoice *bool `gorm:"column:invoice" json:"invoice"` - SendEmail bool `gorm:"column:send_email;not null" json:"send_email"` - ModuleName *string `gorm:"column:module_name;index:module_name,priority:1" json:"module_name"` - Color *string `gorm:"column:color" json:"color"` - Unremovable bool `gorm:"column:unremovable;not null" json:"unremovable"` - Hidden bool `gorm:"column:hidden;not null" json:"hidden"` - Logable bool `gorm:"column:logable;not null" json:"logable"` - Delivery bool `gorm:"column:delivery;not null" json:"delivery"` - Shipped bool `gorm:"column:shipped;not null" json:"shipped"` - Paid bool `gorm:"column:paid;not null" json:"paid"` - PdfInvoice bool `gorm:"column:pdf_invoice;not null" json:"pdf_invoice"` - PdfDelivery bool `gorm:"column:pdf_delivery;not null" json:"pdf_delivery"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` -} - -// TableName PsOrderState's table name -func (*PsOrderState) TableName() string { - return TableNamePsOrderState -} diff --git a/app/model/prestadb/ps_page_viewed.go b/app/model/prestadb/ps_page_viewed.go deleted file mode 100644 index ca074b5..0000000 --- a/app/model/prestadb/ps_page_viewed.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsPageViewed = "ps_page_viewed" - -// PsPageViewed mapped from table -type PsPageViewed struct { - IDPage int32 `gorm:"column:id_page;primaryKey" json:"id_page"` - IDShopGroup int32 `gorm:"column:id_shop_group;not null;default:1" json:"id_shop_group"` - IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` - IDDateRange int32 `gorm:"column:id_date_range;primaryKey" json:"id_date_range"` - Counter int32 `gorm:"column:counter;not null" json:"counter"` -} - -// TableName PsPageViewed's table name -func (*PsPageViewed) TableName() string { - return TableNamePsPageViewed -} diff --git a/app/model/prestadb/ps_pocztapolskaen_order.go b/app/model/prestadb/ps_pocztapolskaen_order.go deleted file mode 100644 index 394591e..0000000 --- a/app/model/prestadb/ps_pocztapolskaen_order.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsPocztapolskaenOrder = "ps_pocztapolskaen_order" - -// PsPocztapolskaenOrder mapped from table -type PsPocztapolskaenOrder struct { - IDPpOrder int32 `gorm:"column:id_pp_order;primaryKey;autoIncrement:true" json:"id_pp_order"` - IDOrder *int32 `gorm:"column:id_order" json:"id_order"` - IDCart *int32 `gorm:"column:id_cart" json:"id_cart"` - IDShipment *string `gorm:"column:id_shipment" json:"id_shipment"` - ShipmentNumber *string `gorm:"column:shipment_number" json:"shipment_number"` - ShipmentType *string `gorm:"column:shipment_type" json:"shipment_type"` - Point *string `gorm:"column:point" json:"point"` - Pni *int32 `gorm:"column:pni" json:"pni"` - Cod bool `gorm:"column:cod;not null" json:"cod"` - IDBuffor *int32 `gorm:"column:id_buffor" json:"id_buffor"` - PostDate *time.Time `gorm:"column:post_date" json:"post_date"` - SendDate *time.Time `gorm:"column:send_date" json:"send_date"` - DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` - IDCarrier *int32 `gorm:"column:id_carrier" json:"id_carrier"` -} - -// TableName PsPocztapolskaenOrder's table name -func (*PsPocztapolskaenOrder) TableName() string { - return TableNamePsPocztapolskaenOrder -} diff --git a/app/model/prestadb/ps_pocztapolskaen_order_set.go b/app/model/prestadb/ps_pocztapolskaen_order_set.go deleted file mode 100644 index d85465f..0000000 --- a/app/model/prestadb/ps_pocztapolskaen_order_set.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsPocztapolskaenOrderSet = "ps_pocztapolskaen_order_set" - -// PsPocztapolskaenOrderSet mapped from table -type PsPocztapolskaenOrderSet struct { - IDOrderSet int32 `gorm:"column:id_order_set;primaryKey;autoIncrement:true" json:"id_order_set"` - Name *string `gorm:"column:name" json:"name"` - Active *bool `gorm:"column:active" json:"active"` - IDPostOffice *int32 `gorm:"column:id_post_office" json:"id_post_office"` - PostDate *time.Time `gorm:"column:post_date" json:"post_date"` - IDEn int32 `gorm:"column:id_en;not null" json:"id_en"` - IDEnvelope *int32 `gorm:"column:id_envelope" json:"id_envelope"` - EnvelopeStatus *string `gorm:"column:envelope_status" json:"envelope_status"` - DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` -} - -// TableName PsPocztapolskaenOrderSet's table name -func (*PsPocztapolskaenOrderSet) TableName() string { - return TableNamePsPocztapolskaenOrderSet -} diff --git a/app/model/prestadb/ps_pocztapolskaen_post_office.go b/app/model/prestadb/ps_pocztapolskaen_post_office.go deleted file mode 100644 index ff6a2ff..0000000 --- a/app/model/prestadb/ps_pocztapolskaen_post_office.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsPocztapolskaenPostOffice = "ps_pocztapolskaen_post_office" - -// PsPocztapolskaenPostOffice mapped from table -type PsPocztapolskaenPostOffice struct { - IDPostOffice int32 `gorm:"column:id_post_office;primaryKey;autoIncrement:true" json:"id_post_office"` - IDEn *int32 `gorm:"column:id_en" json:"id_en"` - Name *string `gorm:"column:name" json:"name"` - Description *string `gorm:"column:description" json:"description"` - DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` -} - -// TableName PsPocztapolskaenPostOffice's table name -func (*PsPocztapolskaenPostOffice) TableName() string { - return TableNamePsPocztapolskaenPostOffice -} diff --git a/app/model/prestadb/ps_pocztapolskaen_profile_address.go b/app/model/prestadb/ps_pocztapolskaen_profile_address.go deleted file mode 100644 index 1ca235c..0000000 --- a/app/model/prestadb/ps_pocztapolskaen_profile_address.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsPocztapolskaenProfileAddress = "ps_pocztapolskaen_profile_address" - -// PsPocztapolskaenProfileAddress mapped from table -type PsPocztapolskaenProfileAddress struct { - IDProfileAddress int32 `gorm:"column:id_profile_address;primaryKey;autoIncrement:true" json:"id_profile_address"` - IDEn *int32 `gorm:"column:id_en" json:"id_en"` - Name *string `gorm:"column:name" json:"name"` - FriendlyName *string `gorm:"column:friendly_name" json:"friendly_name"` - Street *string `gorm:"column:street" json:"street"` - HouseNumber *string `gorm:"column:house_number" json:"house_number"` - PremisesNumber *string `gorm:"column:premises_number" json:"premises_number"` - City *string `gorm:"column:city" json:"city"` - PostalCode *string `gorm:"column:postal_code" json:"postal_code"` - DateAdd *time.Time `gorm:"column:date_add" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"` -} - -// TableName PsPocztapolskaenProfileAddress's table name -func (*PsPocztapolskaenProfileAddress) TableName() string { - return TableNamePsPocztapolskaenProfileAddress -} diff --git a/app/model/prestadb/ps_product.go b/app/model/prestadb/ps_product.go deleted file mode 100644 index 3a47242..0000000 --- a/app/model/prestadb/ps_product.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsProduct = "ps_product" - -// PsProduct mapped from table -type PsProduct struct { - IDProduct int32 `gorm:"column:id_product;primaryKey;autoIncrement:true;index:product_manufacturer,priority:2" json:"id_product"` - IDSupplier *int32 `gorm:"column:id_supplier;index:product_supplier,priority:1" json:"id_supplier"` - IDManufacturer *int32 `gorm:"column:id_manufacturer;index:idx_product_manufacturer,priority:1;index:product_manufacturer,priority:1" json:"id_manufacturer"` - IDCategoryDefault *int32 `gorm:"column:id_category_default;index:id_category_default,priority:1" json:"id_category_default"` - IDShopDefault int32 `gorm:"column:id_shop_default;not null;default:1" json:"id_shop_default"` - IDTaxRulesGroup int32 `gorm:"column:id_tax_rules_group;not null" json:"id_tax_rules_group"` - OnSale bool `gorm:"column:on_sale;not null" json:"on_sale"` - OnlineOnly bool `gorm:"column:online_only;not null" json:"online_only"` - Ean13 *string `gorm:"column:ean13" json:"ean13"` - Isbn *string `gorm:"column:isbn" json:"isbn"` - Upc *string `gorm:"column:upc" json:"upc"` - Ecotax float64 `gorm:"column:ecotax;not null;default:0.000000" json:"ecotax"` - Quantity int32 `gorm:"column:quantity;not null" json:"quantity"` - MinimalQuantity int32 `gorm:"column:minimal_quantity;not null;default:1" json:"minimal_quantity"` - LowStockThreshold *int32 `gorm:"column:low_stock_threshold" json:"low_stock_threshold"` - LowStockAlert bool `gorm:"column:low_stock_alert;not null" json:"low_stock_alert"` - Price float64 `gorm:"column:price;not null;default:0.000000" json:"price"` - WholesalePrice float64 `gorm:"column:wholesale_price;not null;default:0.000000" json:"wholesale_price"` - Unity *string `gorm:"column:unity" json:"unity"` - UnitPriceRatio float64 `gorm:"column:unit_price_ratio;not null;default:0.000000" json:"unit_price_ratio"` - IDUnit int32 `gorm:"column:id_unit;not null" json:"id_unit"` - AdditionalShippingCost float64 `gorm:"column:additional_shipping_cost;not null;default:0.00" json:"additional_shipping_cost"` - Reference *string `gorm:"column:reference" json:"reference"` - SupplierReference *string `gorm:"column:supplier_reference" json:"supplier_reference"` - Location *string `gorm:"column:location" json:"location"` - Width float64 `gorm:"column:width;not null;default:0.000000" json:"width"` - Height float64 `gorm:"column:height;not null;default:0.000000" json:"height"` - Depth float64 `gorm:"column:depth;not null;default:0.000000" json:"depth"` - Weight float64 `gorm:"column:weight;not null;default:0.000000" json:"weight"` - OutOfStock int32 `gorm:"column:out_of_stock;not null;default:2" json:"out_of_stock"` - AdditionalDeliveryTimes int32 `gorm:"column:additional_delivery_times;not null;default:1" json:"additional_delivery_times"` - QuantityDiscount *bool `gorm:"column:quantity_discount" json:"quantity_discount"` - Customizable int32 `gorm:"column:customizable;not null" json:"customizable"` - UploadableFiles int32 `gorm:"column:uploadable_files;not null" json:"uploadable_files"` - TextFields int32 `gorm:"column:text_fields;not null" json:"text_fields"` - Active bool `gorm:"column:active;not null" json:"active"` - RedirectType string `gorm:"column:redirect_type;not null" json:"redirect_type"` - IDTypeRedirected int32 `gorm:"column:id_type_redirected;not null" json:"id_type_redirected"` - AvailableForOrder bool `gorm:"column:available_for_order;not null;default:1" json:"available_for_order"` - AvailableDate *time.Time `gorm:"column:available_date" json:"available_date"` - ShowCondition bool `gorm:"column:show_condition;not null" json:"show_condition"` - Condition string `gorm:"column:condition;not null;default:new" json:"condition"` - ShowPrice bool `gorm:"column:show_price;not null;default:1" json:"show_price"` - Indexed bool `gorm:"column:indexed;not null;index:indexed,priority:1" json:"indexed"` - Visibility string `gorm:"column:visibility;not null;index:idx_product_visibility,priority:1;index:idx_ps_product_visibility,priority:1;index:idx_visibility,priority:1;default:both" json:"visibility"` - CacheIsPack bool `gorm:"column:cache_is_pack;not null" json:"cache_is_pack"` - CacheHasAttachments bool `gorm:"column:cache_has_attachments;not null" json:"cache_has_attachments"` - IsVirtual bool `gorm:"column:is_virtual;not null" json:"is_virtual"` - CacheDefaultAttribute *int32 `gorm:"column:cache_default_attribute" json:"cache_default_attribute"` - DateAdd time.Time `gorm:"column:date_add;not null;index:date_add,priority:1" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null;index:state,priority:2" json:"date_upd"` - AdvancedStockManagement bool `gorm:"column:advanced_stock_management;not null" json:"advanced_stock_management"` - PackStockType int32 `gorm:"column:pack_stock_type;not null;default:3" json:"pack_stock_type"` - State int32 `gorm:"column:state;not null;index:state,priority:1;default:1" json:"state"` - DeliveryDays *int32 `gorm:"column:delivery_days" json:"delivery_days"` -} - -// TableName PsProduct's table name -func (*PsProduct) TableName() string { - return TableNamePsProduct -} diff --git a/app/model/prestadb/ps_product_attribute_shop.go b/app/model/prestadb/ps_product_attribute_shop.go deleted file mode 100644 index 77babfd..0000000 --- a/app/model/prestadb/ps_product_attribute_shop.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsProductAttributeShop = "ps_product_attribute_shop" - -// PsProductAttributeShop mapped from table -type PsProductAttributeShop struct { - IDProduct int32 `gorm:"column:id_product;not null;uniqueIndex:id_product,priority:1" json:"id_product"` - IDProductAttribute int32 `gorm:"column:id_product_attribute;primaryKey" json:"id_product_attribute"` - IDShop int32 `gorm:"column:id_shop;primaryKey;uniqueIndex:id_product,priority:2" json:"id_shop"` - WholesalePrice float64 `gorm:"column:wholesale_price;not null;default:0.000000" json:"wholesale_price"` - Price float64 `gorm:"column:price;not null;default:0.000000" json:"price"` - Ecotax float64 `gorm:"column:ecotax;not null;default:0.000000" json:"ecotax"` - Weight float64 `gorm:"column:weight;not null;default:0.000000" json:"weight"` - UnitPriceImpact float64 `gorm:"column:unit_price_impact;not null;default:0.000000" json:"unit_price_impact"` - DefaultOn *bool `gorm:"column:default_on;uniqueIndex:id_product,priority:3" json:"default_on"` - MinimalQuantity int32 `gorm:"column:minimal_quantity;not null;default:1" json:"minimal_quantity"` - LowStockThreshold *int32 `gorm:"column:low_stock_threshold" json:"low_stock_threshold"` - LowStockAlert bool `gorm:"column:low_stock_alert;not null" json:"low_stock_alert"` - AvailableDate *time.Time `gorm:"column:available_date" json:"available_date"` -} - -// TableName PsProductAttributeShop's table name -func (*PsProductAttributeShop) TableName() string { - return TableNamePsProductAttributeShop -} diff --git a/app/model/prestadb/ps_product_download.go b/app/model/prestadb/ps_product_download.go deleted file mode 100644 index 6ae8d09..0000000 --- a/app/model/prestadb/ps_product_download.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsProductDownload = "ps_product_download" - -// PsProductDownload mapped from table -type PsProductDownload struct { - IDProductDownload int32 `gorm:"column:id_product_download;primaryKey;autoIncrement:true" json:"id_product_download"` - IDProduct int32 `gorm:"column:id_product;not null" json:"id_product"` - DisplayFilename *string `gorm:"column:display_filename" json:"display_filename"` - Filename *string `gorm:"column:filename" json:"filename"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateExpiration *time.Time `gorm:"column:date_expiration" json:"date_expiration"` - NbDaysAccessible *int32 `gorm:"column:nb_days_accessible" json:"nb_days_accessible"` - NbDownloadable *int32 `gorm:"column:nb_downloadable;default:1" json:"nb_downloadable"` - Active bool `gorm:"column:active;not null;default:1" json:"active"` - IsShareable bool `gorm:"column:is_shareable;not null" json:"is_shareable"` -} - -// TableName PsProductDownload's table name -func (*PsProductDownload) TableName() string { - return TableNamePsProductDownload -} diff --git a/app/model/prestadb/ps_product_lang.go b/app/model/prestadb/ps_product_lang.go deleted file mode 100644 index 6e6b352..0000000 --- a/app/model/prestadb/ps_product_lang.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsProductLang = "ps_product_lang" - -// PsProductLang mapped from table -type PsProductLang struct { - IDProduct int32 `gorm:"column:id_product;primaryKey;index:idx_ps_product_lang,priority:1" json:"id_product"` - IDShop int32 `gorm:"column:id_shop;primaryKey;index:idx_ps_product_lang,priority:2;default:1" json:"id_shop"` - IDLang int32 `gorm:"column:id_lang;primaryKey;index:idx_ps_product_lang,priority:3;index:id_lang,priority:1" json:"id_lang"` - Description *string `gorm:"column:description" json:"description"` - DescriptionShort *string `gorm:"column:description_short" json:"description_short"` - LinkRewrite string `gorm:"column:link_rewrite;not null" json:"link_rewrite"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` - MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` - MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` - Name string `gorm:"column:name;not null;index:name,priority:1" json:"name"` - AvailableNow *string `gorm:"column:available_now" json:"available_now"` - AvailableLater *string `gorm:"column:available_later" json:"available_later"` - DeliveryInStock *string `gorm:"column:delivery_in_stock" json:"delivery_in_stock"` - DeliveryOutStock *string `gorm:"column:delivery_out_stock" json:"delivery_out_stock"` - Usage *string `gorm:"column:usage" json:"usage"` -} - -// TableName PsProductLang's table name -func (*PsProductLang) TableName() string { - return TableNamePsProductLang -} diff --git a/app/model/prestadb/ps_psgdpr_consent.go b/app/model/prestadb/ps_psgdpr_consent.go deleted file mode 100644 index f331a0b..0000000 --- a/app/model/prestadb/ps_psgdpr_consent.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsPsgdprConsent = "ps_psgdpr_consent" - -// PsPsgdprConsent mapped from table -type PsPsgdprConsent struct { - IDGdprConsent int32 `gorm:"column:id_gdpr_consent;primaryKey;autoIncrement:true" json:"id_gdpr_consent"` - IDModule int32 `gorm:"column:id_module;primaryKey" json:"id_module"` - Active int32 `gorm:"column:active;not null" json:"active"` - Error *int32 `gorm:"column:error" json:"error"` - ErrorMessage *string `gorm:"column:error_message" json:"error_message"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsPsgdprConsent's table name -func (*PsPsgdprConsent) TableName() string { - return TableNamePsPsgdprConsent -} diff --git a/app/model/prestadb/ps_psgdpr_log.go b/app/model/prestadb/ps_psgdpr_log.go deleted file mode 100644 index 09df6d8..0000000 --- a/app/model/prestadb/ps_psgdpr_log.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsPsgdprLog = "ps_psgdpr_log" - -// PsPsgdprLog mapped from table -type PsPsgdprLog struct { - IDGdprLog int32 `gorm:"column:id_gdpr_log;primaryKey;autoIncrement:true" json:"id_gdpr_log"` - IDCustomer *int32 `gorm:"column:id_customer" json:"id_customer"` - IDGuest *int32 `gorm:"column:id_guest" json:"id_guest"` - ClientName *string `gorm:"column:client_name" json:"client_name"` - IDModule int32 `gorm:"column:id_module;not null" json:"id_module"` - RequestType int32 `gorm:"column:request_type;not null" json:"request_type"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsPsgdprLog's table name -func (*PsPsgdprLog) TableName() string { - return TableNamePsPsgdprLog -} diff --git a/app/model/prestadb/ps_referrer.go b/app/model/prestadb/ps_referrer.go deleted file mode 100644 index ff228bf..0000000 --- a/app/model/prestadb/ps_referrer.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsReferrer = "ps_referrer" - -// PsReferrer mapped from table -type PsReferrer struct { - IDReferrer int32 `gorm:"column:id_referrer;primaryKey;autoIncrement:true" json:"id_referrer"` - Name string `gorm:"column:name;not null" json:"name"` - Passwd *string `gorm:"column:passwd" json:"passwd"` - HTTPRefererRegexp *string `gorm:"column:http_referer_regexp" json:"http_referer_regexp"` - HTTPRefererLike *string `gorm:"column:http_referer_like" json:"http_referer_like"` - RequestURIRegexp *string `gorm:"column:request_uri_regexp" json:"request_uri_regexp"` - RequestURILike *string `gorm:"column:request_uri_like" json:"request_uri_like"` - HTTPRefererRegexpNot *string `gorm:"column:http_referer_regexp_not" json:"http_referer_regexp_not"` - HTTPRefererLikeNot *string `gorm:"column:http_referer_like_not" json:"http_referer_like_not"` - RequestURIRegexpNot *string `gorm:"column:request_uri_regexp_not" json:"request_uri_regexp_not"` - RequestURILikeNot *string `gorm:"column:request_uri_like_not" json:"request_uri_like_not"` - BaseFee float64 `gorm:"column:base_fee;not null;default:0.00" json:"base_fee"` - PercentFee float64 `gorm:"column:percent_fee;not null;default:0.00" json:"percent_fee"` - ClickFee float64 `gorm:"column:click_fee;not null;default:0.00" json:"click_fee"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` -} - -// TableName PsReferrer's table name -func (*PsReferrer) TableName() string { - return TableNamePsReferrer -} diff --git a/app/model/prestadb/ps_referrer_shop.go b/app/model/prestadb/ps_referrer_shop.go deleted file mode 100644 index b07137e..0000000 --- a/app/model/prestadb/ps_referrer_shop.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsReferrerShop = "ps_referrer_shop" - -// PsReferrerShop mapped from table -type PsReferrerShop struct { - IDReferrer int32 `gorm:"column:id_referrer;primaryKey;autoIncrement:true" json:"id_referrer"` - IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"` - CacheVisitors *int32 `gorm:"column:cache_visitors" json:"cache_visitors"` - CacheVisits *int32 `gorm:"column:cache_visits" json:"cache_visits"` - CachePages *int32 `gorm:"column:cache_pages" json:"cache_pages"` - CacheRegistrations *int32 `gorm:"column:cache_registrations" json:"cache_registrations"` - CacheOrders *int32 `gorm:"column:cache_orders" json:"cache_orders"` - CacheSales *float64 `gorm:"column:cache_sales" json:"cache_sales"` - CacheRegRate *float64 `gorm:"column:cache_reg_rate" json:"cache_reg_rate"` - CacheOrderRate *float64 `gorm:"column:cache_order_rate" json:"cache_order_rate"` -} - -// TableName PsReferrerShop's table name -func (*PsReferrerShop) TableName() string { - return TableNamePsReferrerShop -} diff --git a/app/model/prestadb/ps_shop.go b/app/model/prestadb/ps_shop.go deleted file mode 100644 index d6811ea..0000000 --- a/app/model/prestadb/ps_shop.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsShop = "ps_shop" - -// PsShop mapped from table -type PsShop struct { - IDShop int32 `gorm:"column:id_shop;primaryKey;autoIncrement:true" json:"id_shop"` - IDShopGroup int32 `gorm:"column:id_shop_group;not null;index:IDX_CBDFBB9EF5C9E40,priority:1" json:"id_shop_group"` - Name string `gorm:"column:name;not null" json:"name"` - IDCategory int32 `gorm:"column:id_category;not null" json:"id_category"` - ThemeName string `gorm:"column:theme_name;not null" json:"theme_name"` - Active bool `gorm:"column:active;not null" json:"active"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` -} - -// TableName PsShop's table name -func (*PsShop) TableName() string { - return TableNamePsShop -} diff --git a/app/model/prestadb/ps_shop_company.go b/app/model/prestadb/ps_shop_company.go deleted file mode 100644 index 5b773bd..0000000 --- a/app/model/prestadb/ps_shop_company.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsShopCompany = "ps_shop_company" - -// PsShopCompany mapped from table -type PsShopCompany struct { - IDShopCompany int32 `gorm:"column:id_shop_company;primaryKey;autoIncrement:true" json:"id_shop_company"` - Name *string `gorm:"column:name" json:"name"` - Address *string `gorm:"column:address" json:"address"` - Postcode *string `gorm:"column:postcode" json:"postcode"` - City *string `gorm:"column:city" json:"city"` - Phone *string `gorm:"column:phone" json:"phone"` - IDCountry int32 `gorm:"column:id_country;not null" json:"id_country"` - VatNumber *string `gorm:"column:vat_number;uniqueIndex:UQ_ps_shop_company_vat_number,priority:1" json:"vat_number"` - Email *string `gorm:"column:email" json:"email"` - BankAccount *string `gorm:"column:bank_account" json:"bank_account"` - LastNumber *int32 `gorm:"column:last_number" json:"last_number"` - IsDefault int32 `gorm:"column:is_default;not null" json:"is_default"` - Color *string `gorm:"column:color" json:"color"` - DateAdd *time.Time `gorm:"column:date_add;default:current_timestamp()" json:"date_add"` - DateUpd *time.Time `gorm:"column:date_upd;default:current_timestamp()" json:"date_upd"` -} - -// TableName PsShopCompany's table name -func (*PsShopCompany) TableName() string { - return TableNamePsShopCompany -} diff --git a/app/model/prestadb/ps_shop_group.go b/app/model/prestadb/ps_shop_group.go deleted file mode 100644 index b6c54f2..0000000 --- a/app/model/prestadb/ps_shop_group.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsShopGroup = "ps_shop_group" - -// PsShopGroup mapped from table -type PsShopGroup struct { - IDShopGroup int32 `gorm:"column:id_shop_group;primaryKey;autoIncrement:true" json:"id_shop_group"` - Name string `gorm:"column:name;not null" json:"name"` - ShareCustomer bool `gorm:"column:share_customer;not null" json:"share_customer"` - ShareOrder bool `gorm:"column:share_order;not null" json:"share_order"` - ShareStock bool `gorm:"column:share_stock;not null" json:"share_stock"` - Active bool `gorm:"column:active;not null" json:"active"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` -} - -// TableName PsShopGroup's table name -func (*PsShopGroup) TableName() string { - return TableNamePsShopGroup -} diff --git a/app/model/prestadb/ps_stock.go b/app/model/prestadb/ps_stock.go deleted file mode 100644 index 6c9a77e..0000000 --- a/app/model/prestadb/ps_stock.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsStock = "ps_stock" - -// PsStock mapped from table -type PsStock struct { - IDStock int32 `gorm:"column:id_stock;primaryKey;autoIncrement:true" json:"id_stock"` - IDWarehouse int32 `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"` - IDProduct int32 `gorm:"column:id_product;not null;index:id_product,priority:1" json:"id_product"` - IDProductAttribute int32 `gorm:"column:id_product_attribute;not null;index:id_product_attribute,priority:1" json:"id_product_attribute"` - Reference string `gorm:"column:reference;not null" json:"reference"` - Ean13 *string `gorm:"column:ean13" json:"ean13"` - Isbn *string `gorm:"column:isbn" json:"isbn"` - Upc *string `gorm:"column:upc" json:"upc"` - PhysicalQuantity int32 `gorm:"column:physical_quantity;not null" json:"physical_quantity"` - UsableQuantity int32 `gorm:"column:usable_quantity;not null" json:"usable_quantity"` - PriceTe *float64 `gorm:"column:price_te;default:0.000000" json:"price_te"` -} - -// TableName PsStock's table name -func (*PsStock) TableName() string { - return TableNamePsStock -} diff --git a/app/model/prestadb/ps_stock_mvt.go b/app/model/prestadb/ps_stock_mvt.go deleted file mode 100644 index f13690c..0000000 --- a/app/model/prestadb/ps_stock_mvt.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsStockMvt = "ps_stock_mvt" - -// PsStockMvt mapped from table -type PsStockMvt struct { - IDStockMvt int64 `gorm:"column:id_stock_mvt;primaryKey;autoIncrement:true" json:"id_stock_mvt"` - IDStock int32 `gorm:"column:id_stock;not null;index:id_stock,priority:1" json:"id_stock"` - IDOrder *int32 `gorm:"column:id_order" json:"id_order"` - IDSupplyOrder *int32 `gorm:"column:id_supply_order" json:"id_supply_order"` - IDStockMvtReason int32 `gorm:"column:id_stock_mvt_reason;not null;index:id_stock_mvt_reason,priority:1" json:"id_stock_mvt_reason"` - IDEmployee int32 `gorm:"column:id_employee;not null" json:"id_employee"` - EmployeeLastname *string `gorm:"column:employee_lastname" json:"employee_lastname"` - EmployeeFirstname *string `gorm:"column:employee_firstname" json:"employee_firstname"` - PhysicalQuantity int32 `gorm:"column:physical_quantity;not null" json:"physical_quantity"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - Sign int32 `gorm:"column:sign;not null;default:1" json:"sign"` - PriceTe *float64 `gorm:"column:price_te;default:0.000000" json:"price_te"` - LastWa *float64 `gorm:"column:last_wa;default:0.000000" json:"last_wa"` - CurrentWa *float64 `gorm:"column:current_wa;default:0.000000" json:"current_wa"` - Referer *int64 `gorm:"column:referer" json:"referer"` -} - -// TableName PsStockMvt's table name -func (*PsStockMvt) TableName() string { - return TableNamePsStockMvt -} diff --git a/app/model/prestadb/ps_store.go b/app/model/prestadb/ps_store.go deleted file mode 100644 index c9e6a49..0000000 --- a/app/model/prestadb/ps_store.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsStore = "ps_store" - -// PsStore mapped from table -type PsStore struct { - IDStore int32 `gorm:"column:id_store;primaryKey;autoIncrement:true" json:"id_store"` - IDCountry int32 `gorm:"column:id_country;not null" json:"id_country"` - IDState *int32 `gorm:"column:id_state" json:"id_state"` - City string `gorm:"column:city;not null" json:"city"` - Postcode string `gorm:"column:postcode;not null" json:"postcode"` - Latitude *float64 `gorm:"column:latitude" json:"latitude"` - Longitude *float64 `gorm:"column:longitude" json:"longitude"` - Phone *string `gorm:"column:phone" json:"phone"` - Fax *string `gorm:"column:fax" json:"fax"` - Email *string `gorm:"column:email" json:"email"` - Active bool `gorm:"column:active;not null" json:"active"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` -} - -// TableName PsStore's table name -func (*PsStore) TableName() string { - return TableNamePsStore -} diff --git a/app/model/prestadb/ps_store_lang.go b/app/model/prestadb/ps_store_lang.go deleted file mode 100644 index 382a282..0000000 --- a/app/model/prestadb/ps_store_lang.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsStoreLang = "ps_store_lang" - -// PsStoreLang mapped from table -type PsStoreLang struct { - IDStore int32 `gorm:"column:id_store;primaryKey" json:"id_store"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Name string `gorm:"column:name;not null" json:"name"` - Address1 string `gorm:"column:address1;not null" json:"address1"` - Address2 *string `gorm:"column:address2" json:"address2"` - Hours *string `gorm:"column:hours" json:"hours"` - Note *string `gorm:"column:note" json:"note"` -} - -// TableName PsStoreLang's table name -func (*PsStoreLang) TableName() string { - return TableNamePsStoreLang -} diff --git a/app/model/prestadb/ps_supplier_lang.go b/app/model/prestadb/ps_supplier_lang.go deleted file mode 100644 index cca4872..0000000 --- a/app/model/prestadb/ps_supplier_lang.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsSupplierLang = "ps_supplier_lang" - -// PsSupplierLang mapped from table -type PsSupplierLang struct { - IDSupplier int32 `gorm:"column:id_supplier;primaryKey" json:"id_supplier"` - IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"` - Description *string `gorm:"column:description" json:"description"` - MetaTitle *string `gorm:"column:meta_title" json:"meta_title"` - MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"` - MetaDescription *string `gorm:"column:meta_description" json:"meta_description"` -} - -// TableName PsSupplierLang's table name -func (*PsSupplierLang) TableName() string { - return TableNamePsSupplierLang -} diff --git a/app/model/prestadb/ps_supply_order.go b/app/model/prestadb/ps_supply_order.go deleted file mode 100644 index fcdce9b..0000000 --- a/app/model/prestadb/ps_supply_order.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -import ( - "time" -) - -const TableNamePsSupplyOrder = "ps_supply_order" - -// PsSupplyOrder mapped from table -type PsSupplyOrder struct { - IDSupplyOrder int32 `gorm:"column:id_supply_order;primaryKey;autoIncrement:true" json:"id_supply_order"` - IDSupplier int32 `gorm:"column:id_supplier;not null;index:id_supplier,priority:1" json:"id_supplier"` - SupplierName string `gorm:"column:supplier_name;not null" json:"supplier_name"` - IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` - IDWarehouse int32 `gorm:"column:id_warehouse;not null;index:id_warehouse,priority:1" json:"id_warehouse"` - IDSupplyOrderState int32 `gorm:"column:id_supply_order_state;not null" json:"id_supply_order_state"` - IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` - IDRefCurrency int32 `gorm:"column:id_ref_currency;not null" json:"id_ref_currency"` - Reference string `gorm:"column:reference;not null;index:reference,priority:1" json:"reference"` - DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"` - DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"` - DateDeliveryExpected *time.Time `gorm:"column:date_delivery_expected" json:"date_delivery_expected"` - TotalTe *float64 `gorm:"column:total_te;default:0.000000" json:"total_te"` - TotalWithDiscountTe *float64 `gorm:"column:total_with_discount_te;default:0.000000" json:"total_with_discount_te"` - TotalTax *float64 `gorm:"column:total_tax;default:0.000000" json:"total_tax"` - TotalTi *float64 `gorm:"column:total_ti;default:0.000000" json:"total_ti"` - DiscountRate *float64 `gorm:"column:discount_rate;default:0.000000" json:"discount_rate"` - DiscountValueTe *float64 `gorm:"column:discount_value_te;default:0.000000" json:"discount_value_te"` - IsTemplate *bool `gorm:"column:is_template" json:"is_template"` -} - -// TableName PsSupplyOrder's table name -func (*PsSupplyOrder) TableName() string { - return TableNamePsSupplyOrder -} diff --git a/app/model/prestadb/ps_supply_order_detail.go b/app/model/prestadb/ps_supply_order_detail.go deleted file mode 100644 index 3c39475..0000000 --- a/app/model/prestadb/ps_supply_order_detail.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsSupplyOrderDetail = "ps_supply_order_detail" - -// PsSupplyOrderDetail mapped from table -type PsSupplyOrderDetail struct { - IDSupplyOrderDetail int32 `gorm:"column:id_supply_order_detail;primaryKey;autoIncrement:true" json:"id_supply_order_detail"` - IDSupplyOrder int32 `gorm:"column:id_supply_order;not null;index:id_supply_order,priority:1" json:"id_supply_order"` - IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` - IDProduct int32 `gorm:"column:id_product;not null;index:id_product_product_attribute,priority:1;index:id_supply_order,priority:2" json:"id_product"` - IDProductAttribute int32 `gorm:"column:id_product_attribute;not null;index:id_product_attribute,priority:1;index:id_product_product_attribute,priority:2" json:"id_product_attribute"` - Reference string `gorm:"column:reference;not null" json:"reference"` - SupplierReference string `gorm:"column:supplier_reference;not null" json:"supplier_reference"` - Name string `gorm:"column:name;not null" json:"name"` - Ean13 *string `gorm:"column:ean13" json:"ean13"` - Isbn *string `gorm:"column:isbn" json:"isbn"` - Upc *string `gorm:"column:upc" json:"upc"` - ExchangeRate *float64 `gorm:"column:exchange_rate;default:0.000000" json:"exchange_rate"` - UnitPriceTe *float64 `gorm:"column:unit_price_te;default:0.000000" json:"unit_price_te"` - QuantityExpected int32 `gorm:"column:quantity_expected;not null" json:"quantity_expected"` - QuantityReceived int32 `gorm:"column:quantity_received;not null" json:"quantity_received"` - PriceTe *float64 `gorm:"column:price_te;default:0.000000" json:"price_te"` - DiscountRate *float64 `gorm:"column:discount_rate;default:0.000000" json:"discount_rate"` - DiscountValueTe *float64 `gorm:"column:discount_value_te;default:0.000000" json:"discount_value_te"` - PriceWithDiscountTe *float64 `gorm:"column:price_with_discount_te;default:0.000000" json:"price_with_discount_te"` - TaxRate *float64 `gorm:"column:tax_rate;default:0.000000" json:"tax_rate"` - TaxValue *float64 `gorm:"column:tax_value;default:0.000000" json:"tax_value"` - PriceTi *float64 `gorm:"column:price_ti;default:0.000000" json:"price_ti"` - TaxValueWithOrderDiscount *float64 `gorm:"column:tax_value_with_order_discount;default:0.000000" json:"tax_value_with_order_discount"` - PriceWithOrderDiscountTe *float64 `gorm:"column:price_with_order_discount_te;default:0.000000" json:"price_with_order_discount_te"` -} - -// TableName PsSupplyOrderDetail's table name -func (*PsSupplyOrderDetail) TableName() string { - return TableNamePsSupplyOrderDetail -} diff --git a/app/model/prestadb/ps_supply_order_state.go b/app/model/prestadb/ps_supply_order_state.go deleted file mode 100644 index 37e6f9a..0000000 --- a/app/model/prestadb/ps_supply_order_state.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsSupplyOrderState = "ps_supply_order_state" - -// PsSupplyOrderState mapped from table -type PsSupplyOrderState struct { - IDSupplyOrderState int32 `gorm:"column:id_supply_order_state;primaryKey;autoIncrement:true" json:"id_supply_order_state"` - DeliveryNote bool `gorm:"column:delivery_note;not null" json:"delivery_note"` - Editable bool `gorm:"column:editable;not null" json:"editable"` - ReceiptState bool `gorm:"column:receipt_state;not null" json:"receipt_state"` - PendingReceipt bool `gorm:"column:pending_receipt;not null" json:"pending_receipt"` - Enclosed bool `gorm:"column:enclosed;not null" json:"enclosed"` - Color *string `gorm:"column:color" json:"color"` -} - -// TableName PsSupplyOrderState's table name -func (*PsSupplyOrderState) TableName() string { - return TableNamePsSupplyOrderState -} diff --git a/app/model/prestadb/ps_tab.go b/app/model/prestadb/ps_tab.go deleted file mode 100644 index 3017297..0000000 --- a/app/model/prestadb/ps_tab.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsTab = "ps_tab" - -// PsTab mapped from table -type PsTab struct { - IDTab int32 `gorm:"column:id_tab;primaryKey;autoIncrement:true" json:"id_tab"` - IDParent int32 `gorm:"column:id_parent;not null" json:"id_parent"` - Position int32 `gorm:"column:position;not null" json:"position"` - Module *string `gorm:"column:module" json:"module"` - ClassName *string `gorm:"column:class_name" json:"class_name"` - Active bool `gorm:"column:active;not null" json:"active"` - HideHostMode bool `gorm:"column:hide_host_mode;not null" json:"hide_host_mode"` - Icon *string `gorm:"column:icon" json:"icon"` -} - -// TableName PsTab's table name -func (*PsTab) TableName() string { - return TableNamePsTab -} diff --git a/app/model/prestadb/ps_tax.go b/app/model/prestadb/ps_tax.go deleted file mode 100644 index d128f34..0000000 --- a/app/model/prestadb/ps_tax.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsTax = "ps_tax" - -// PsTax mapped from table -type PsTax struct { - IDTax int32 `gorm:"column:id_tax;primaryKey;autoIncrement:true" json:"id_tax"` - Rate float64 `gorm:"column:rate;not null" json:"rate"` - Active bool `gorm:"column:active;not null;default:1" json:"active"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` -} - -// TableName PsTax's table name -func (*PsTax) TableName() string { - return TableNamePsTax -} diff --git a/app/model/prestadb/ps_unit_lang.go b/app/model/prestadb/ps_unit_lang.go deleted file mode 100644 index 8e55aca..0000000 --- a/app/model/prestadb/ps_unit_lang.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsUnitLang = "ps_unit_lang" - -// PsUnitLang mapped from table -type PsUnitLang struct { - IDUnit int32 `gorm:"column:id_unit;not null" json:"id_unit"` - IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"` - Name string `gorm:"column:name;not null" json:"name"` - Symbol string `gorm:"column:symbol;not null" json:"symbol"` -} - -// TableName PsUnitLang's table name -func (*PsUnitLang) TableName() string { - return TableNamePsUnitLang -} diff --git a/app/model/prestadb/ps_warehouse.go b/app/model/prestadb/ps_warehouse.go deleted file mode 100644 index 99cfbe9..0000000 --- a/app/model/prestadb/ps_warehouse.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. -// Code generated by gorm.io/gen. DO NOT EDIT. - -package prestadb - -const TableNamePsWarehouse = "ps_warehouse" - -// PsWarehouse mapped from table -type PsWarehouse struct { - IDWarehouse int32 `gorm:"column:id_warehouse;primaryKey;autoIncrement:true" json:"id_warehouse"` - IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"` - IDAddress int32 `gorm:"column:id_address;not null" json:"id_address"` - IDEmployee int32 `gorm:"column:id_employee;not null" json:"id_employee"` - Reference *string `gorm:"column:reference" json:"reference"` - Name string `gorm:"column:name;not null" json:"name"` - ManagementType string `gorm:"column:management_type;not null;default:WA" json:"management_type"` - Deleted bool `gorm:"column:deleted;not null" json:"deleted"` -} - -// TableName PsWarehouse's table name -func (*PsWarehouse) TableName() string { - return TableNamePsWarehouse -} diff --git a/app/model/productDescription.go b/app/model/productDescription.go index 29208a6..cb84fc8 100644 --- a/app/model/productDescription.go +++ b/app/model/productDescription.go @@ -30,30 +30,30 @@ type ProductRow struct { } type MeiliSearchProduct struct { - ProductID uint `gorm:"column:id_product" json:"product_id"` - Name string `gorm:"column:name" json:"name"` - Active uint8 `gorm:"column:active" json:"active"` - Description string `gorm:"column:description" json:"description"` - DescriptionShort string `gorm:"column:description_short" json:"description_short"` - Usage string `gorm:"column:used_for" json:"usage"` - EAN13 string `gorm:"column:ean13" json:"ean13"` - Reference string `gorm:"column:reference" json:"reference"` - Price float64 `gorm:"column:price" json:"price"` - CategoryID uint `gorm:"column:id_category" json:"category_id"` - CategoryName string `gorm:"column:category_name" json:"category_name"` - Variations uint `gorm:"column:variations" json:"variations"` + ProductID uint `gorm:"column:id_product" json:"product_id"` + Name string `gorm:"column:name" json:"name"` + // Active uint8 `gorm:"column:active" json:"active"` + // Description string `gorm:"column:description" json:"description"` + Description string `gorm:"column:description" json:"description"` + // Usage string `gorm:"column:used_for" json:"usage"` + EAN13 string `gorm:"column:ean13" json:"ean13"` + Reference string `gorm:"column:reference" json:"reference"` + Price float64 `gorm:"column:price" json:"price"` + CategoryID uint `gorm:"column:id_category" json:"category_id"` + CatName string `gorm:"column:cat_name" json:"cat_name"` + LRew string `gorm:"column:l_rew" json:"l_rew"` // JSON fields stored as raw, converted to string for search - Attributes json.RawMessage `gorm:"column:attributes" json:"attributes"` - Features json.RawMessage `gorm:"column:features" json:"features"` - AttributeFilters json.RawMessage `gorm:"column:attribute_filters" json:"attribute_filters"` + Attr json.RawMessage `gorm:"column:attr" json:"attr"` + // AttributeFilters json.RawMessage `gorm:"column:attribute_filters" json:"attribute_filters"` + Feat json.RawMessage `gorm:"column:feat" json:"feat"` // String versions for searchable text (populated during indexing) - FeaturesStr string `json:"features_str"` - AttributesStr string `json:"attributes_str"` - AttributeFiltersStr string `json:"attribute_filters_str"` + FeaturesStr string `gorm:"-" json:"features_str"` + AttributesStr string `gorm:"-" json:"attributes_str"` + AttributeFiltersStr string `gorm:"-" json:"attribute_filters_str"` - CategoryIDs json.RawMessage `gorm:"column:category_ids" json:"category_ids"` // All category IDs including children for filtering IDImage uint `gorm:"column:id_image" json:"id_image"` // Cover image ID (not indexed) - CoverImage string `json:"cover_image"` // Cover image URL (populated during indexing) + CategoryIDs json.RawMessage `gorm:"column:category_ids" json:"category_ids"` // All category IDs including children for filtering + Variations uint `gorm:"column:variations" json:"variations"` } diff --git a/app/repos/attributeRepo/attributeRepo.go b/app/repos/attributeRepo/attributeRepo.go new file mode 100644 index 0000000..24e44cc --- /dev/null +++ b/app/repos/attributeRepo/attributeRepo.go @@ -0,0 +1,109 @@ +package attributerepo + +import ( + "git.ma-al.com/goc_daniel/b2b/app/db" + "git.ma-al.com/goc_daniel/b2b/app/model/dbmodel" +) + +type AttributeWithColor struct { + ID uint + Name string + Color string +} + +type AttributeGroupWithAttrs struct { + GroupName string + Attrs map[uint]AttributeWithColor +} + +type UIAttributeRepo interface { + GetAttributeGroupsWithAttributes(groupIDs []uint, attrIDs []uint, idLang uint) (map[uint]AttributeGroupWithAttrs, error) +} + +type AttributeRepo struct{} + +func New() UIAttributeRepo { + return &AttributeRepo{} +} + +func (r *AttributeRepo) GetAttributeGroupsWithAttributes(groupIDs []uint, attrIDs []uint, idLang uint) (map[uint]AttributeGroupWithAttrs, error) { + result := make(map[uint]AttributeGroupWithAttrs) + + if len(groupIDs) == 0 && len(attrIDs) == 0 { + return result, nil + } + + if len(attrIDs) > 0 { + type attrResult struct { + IDAttribute int32 + IDAttributeGroup int32 + GroupName string + AttrName string + Color string + } + + var attrs []attrResult + if err := db.Get(). + Model(dbmodel.PsAttribute{}). + Select(` + ps_attribute.id_attribute, + ps_attribute.id_attribute_group, + COALESCE(ps_attribute_group_lang.name, '') as group_name, + COALESCE(ps_attribute_lang.name, '') as attr_name, + ps_attribute.color + `). + Joins("LEFT JOIN ps_attribute_lang ON ps_attribute_lang.id_attribute = ps_attribute.id_attribute AND ps_attribute_lang.id_lang = ?", idLang). + Joins("LEFT JOIN ps_attribute_group_lang ON ps_attribute_group_lang.id_attribute_group = ps_attribute.id_attribute_group AND ps_attribute_group_lang.id_lang = ?", idLang). + Where("ps_attribute.id_attribute IN ?", attrIDs). + Scan(&attrs).Error; err != nil { + return nil, err + } + + for _, a := range attrs { + if _, exists := result[uint(a.IDAttributeGroup)]; !exists { + result[uint(a.IDAttributeGroup)] = AttributeGroupWithAttrs{ + GroupName: a.GroupName, + Attrs: make(map[uint]AttributeWithColor), + } + } + result[uint(a.IDAttributeGroup)].Attrs[uint(a.IDAttribute)] = AttributeWithColor{ + ID: uint(a.IDAttribute), + Name: a.AttrName, + Color: a.Color, + } + } + } + + if len(groupIDs) > 0 { + type groupResult struct { + IDAttributeGroup int32 + GroupName string + } + + var groups []groupResult + if err := db.Get(). + Model(dbmodel.PsAttributeGroupLang{}). + Select("ps_attribute_group_lang.id_attribute_group, COALESCE(ps_attribute_group_lang.name, '') as group_name"). + Where("ps_attribute_group_lang.id_attribute_group IN ?", groupIDs). + Where("ps_attribute_group_lang.id_lang = ?", idLang). + Scan(&groups).Error; err != nil { + return nil, err + } + + for _, g := range groups { + if existing, ok := result[uint(g.IDAttributeGroup)]; ok { + if g.GroupName != "" { + existing.GroupName = g.GroupName + result[uint(g.IDAttributeGroup)] = existing + } + } else { + result[uint(g.IDAttributeGroup)] = AttributeGroupWithAttrs{ + GroupName: g.GroupName, + Attrs: make(map[uint]AttributeWithColor), + } + } + } + } + + return result, nil +} diff --git a/app/repos/categoriesRepo/categoriesRepo.go b/app/repos/categoriesRepo/categoriesRepo.go index e838ff0..45fdc2d 100644 --- a/app/repos/categoriesRepo/categoriesRepo.go +++ b/app/repos/categoriesRepo/categoriesRepo.go @@ -3,11 +3,12 @@ package categoriesRepo import ( "git.ma-al.com/goc_daniel/b2b/app/db" "git.ma-al.com/goc_daniel/b2b/app/model" + "git.ma-al.com/goc_daniel/b2b/app/model/dbmodel" constdata "git.ma-al.com/goc_daniel/b2b/app/utils/const_data" ) type UICategoriesRepo interface { - GetAllCategories(id_lang uint) ([]model.ScannedCategory, error) + GetAllCategories(idLang uint) ([]model.ScannedCategory, error) } type CategoriesRepo struct{} @@ -16,11 +17,16 @@ func New() UICategoriesRepo { return &CategoriesRepo{} } -func (repo *CategoriesRepo) GetAllCategories(id_lang uint) ([]model.ScannedCategory, error) { +func (r *CategoriesRepo) GetAllCategories(idLang uint) ([]model.ScannedCategory, error) { var allCategories []model.ScannedCategory - err := db.DB. - Table("ps_category"). + categoryTbl := (&dbmodel.PsCategory{}).TableName() + categoryLangTbl := (&dbmodel.PsCategoryLang{}).TableName() + categoryShopTbl := (&dbmodel.PsCategoryShop{}).TableName() + langTbl := (&dbmodel.PsLang{}).TableName() + + err := db.Get(). + Model(dbmodel.PsCategory{}). Select(` ps_category.id_category AS category_id, ps_category_lang.name AS name, @@ -31,21 +37,12 @@ func (repo *CategoriesRepo) GetAllCategories(id_lang uint) ([]model.ScannedCateg ps_category_lang.link_rewrite AS link_rewrite, ps_lang.iso_code AS iso_code `). - Joins(` - LEFT JOIN ps_category_lang - ON ps_category_lang.id_category = ps_category.id_category - AND ps_category_lang.id_shop = ? - AND ps_category_lang.id_lang = ? - `, constdata.SHOP_ID, id_lang). - Joins(` - LEFT JOIN ps_category_shop - ON ps_category_shop.id_category = ps_category.id_category - AND ps_category_shop.id_shop = ? - `, constdata.SHOP_ID). - Joins(` - JOIN ps_lang - ON ps_lang.id_lang = ps_category_lang.id_lang - `). + Joins(`LEFT JOIN ? ON ??.id_category = ??.id_category AND ??.id_shop = ? AND ??.id_lang = ?`, + categoryLangTbl, categoryLangTbl, categoryTbl, categoryLangTbl, constdata.SHOP_ID, categoryLangTbl, idLang). + Joins(`LEFT JOIN ? ON ??.id_category = ??.id_category AND ??.id_shop = ?`, + categoryShopTbl, categoryShopTbl, categoryTbl, categoryShopTbl, constdata.SHOP_ID). + Joins(`JOIN ? ON ??.id_lang = ??.id_lang`, + langTbl, langTbl, categoryLangTbl). Scan(&allCategories).Error return allCategories, err diff --git a/app/repos/categoryRepo/categoryRepo.go b/app/repos/categoryRepo/categoryRepo.go new file mode 100644 index 0000000..dd31f39 --- /dev/null +++ b/app/repos/categoryRepo/categoryRepo.go @@ -0,0 +1,44 @@ +package categoryrepo + +import ( + "git.ma-al.com/goc_daniel/b2b/app/db" + "git.ma-al.com/goc_daniel/b2b/app/model/dbmodel" +) + +type UICategoryRepo interface { + GetCategoryTranslations(ids []uint, idLang uint) (map[uint]string, error) +} + +type CategoryRepo struct{} + +func New() UICategoryRepo { + return &CategoryRepo{} +} + +func (r *CategoryRepo) GetCategoryTranslations(ids []uint, idLang uint) (map[uint]string, error) { + if len(ids) == 0 { + return map[uint]string{}, nil + } + + type result struct { + IDCategory int32 + Name string + } + + var results []result + if err := db.Get(). + Model(dbmodel.PsCategoryLang{}). + Select("ps_category_lang.id_category, COALESCE(ps_category_lang.name, '') as name"). + Where("ps_category_lang.id_category IN ?", ids). + Where("ps_category_lang.id_lang = ?", idLang). + Scan(&results).Error; err != nil { + return nil, err + } + + translations := make(map[uint]string, len(results)) + for _, res := range results { + translations[uint(res.IDCategory)] = res.Name + } + + return translations, nil +} diff --git a/app/repos/featureRepo/featureRepo.go b/app/repos/featureRepo/featureRepo.go new file mode 100644 index 0000000..719f8df --- /dev/null +++ b/app/repos/featureRepo/featureRepo.go @@ -0,0 +1,95 @@ +package featurerepo + +import ( + "git.ma-al.com/goc_daniel/b2b/app/db" + "git.ma-al.com/goc_daniel/b2b/app/model/dbmodel" +) + +type FeatureGroupWithValues struct { + FeatureName string + Values map[uint]string +} + +type UIFeatureRepo interface { + GetFeaturesWithValues(featureIDs []uint, featureValueIDs []uint, idLang uint) (map[uint]FeatureGroupWithValues, error) +} + +type FeatureRepo struct{} + +func New() UIFeatureRepo { + return &FeatureRepo{} +} + +func (r *FeatureRepo) GetFeaturesWithValues(featureIDs []uint, featureValueIDs []uint, idLang uint) (map[uint]FeatureGroupWithValues, error) { + result := make(map[uint]FeatureGroupWithValues) + + if len(featureIDs) == 0 && len(featureValueIDs) == 0 { + return result, nil + } + + if len(featureValueIDs) > 0 { + type valueResult struct { + IDFeatureValue int32 + IDFeature int32 + Value string + } + + var values []valueResult + if err := db.Get(). + Model(dbmodel.PsFeatureValueLang{}). + Select(` + ps_feature_value_lang.id_feature_value, + ps_feature_value.id_feature, + COALESCE(ps_feature_value_lang.value, '') as value + `). + Joins("LEFT JOIN ps_feature_value ON ps_feature_value.id_feature_value = ps_feature_value_lang.id_feature_value"). + Where("ps_feature_value_lang.id_lang = ?", idLang). + Where("ps_feature_value_lang.id_feature_value IN ?", featureValueIDs). + Scan(&values).Error; err != nil { + return nil, err + } + + for _, v := range values { + if _, exists := result[uint(v.IDFeature)]; !exists { + result[uint(v.IDFeature)] = FeatureGroupWithValues{ + FeatureName: v.Value, + Values: make(map[uint]string), + } + } + result[uint(v.IDFeature)].Values[uint(v.IDFeatureValue)] = v.Value + } + } + + if len(featureIDs) > 0 { + type featureResult struct { + IDFeature int32 + FeatureName string + } + + var features []featureResult + if err := db.Get(). + Model(dbmodel.PsFeatureLang{}). + Select("ps_feature_lang.id_feature, COALESCE(ps_feature_lang.name, '') as feature_name"). + Where("ps_feature_lang.id_feature IN ?", featureIDs). + Where("ps_feature_lang.id_lang = ?", idLang). + Scan(&features).Error; err != nil { + return nil, err + } + + for _, f := range features { + if existing, ok := result[uint(f.IDFeature)]; ok { + if f.FeatureName != "" { + existing.FeatureName = f.FeatureName + result[uint(f.IDFeature)] = existing + } + } else { + result[uint(f.IDFeature)] = FeatureGroupWithValues{ + FeatureName: f.FeatureName, + Values: make(map[uint]string), + } + } + } + } + + return result, nil +} diff --git a/app/repos/listProductsRepo/listProductsRepo.go b/app/repos/listProductsRepo/listProductsRepo.go index 32739d9..2440a46 100644 --- a/app/repos/listProductsRepo/listProductsRepo.go +++ b/app/repos/listProductsRepo/listProductsRepo.go @@ -1,10 +1,13 @@ package listProductsRepo import ( + "git.ma-al.com/goc_daniel/b2b/app/config" "git.ma-al.com/goc_daniel/b2b/app/db" "git.ma-al.com/goc_daniel/b2b/app/model" + "git.ma-al.com/goc_daniel/b2b/app/model/dbmodel" "git.ma-al.com/goc_daniel/b2b/app/utils/query/filters" "git.ma-al.com/goc_daniel/b2b/app/utils/query/find" + "github.com/WinterYukky/gorm-extra-clause-plugin/exclause" ) type UIListProductsRepo interface { @@ -22,26 +25,32 @@ func (repo *ListProductsRepo) GetListing(id_lang uint, p find.Paging, filt *filt var total int64 query := db.Get(). - Table("ps_product_shop AS ps"). + Table("ps_product_shop ps"). Select(` - ps.id_product AS product_id, - pl.name AS name, - pl.link_rewrite AS link_rewrite, - CONCAT('https://www.naluconcept.com', '/', ims.id_image, '-small_default/', pl.link_rewrite, '.webp') AS image_link, - cl.name AS category_name, - p.reference AS reference, - COUNT(DISTINCT pas.id_product_attribute) AS variants_number, - sa.quantity AS quantity - `). - Joins("JOIN ps_product p ON p.id_product = ps.id_product"). - Joins("JOIN ps_category_product cp ON ps.id_product = cp.id_product"). + ps.id_product AS product_id, + pl.name AS name, + pl.link_rewrite AS link_rewrite, + CONCAT(?, ims.id_image, '-small_default/', pl.link_rewrite, '.webp') AS image_link, + cl.name AS category_name, + p.reference AS reference, + COALESCE(v.variants_number, 0) AS variants_number, + sa.quantity AS quantity + `, config.Get().Image.ImagePrefix). + Joins("JOIN "+dbmodel.PsProductCols.IDProduct.Tab()+" p ON p.id_product = ps.id_product"). Joins("JOIN ps_product_lang pl ON pl.id_product = ps.id_product AND pl.id_lang = ?", id_lang). Joins("JOIN ps_image_shop ims ON ims.id_product = ps.id_product AND ims.cover = 1"). Joins("JOIN ps_category_lang cl ON cl.id_category = ps.id_category_default AND cl.id_lang = ?", id_lang). - Joins("LEFT JOIN ps_product_attribute_shop pas ON pas.id_product = cp.id_product"). - Joins("LEFT JOIN ps_stock_available sa ON sa.id_product = ps.id_product"). + Joins("JOIN ps_category_product cp ON cp.id_product = ps.id_product"). + Joins("LEFT JOIN variants v ON v.id_product = ps.id_product"). + Joins("LEFT JOIN ps_stock_available sa ON sa.id_product = ps.id_product AND sa.id_product_attribute = 0"). Where("ps.active = ?", 1). - Group("cp.id_product") + Group("ps.id_product"). + Clauses(exclause.With{CTEs: []exclause.CTE{ + { + Name: "variants", + Subquery: exclause.Subquery{DB: db.Get().Model(&dbmodel.PsProductAttributeShop{}).Select("id_product", "COUNT(*) AS variants_number").Group("id_product")}, + }, + }}) // Apply all filters if filt != nil { @@ -58,7 +67,7 @@ func (repo *ListProductsRepo) GetListing(id_lang uint, p find.Paging, filt *filt Order("ps.id_product DESC"). Limit(p.Limit()). Offset(p.Offset()). - Scan(&listing).Error + Find(&listing).Error if err != nil { return find.Found[model.ProductInList]{}, err } diff --git a/app/repos/localeSelectorRepo/localeSelectorRepo.go b/app/repos/localeSelectorRepo/localeSelectorRepo.go index 9342eac..1840ad5 100644 --- a/app/repos/localeSelectorRepo/localeSelectorRepo.go +++ b/app/repos/localeSelectorRepo/localeSelectorRepo.go @@ -16,22 +16,16 @@ func New() UILocaleSelectorRepo { return &LocaleSelectorRepo{} } -func (repo *LocaleSelectorRepo) GetLanguages() ([]model.Language, error) { +func (r *LocaleSelectorRepo) GetLanguages() ([]model.Language, error) { var languages []model.Language - - err := db.DB.Table("b2b_language").Scan(&languages).Error - + err := db.Get().Find(&languages).Error return languages, err } -func (repo *LocaleSelectorRepo) GetCountriesAndCurrencies() ([]model.Country, error) { +func (r *LocaleSelectorRepo) GetCountriesAndCurrencies() ([]model.Country, error) { var countries []model.Country - - err := db.DB. - Table("b2b_countries"). - Select("b2b_countries.id, b2b_countries.name, b2b_countries.flag, ps_currency.id_currency as id_currency, ps_currency.name as currency_name, ps_currency.iso_code as currency_iso_code"). - Joins("LEFT JOIN ps_currency ON ps_currency.id_currency = b2b_countries.currency_id"). - Scan(&countries).Error - + err := db.Get(). + Preload("PSCurrency"). + Find(&countries).Error return countries, err } diff --git a/app/repos/productDescriptionRepo/productDescriptionRepo.go b/app/repos/productDescriptionRepo/productDescriptionRepo.go index dd9fc5a..a5e7cbb 100644 --- a/app/repos/productDescriptionRepo/productDescriptionRepo.go +++ b/app/repos/productDescriptionRepo/productDescriptionRepo.go @@ -5,14 +5,16 @@ import ( "git.ma-al.com/goc_daniel/b2b/app/db" "git.ma-al.com/goc_daniel/b2b/app/model" + "git.ma-al.com/goc_daniel/b2b/app/model/dbmodel" constdata "git.ma-al.com/goc_daniel/b2b/app/utils/const_data" + "github.com/WinterYukky/gorm-extra-clause-plugin/exclause" ) type UIProductDescriptionRepo interface { GetProductDescription(productID uint, productid_lang uint) (*model.ProductDescription, error) CreateIfDoesNotExist(productID uint, productid_lang uint) error UpdateFields(productID uint, productid_lang uint, updates map[string]string) error - GetMeiliProducts(id_lang uint) ([]model.MeiliSearchProduct, error) + GetMeiliProducts(id_lang uint, offset, limit int) ([]model.MeiliSearchProduct, error) } type ProductDescriptionRepo struct{} @@ -25,9 +27,12 @@ func New() UIProductDescriptionRepo { func (r *ProductDescriptionRepo) GetProductDescription(productID uint, productid_lang uint) (*model.ProductDescription, error) { var ProductDescription model.ProductDescription - err := db.DB. - Table("ps_product_lang"). - Where("id_product = ? AND id_shop = ? AND id_lang = ?", productID, constdata.SHOP_ID, productid_lang). + err := db.Get(). + Where(&dbmodel.PsProductLang{ + IDProduct: int32(productID), + IDShop: int32(constdata.SHOP_ID), + IDLang: int32(productid_lang), + }). First(&ProductDescription).Error if err != nil { return nil, fmt.Errorf("database error: %w", err) @@ -44,9 +49,12 @@ func (r *ProductDescriptionRepo) CreateIfDoesNotExist(productID uint, productid_ LangID: productid_lang, } - err := db.DB. - Table("ps_product_lang"). - Where("id_product = ? AND id_shop = ? AND id_lang = ?", productID, constdata.SHOP_ID, productid_lang). + err := db.Get(). + Where(&dbmodel.PsProductLang{ + IDProduct: int32(productID), + IDShop: int32(constdata.SHOP_ID), + IDLang: int32(productid_lang), + }). FirstOrCreate(&record).Error if err != nil { return fmt.Errorf("database error: %w", err) @@ -64,9 +72,13 @@ func (r *ProductDescriptionRepo) UpdateFields(productID uint, productid_lang uin updatesIface[k] = v } - err := db.DB. - Table("ps_product_lang"). - Where("id_product = ? AND id_shop = ? AND id_lang = ?", productID, constdata.SHOP_ID, productid_lang). + err := db.Get(). + Model(&dbmodel.PsProductLang{}). + Where(&dbmodel.PsProductLang{ + IDProduct: int32(productID), + IDShop: int32(constdata.SHOP_ID), + IDLang: int32(productid_lang), + }). Updates(updatesIface).Error if err != nil { return fmt.Errorf("database error: %w", err) @@ -75,127 +87,107 @@ func (r *ProductDescriptionRepo) UpdateFields(productID uint, productid_lang uin return nil } -// We assume that any user has access to all product descriptions -func (r *ProductDescriptionRepo) GetMeiliProducts(id_lang uint) ([]model.MeiliSearchProduct, error) { +// GetMeiliProductsBatchedScanned returns a batch of products with LIMIT/OFFSET pagination +// The scanning is done inside the repo to keep the service layer cleaner +func (r *ProductDescriptionRepo) GetMeiliProducts(id_lang uint, offset, limit int) ([]model.MeiliSearchProduct, error) { + var products []model.MeiliSearchProduct - query := db.Get().Debug().Raw(` - WITH products_page AS ( - SELECT ps.id_product, ps.price - FROM ps_product_shop ps - WHERE ps.id_shop = ? AND ps.active = 1 - ), - variation_attributes AS ( - SELECT pas.id_product, pagl.public_name AS attribute_name, - JSON_ARRAYAGG(DISTINCT pal.name) AS attribute_values - FROM ps_product_attribute_shop pas - JOIN ps_product_attribute_combination ppac - ON ppac.id_product_attribute = pas.id_product_attribute - JOIN ps_attribute_lang pal - ON pal.id_attribute = ppac.id_attribute AND pal.id_lang = ? - JOIN ps_attribute pa - ON pa.id_attribute = ppac.id_attribute - JOIN ps_attribute_group pag - ON pag.id_attribute_group = pa.id_attribute_group - JOIN ps_attribute_group_lang pagl - ON pagl.id_attribute_group = pag.id_attribute_group AND pagl.id_lang = ? - WHERE pas.id_shop = ? - GROUP BY pas.id_product, pagl.public_name - ), - variations AS ( - SELECT id_product, JSON_OBJECTAGG(attribute_name, attribute_values) AS attributes - FROM variation_attributes - GROUP BY id_product - ), - variation_attribute_filters AS ( - SELECT pas.id_product, - JSON_ARRAYAGG( - DISTINCT CONCAT( - LOWER(REPLACE(CAST(pagl.public_name AS CHAR) COLLATE utf8mb4_unicode_ci, ' ', '_')), - ':', - LOWER(REPLACE(CAST(pal.name AS CHAR) COLLATE utf8mb4_unicode_ci, ' ', '_')) - ) - ) AS attribute_filters - FROM ps_product_attribute_shop pas - JOIN ps_product_attribute_combination ppac - ON ppac.id_product_attribute = pas.id_product_attribute - JOIN ps_attribute_lang pal - ON pal.id_attribute = ppac.id_attribute AND pal.id_lang = ? - JOIN ps_attribute pa - ON pa.id_attribute = ppac.id_attribute - JOIN ps_attribute_group pag - ON pag.id_attribute_group = pa.id_attribute_group - JOIN ps_attribute_group_lang pagl - ON pagl.id_attribute_group = pag.id_attribute_group AND pagl.id_lang = ? - WHERE pas.id_shop = ? - GROUP BY pas.id_product - ), - features AS ( - SELECT pfp.id_product, JSON_OBJECTAGG(pfl.name, pfvl.value) AS features - FROM ps_feature_product pfp - JOIN ps_feature_lang pfl - ON pfl.id_feature = pfp.id_feature AND pfl.id_lang = ? - JOIN ps_feature_value_lang pfvl - ON pfvl.id_feature_value = pfp.id_feature_value AND pfvl.id_lang = ? - GROUP BY pfp.id_product - ), - images AS ( - SELECT id_product, id_image - FROM ps_image_shop - WHERE id_shop = ? AND cover = 1 - ), - categories AS ( - SELECT id_product, JSON_ARRAYAGG(id_category) AS category_ids - FROM ps_category_product - GROUP BY id_product - ) - SELECT pp.id_product, - pl.name, - TRIM(REGEXP_REPLACE(REGEXP_REPLACE(pl.description, '<[^>]*>', ' '), '[[:space:]]+', ' ')) AS description, - TRIM(REGEXP_REPLACE(REGEXP_REPLACE(pl.description_short, '<[^>]*>', ' '), '[[:space:]]+', ' ')) AS description_short, - TRIM(REGEXP_REPLACE(REGEXP_REPLACE(pl.usage, '<[^>]*>', ' '), '[[:space:]]+', ' ')) AS used_for, - p.ean13, - p.reference, - pp.price, - ps.id_category_default AS id_category, - cl.name AS category_name, - cl.link_rewrite, - COALESCE(vary.attributes, JSON_OBJECT()) AS attributes, - COALESCE(vaf.attribute_filters, JSON_ARRAY()) AS attribute_filters, - COALESCE(feat.features, JSON_OBJECT()) AS features, - img.id_image, - cat.category_ids, - (SELECT COUNT(*) FROM ps_product_attribute_shop pas2 WHERE pas2.id_product = pp.id_product AND pas2.id_shop = ?) AS variations - FROM products_page pp - JOIN ps_product_shop ps ON ps.id_product = pp.id_product - JOIN ps_product_lang pl - ON pl.id_product = ps.id_product AND pl.id_shop = ? AND pl.id_lang = ? - JOIN ps_product p ON p.id_product = ps.id_product - JOIN ps_category_lang cl - ON cl.id_category = ps.id_category_default AND cl.id_shop = ? AND cl.id_lang = ? - LEFT JOIN variations vary ON vary.id_product = ps.id_product - LEFT JOIN variation_attribute_filters vaf ON vaf.id_product = ps.id_product - LEFT JOIN features feat ON feat.id_product = ps.id_product - LEFT JOIN images img ON img.id_product = ps.id_product - LEFT JOIN categories cat ON cat.id_product = ps.id_product - ORDER BY ps.id_product - `, - constdata.SHOP_ID, // products_page - id_lang, id_lang, // variation_attributes pal.id_lang, pagl.id_lang - constdata.SHOP_ID, // variation_attributes pas.id_shop - id_lang, id_lang, // variation_attribute_filters pal.id_lang, pagl.id_lang - constdata.SHOP_ID, // variation_attribute_filters pas.id_shop - id_lang, id_lang, // features pfl.id_lang, pfvl.id_lang - constdata.SHOP_ID, // images id_shop - constdata.SHOP_ID, // variation count subquery - constdata.SHOP_ID, // ps_product_lang pl.id_shop - id_lang, // ps_product_lang pl.id_lang - constdata.SHOP_ID, // ps_category_lang cl.id_shop - id_lang, // ps_category_lang cl.id_lang - ) - if err := query.Scan(&products).Error; err != nil { - return products, fmt.Errorf("database error: %w", err) - } + err := db.Get(). + Table("ps_product_shop ps"). + Select(` + ps.id_product AS id_product, + pl.name AS name, + TRIM(REGEXP_REPLACE(REGEXP_REPLACE(pl.description_short, '<[^>]*>', ' '), '[[:space:]]+', ' ')) AS description, + p.ean13, + p.reference, + ps.price, + ps.id_category_default AS id_category, + cl.name AS cat_name, + cl.link_rewrite AS l_rew, + COALESCE(vary.attributes, JSON_OBJECT()) AS attr, + COALESCE(feat.features, JSON_OBJECT()) AS feat, + img.id_image, + cat.category_ids, + (SELECT COUNT(*) FROM ps_product_attribute_shop pas2 WHERE pas2.id_product = ps.id_product AND pas2.id_shop = ?) AS variations + `, constdata.SHOP_ID). + Joins("JOIN ps_product p ON p.id_product = ps.id_product"). + Joins("JOIN ps_product_lang pl ON pl.id_product = ps.id_product AND pl.id_shop = ? AND pl.id_lang = ?", constdata.SHOP_ID, id_lang). + Joins("JOIN ps_category_lang cl ON cl.id_category = ps.id_category_default AND cl.id_shop = ? AND cl.id_lang = ?", constdata.SHOP_ID, id_lang). + Joins("LEFT JOIN variations vary ON vary.id_product = ps.id_product"). + Joins("LEFT JOIN features feat ON feat.id_product = ps.id_product"). + Joins("LEFT JOIN images img ON img.id_product = ps.id_product"). + Joins("LEFT JOIN categories cat ON cat.id_product = ps.id_product"). + Joins("JOIN products_page pp ON pp.id_product = ps.id_product"). + Where("ps.active = ?", 1). + Order("ps.id_product"). + Clauses(exclause.With{CTEs: []exclause.CTE{ + { + Name: "products_page", + Subquery: exclause.Subquery{ + DB: db.Get(). + Model(&dbmodel.PsProductShop{}). + Select("id_product, price"). + Where("id_shop = ? AND active = 1", constdata.SHOP_ID). + Order("id_product"). + Limit(limit). + Offset(offset), + }, + }, + { + Name: "variation_attributes", + Subquery: exclause.Subquery{ + DB: db.Get(). + Table("ps_product_attribute_shop pas"). // <- explicit alias here + Select(` + pas.id_product, + pag.id_attribute_group AS attribute_name, + JSON_ARRAYAGG(DISTINCT pa.id_attribute) AS attribute_values + `). + Joins("JOIN ps_product_attribute_combination ppac ON ppac.id_product_attribute = pas.id_product_attribute"). + Joins("JOIN ps_attribute pa ON pa.id_attribute = ppac.id_attribute"). + Joins("JOIN ps_attribute_group pag ON pag.id_attribute_group = pa.id_attribute_group"). + Where("pas.id_shop = ?", constdata.SHOP_ID). + Group("pas.id_product, pag.id_attribute_group"), + }, + }, + { + Name: "variations", + Subquery: exclause.Subquery{ + DB: db.Get(). + Table("variation_attributes"). + Select("id_product, JSON_OBJECTAGG(attribute_name, attribute_values) AS attributes"). + Group("id_product"), + }, + }, + { + Name: "features", + Subquery: exclause.Subquery{ + DB: db.Get(). + Table("ps_feature_product pfp"). // <- explicit alias + Select("pfp.id_product, JSON_OBJECTAGG(pfp.id_feature, pfp.id_feature_value) AS features"). + Group("pfp.id_product"), + }, + }, + { + Name: "images", + Subquery: exclause.Subquery{ + DB: db.Get(). + Model(&dbmodel.PsImageShop{}). + Select("id_product, id_image"). + Where("id_shop = ? AND cover = 1", constdata.SHOP_ID), + }, + }, + { + Name: "categories", + Subquery: exclause.Subquery{ + DB: db.Get(). + Model(&dbmodel.PsCategoryProduct{}). + Select("id_product, JSON_ARRAYAGG(id_category) AS category_ids"). + Group("id_product"), + }, + }, + }}).Find(&products).Error - return products, nil + return products, err } diff --git a/app/repos/searchRepo/searchRepo.go b/app/repos/searchRepo/searchRepo.go new file mode 100644 index 0000000..05afd3a --- /dev/null +++ b/app/repos/searchRepo/searchRepo.go @@ -0,0 +1,82 @@ +package searchrepo + +import ( + "bytes" + "fmt" + "io" + "net/http" + + "git.ma-al.com/goc_daniel/b2b/app/config" + "git.ma-al.com/goc_daniel/b2b/app/model" +) + +type SearchProxyResponse struct { + StatusCode int + Body []byte +} + +type UISearchRepo interface { + Search(index string, body []byte) (*SearchProxyResponse, error) + GetIndexSettings(index string) (*SearchProxyResponse, error) + GetRoutes(langId uint) ([]model.Route, error) +} + +type SearchRepo struct { + cfg *config.Config +} + +func New() UISearchRepo { + return &SearchRepo{ + cfg: config.Get(), + } +} + +func (r *SearchRepo) Search(index string, body []byte) (*SearchProxyResponse, error) { + url := fmt.Sprintf("%s/indexes/%s/search", r.cfg.MailiSearch.ServerURL, index) + return r.doRequest(http.MethodPost, url, body) +} + +func (r *SearchRepo) GetIndexSettings(index string) (*SearchProxyResponse, error) { + url := fmt.Sprintf("%s/indexes/%s/settings", r.cfg.MailiSearch.ServerURL, index) + return r.doRequest(http.MethodGet, url, nil) +} + +func (r *SearchRepo) doRequest(method, url string, body []byte) (*SearchProxyResponse, error) { + var reqBody *bytes.Reader + if body != nil { + reqBody = bytes.NewReader(body) + } else { + reqBody = bytes.NewReader([]byte{}) + } + + req, err := http.NewRequest(method, url, reqBody) + if err != nil { + return nil, fmt.Errorf("failed to create request: %w", err) + } + + req.Header.Set("Content-Type", "application/json") + if r.cfg.MailiSearch.ApiKey != "" { + req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", r.cfg.MailiSearch.ApiKey)) + } + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf("failed to reach meilisearch: %w", err) + } + defer resp.Body.Close() + + respBody, err := io.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("failed to read response: %w", err) + } + + return &SearchProxyResponse{ + StatusCode: resp.StatusCode, + Body: respBody, + }, nil +} + +func (r *SearchRepo) GetRoutes(langId uint) ([]model.Route, error) { + return nil, nil +} diff --git a/app/service/authService/auth.go b/app/service/authService/auth.go index 7b1fc2d..4818754 100644 --- a/app/service/authService/auth.go +++ b/app/service/authService/auth.go @@ -510,16 +510,31 @@ func (s *AuthService) generateAccessToken(user *model.Customer) (string, error) func (s *AuthService) UpdateJWTToken(c fiber.Ctx) error { // Get user ID from JWT claims in context (set by auth middleware) - claims, ok := c.Locals("jwt_claims").(*JWTClaims) - if !ok || claims == nil { + // claims, ok := c.Locals("jwt_claims").(*JWTClaims) + // if !ok || claims == nil { + // return c.Status(fiber.StatusUnauthorized). + // JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrNotAuthenticated))) + // } + // fmt.Printf("claims: %v\n", claims) + // var user model.Customer + // // Find user by ID + // if err := s.db.First(&user, claims.UserID).Error; err != nil { + // return err + // } + + userLocals, ok := c.Locals(constdata.USER_LOCALES_NAME).(*model.UserSession) + if !ok { return c.Status(fiber.StatusUnauthorized). JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrNotAuthenticated))) } - var user model.Customer - // Find user by ID - if err := s.db.First(&user, claims.UserID).Error; err != nil { - return err + user := model.Customer{ + ID: userLocals.UserID, + Email: userLocals.Email, + Role: userLocals.Role, + LangID: userLocals.LangID, + CountryID: userLocals.CountryID, + IsActive: userLocals.IsActive, } // Parse language and country_id from query params diff --git a/app/service/meiliService/blank.json b/app/service/meiliService/blank.json deleted file mode 100644 index 22446a1..0000000 --- a/app/service/meiliService/blank.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "products-openai": { - "source": "openAi", - "model": "text-embedding-3-small", - "apiKey": "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", - "documentTemplate": "{{doc.Name}} is equipment used for {{doc.Description | truncatewords: 20}}" - } -} \ No newline at end of file diff --git a/app/service/meiliService/indexation_params.go b/app/service/meiliService/indexation_params.go new file mode 100644 index 0000000..596e178 --- /dev/null +++ b/app/service/meiliService/indexation_params.go @@ -0,0 +1,230 @@ +package meiliService + +import "github.com/meilisearch/meilisearch-go" + +type IndexationParams struct { + LocalizedAttributes []*meilisearch.LocalizedAttributes `json:"localizedAttributes"` + StopWords []string `json:"stopWords"` + Synonyms map[string][]string `json:"synonyms"` +} + +var indexatio_params = map[uint]IndexationParams{ + 1: IndexationParams{ + LocalizedAttributes: []*meilisearch.LocalizedAttributes{ + {AttributePatterns: []string{"*"}, Locales: []string{"pol"}}, + }, + StopWords: []string{ + "i", "w", "z", "na", "do", "się", "nie", "to", "że", + "a", "o", "jak", "ale", "po", "za", "przez", "przy", + "dla", "czy", "lub", "oraz", "ich", "jej", "jego", + "ten", "ta", "te", "tego", "tej", "tym", "tych", + "jest", "są", "być", "był", "była", "było", "będzie", + "już", "jeszcze", "też", "tylko", "więc", "jednak", + "co", "kto", "który", "która", "które", "ze", "by", + "ze", "im", "go", "je", "tu", "tam", "tak", + }, + Synonyms: map[string][]string{ + "plecak": {"plecaki", "plecaku", "plecaków", "tornister", "torba szkolna"}, + "tornister": {"plecak", "torba szkolna", "plecaki"}, + "piórnik": {"piórniki", "piórnika", "etui na przybory"}, + "zeszyt": {"zeszyty", "zeszytu", "zeszytów", "notatnik", "notes"}, + "kredka": {"kredki", "kredek", "kredkami", "ołówek kolorowy"}, + "farba": {"farby", "farb", "farbami", "farba plakatowa", "tempera"}, + "nożyczki": {"nożyczki dla dzieci", "nożyczki bezpieczne"}, + "linijka": {"linijki", "linijka plastikowa", "linijka drewniana"}, + "kalkulator": {"kalkulatory", "kalkulator szkolny", "kalkulator naukowy"}, + "długopis": {"długopisy", "długopisu", "długopisów", "pisak", "pióro"}, + "ołówek": {"ołówki", "ołówka", "ołówków", "grafitowy"}, + "gumka": {"gumki", "gumka do mazania", "korektor"}, + "temperówka": {"temperówki", "temperówka elektryczna"}, + "plastelina": {"plasteliny", "masa plastyczna", "modelina", "glinka"}, + "bibuła": {"bibułki", "bibuła marszczona", "krepa"}, + "brystol": {"brystole", "brystolu", "karton", "tektura"}, + "blok": {"bloki", "blok rysunkowy", "blok techniczny", "blok A4"}, + "klej": {"kleje", "kleju", "klej w sztyfcie", "klej PVA", "klej UHU"}, + "taśma": {"taśmy", "taśma klejąca", "taśma scotch"}, + "marker": {"markery", "mazak", "mazaki", "flamaster", "flamastry"}, + "pędzel": {"pędzle", "pędzla", "pędzli", "pędzel do farb"}, + "plakat": {"plakaty", "plansza edukacyjna", "poster"}, + "atlas": {"atlasy", "atlas geograficzny", "mapa"}, + "słownik": {"słowniki", "słownika", "słownik angielski"}, + "czytanka": {"czytanki", "lektura", "książka dla dzieci", "bajka"}, + "zabawka": {"zabawki", "zabawek", "gra edukacyjna", "puzzle"}, + "układanka": {"układanki", "puzzle", "mozaika"}, + "klocki": {"klocek", "klocków", "lego", "duplo"}, + "fartuch": {"fartuchy", "fartuch malarski", "fartuch plastyczny"}, + "teczka": {"teczki", "teczka na dokumenty", "segregator", "portfolio"}, + "koszulka": {"koszulki", "koszulka na dokumenty", "foliówka"}, + "ekierka": {"ekierki", "kątownik"}, + "cyrkiel": {"cyrkle", "kompas rysunkowy"}, + "globus": {"globusy", "kula ziemska"}, + "tablica": {"tablice", "tablica magnetyczna", "whiteboard", "flipchart"}, + "magnez": {"magnesy", "magnes tablicowy"}, + "kreda": {"kredy", "kreda tablicowa", "kreda kolorowa"}, + "przedszkole": {"żłobek", "edukacja przedszkolna", "wiek przedszkolny"}, + "szkoła": {"szkolny", "szkolna", "szkolne", "podstawówka"}, + }, + }, + 2: IndexationParams{ + LocalizedAttributes: []*meilisearch.LocalizedAttributes{ + {AttributePatterns: []string{"*"}, Locales: []string{"eng"}}, + }, + StopWords: []string{ + "a", "an", "the", "and", "or", "but", "in", "on", "at", + "to", "for", "of", "with", "by", "from", "is", "are", + "was", "were", "be", "been", "being", "have", "has", + "had", "do", "does", "did", "will", "would", "could", + "should", "may", "might", "it", "its", "this", "that", + "these", "those", "as", "if", "so", "than", "up", + }, + Synonyms: map[string][]string{ + "backpack": {"rucksack", "school bag", "schoolbag", "knapsack"}, + "pencil case": {"pencil pouch", "pencil box", "stationery case"}, + "notebook": {"exercise book", "jotter", "notepad", "copybook"}, + "colored pencil": {"colour pencil", "colouring pencil", "crayon pencil"}, + "crayon": {"wax crayon", "colouring crayon", "wax pencil"}, + "paint": {"poster paint", "tempera", "watercolour", "finger paint"}, + "scissors": {"safety scissors", "kids scissors", "craft scissors"}, + "ruler": {"measuring ruler", "plastic ruler", "wooden ruler"}, + "calculator": {"scientific calculator", "school calculator"}, + "pen": {"ballpoint", "ballpoint pen", "biro", "rollerball"}, + "pencil": {"graphite pencil", "HB pencil", "drawing pencil"}, + "eraser": {"rubber", "correction eraser", "white eraser"}, + "sharpener": {"pencil sharpener", "electric sharpener"}, + "plasticine": {"modelling clay", "play-doh", "clay", "dough"}, + "tissue paper": {"crepe paper", "craft paper"}, + "cardboard": {"card", "art board", "bristol board"}, + "drawing pad": {"sketch pad", "art pad", "drawing block", "sketchbook"}, + "glue": {"glue stick", "PVA glue", "craft glue", "adhesive"}, + "tape": {"sticky tape", "sellotape", "scotch tape", "masking tape"}, + "marker": {"felt tip", "felt-tip pen", "highlighter", "marker pen"}, + "paintbrush": {"brush", "art brush", "watercolour brush"}, + "poster": {"educational poster", "wall chart", "learning poster"}, + "dictionary": {"word book", "vocabulary book", "language dictionary"}, + "book": {"reading book", "children book", "picture book", "reader"}, + "toy": {"educational toy", "learning toy", "kids toy"}, + "puzzle": {"jigsaw", "jigsaw puzzle", "floor puzzle"}, + "blocks": {"building blocks", "lego", "wooden blocks", "duplo"}, + "apron": {"art apron", "painting apron", "smock"}, + "folder": {"document folder", "ring binder", "portfolio"}, + "sleeve": {"document sleeve", "plastic sleeve", "page protector"}, + "compass": {"drawing compass", "geometry compass"}, + "set square": {"triangle ruler", "geometry set"}, + "globe": {"world globe", "earth globe"}, + "whiteboard": {"dry erase board", "magnetic board", "notice board"}, + "chalk": {"blackboard chalk", "coloured chalk", "sidewalk chalk"}, + "kindergarten": {"preschool", "nursery", "early years", "pre-k"}, + "school": {"primary school", "elementary school", "educational"}, + }, + }, + 3: IndexationParams{ + LocalizedAttributes: []*meilisearch.LocalizedAttributes{ + {AttributePatterns: []string{"*"}, Locales: []string{"deu"}}, + }, + StopWords: []string{ + "und", "oder", "aber", "in", "an", "auf", "zu", "für", + "von", "mit", "durch", "bei", "nach", "über", "unter", + "ist", "sind", "war", "waren", "sein", "haben", "hat", + "der", "die", "das", "den", "dem", "des", "ein", "eine", + "einer", "einem", "einen", "eines", "sich", "auch", + "nicht", "noch", "schon", "nur", "so", "wie", "wenn", + "dann", "da", "hier", "dort", "ich", "du", "er", "sie", + "es", "wir", "ihr", "als", "am", "im", "ins", + }, + Synonyms: map[string][]string{ + "rucksack": {"schulrucksack", "schulranzen", "ranzen", "tornister"}, + "schulranzen": {"rucksack", "tornister", "schultasche"}, + "federmäppchen": {"mäppchen", "federmappe", "stiftemäppchen", "etui"}, + "heft": {"schulheft", "schreibheft", "lineatur", "notizheft"}, + "buntstift": {"buntstifte", "farbstift", "farbstifte", "malstift"}, + "wachsmalstift": {"wachsmalstifte", "wachskreide", "malwachs"}, + "farbe": {"schulfarbe", "plakatfarbe", "wasserfarbe", "fingerfarbe", "tempera"}, + "schere": {"kinderschere", "bastelschere", "sicherheitsschere"}, + "lineal": {"schullineal", "kunststofflineal", "holzlineal"}, + "taschenrechner": {"schulrechner", "wissenschaftlicher rechner", "rechner"}, + "kugelschreiber": {"kuli", "stift", "tintenroller", "füller"}, + "bleistift": {"zeichenbleistift", "graphitstift", "schulbleistift"}, + "radiergummi": {"radierer", "radiergummi", "tipp-ex"}, + "anspitzer": {"bleistiftspitzer", "elektrischer anspitzer"}, + "knete": {"knetmasse", "plastilin", "modellierton", "play-doh"}, + "seidenpapier": {"krepppapier", "krepp", "bastelpapier"}, + "karton": {"pappe", "zeichenkarton", "bristol"}, + "zeichenblock": {"malblock", "skizzenblock", "zeichenpapier"}, + "kleber": {"klebestift", "bastelkleber", "PVA-kleber", "UHU"}, + "klebeband": {"tesa", "scotch", "klebeband transparent", "kreativband"}, + "marker": {"filzstift", "faserstift", "textmarker", "edding"}, + "pinsel": {"malpinsel", "aquarellpinsel", "zeichenpinsel"}, + "poster": {"lernposter", "bildungsposter", "schulposter", "wandkarte"}, + "wörterbuch": {"schulwörterbuch", "vokabelbuch", "lexikon"}, + "buch": {"kinderbuch", "schulbuch", "lesebuch", "bilderbuch"}, + "spielzeug": {"lernspielzeug", "pädagogisches spielzeug", "kinderspielzeug"}, + "puzzle": {"legepuzzle", "bodenpuzzle", "steckpuzzle"}, + "baustein": {"bausteine", "lego", "holzbausteine", "duplo"}, + "schürze": {"malschürze", "bastelschürze", "kittel"}, + "mappe": {"schulmappe", "hefter", "ringbuch", "ordner"}, + "klarsichthülle": {"prospekthülle", "dokumentenhülle", "sichthülle"}, + "zirkel": {"zeichenzirkel", "geometriezirkel"}, + "geodreieck": {"winkelmesser", "zeichendreieck", "geometriedreieck"}, + "globus": {"erdkugel", "weltkugel", "schulglob"}, + "whiteboard": {"magnettafel", "schreibtafel", "flipchart"}, + "kreide": {"tafelkreide", "schulkreide", "bunkreide"}, + "kindergarten": {"kita", "krippe", "vorschule", "kiga"}, + "schule": {"grundschule", "volksschule", "schulbedarf"}, + }, + }, + 4: IndexationParams{ + LocalizedAttributes: []*meilisearch.LocalizedAttributes{ + {AttributePatterns: []string{"*"}, Locales: []string{"ces"}}, + }, + StopWords: []string{ + "a", "i", "v", "na", "do", "se", "ne", "to", "že", + "o", "jak", "ale", "po", "za", "pro", "při", "pro", + "nebo", "či", "anebo", "jejich", "jeho", "její", + "ten", "ta", "to", "toho", "té", "tom", "těch", + "je", "jsou", "být", "byl", "byla", "bylo", "bude", + "už", "ještě", "také", "jen", "tedy", "však", + "co", "kdo", "který", "která", "které", "ze", + "by", "mu", "ho", "ji", "tu", "tam", "tak", + }, + Synonyms: map[string][]string{ + "batoh": {"batohy", "batohu", "batohů", "školní batoh", "školní taška", "aktovka"}, + "aktovka": {"aktovky", "školní aktovka", "batoh", "taška do školy"}, + "penál": {"penály", "penálu", "pouzdro na tužky", "pouzdro na psací potřeby"}, + "sešit": {"sešity", "sešitu", "sešitů", "poznámkový blok", "zápisník"}, + "pastelka": {"pastelky", "pastelku", "pastelkách", "barevná tužka", "barevné tužky"}, + "voskovka": {"voskovky", "vosková pastelka", "voskové pastelky"}, + "barva": {"barvy", "barev", "školní barva", "plakátová barva", "temperová barva", "vodová barva", "prstová barva"}, + "nůžky": {"dětské nůžky", "bezpečné nůžky", "školní nůžky"}, + "pravítko": {"pravítka", "plastové pravítko", "dřevěné pravítko"}, + "kalkulačka": {"kalkulačky", "školní kalkulačka", "vědecká kalkulačka"}, + "propiska": {"propiska", "propisky", "kuličkové pero", "pero", "roller"}, + "tužka": {"tužky", "grafitová tužka", "školní tužka", "kreslicí tužka"}, + "guma": {"gumy", "guma na mazání", "mazací guma", "korektor"}, + "ořezávátko": {"ořezávátka", "elektrické ořezávátko"}, + "plastelína": {"plastelíny", "modelovací hmota", "modelína", "play-doh", "hlína"}, + "hedvábný papír": {"krepový papír", "krepp", "krepa"}, + "karton": {"kartony", "výkres", "výkresy", "bristol", "čtvrtka"}, + "skicák": {"skicáky", "blok na kreslení", "kreslicí blok", "náčrtník"}, + "lepidlo": {"lepidla", "lepicí tyčinka", "PVA lepidlo", "UHU", "lepidlo v tyčince"}, + "lepicí páska": {"scotch", "průhledná páska", "izolepa"}, + "fix": {"fixy", "fixů", "fixů", "popisovač", "popisovače", "zvýrazňovač"}, + "štětec": {"štětce", "malířský štětec", "akvarelový štětec"}, + "plakát": {"plakáty", "vzdělávací plakát", "výuková tabule", "nástěnná mapa"}, + "slovník": {"slovníky", "školní slovník", "výkladový slovník"}, + "kniha": {"knihy", "dětská kniha", "čítanka", "učebnice", "obrázkové knihy"}, + "hračka": {"hračky", "vzdělávací hračka", "didaktická hračka"}, + "puzzle": {"skládačka", "skládačky", "mozaika", "jigsaw"}, + "kostky": {"stavebnice", "lego", "dřevěné kostky", "duplo"}, + "zástěra": {"zástěry", "malířská zástěra", "ochranný plášť"}, + "desky": {"složka", "složky", "pořadač", "kroužkový pořadač", "portfolio"}, + "fólie": {"průhledná fólie", "eurodesky", "plastová fólie"}, + "kružítko": {"kružítka", "rýsovací kružítko"}, + "úhloměr": {"pravítko s úhloměrem", "trojúhelník", "rýsovací trojúhelník"}, + "glóbus": {"glóbusy", "zeměkoule", "školní glóbus"}, + "tabule": {"magnetická tabule", "whiteboard", "flipchart", "školní tabule"}, + "křída": {"křídy", "barevná křída", "školní křída"}, + "školka": {"mateřská škola", "MŠ", "předškolní věk", "jesle"}, + "škola": {"školní", "základní škola", "ZŠ", "školní potřeby"}, + }, + }, +} diff --git a/app/service/meiliService/meiliService.go b/app/service/meiliService/meiliService.go index b2e4f72..87b196b 100644 --- a/app/service/meiliService/meiliService.go +++ b/app/service/meiliService/meiliService.go @@ -2,16 +2,23 @@ package meiliService import ( "fmt" - "regexp" - "strings" "time" "git.ma-al.com/goc_daniel/b2b/app/config" + "git.ma-al.com/goc_daniel/b2b/app/model" "git.ma-al.com/goc_daniel/b2b/app/repos/productDescriptionRepo" constdata "git.ma-al.com/goc_daniel/b2b/app/utils/const_data" "github.com/meilisearch/meilisearch-go" ) +// MeiliIndexSettings holds the configurable index settings +type MeiliIndexSettings struct { + SearchableAttributes []string `json:"searchableAttributes"` + DisplayedAttributes []string `json:"displayedAttributes"` + FilterableAttributes []string `json:"filterableAttributes"` + SortableAttributes []string `json:"sortableAttributes"` +} + type MeiliService struct { productDescriptionRepo productDescriptionRepo.UIProductDescriptionRepo meiliClient meilisearch.ServiceManager @@ -30,43 +37,147 @@ func New() *MeiliService { } } -func getIndexName(id_lang uint) string { +func GetIndexName(id_lang uint) string { return fmt.Sprintf("shop_%d_lang_%d", constdata.SHOP_ID, id_lang) } // ==================================== FOR TESTING ONLY ==================================== func (s *MeiliService) CreateIndex(id_lang uint) error { - indexName := getIndexName(id_lang) + indexName := GetIndexName(id_lang) - products, err := s.productDescriptionRepo.GetMeiliProducts(id_lang) + const batchSize = 500 + offset := 0 + + for { + // Get batch of products from repo (includes scanning) + products, err := s.productDescriptionRepo.GetMeiliProducts(id_lang, offset, batchSize) + if err != nil { + return fmt.Errorf("failed to get products batch at offset %d: %w", offset, err) + } + + // If no products returned, we're done + if len(products) == 0 { + break + } + + // Add batch to index + if err := s.addBatchToIndex(indexName, products); err != nil { + return fmt.Errorf("failed to add batch to index: %w", err) + } + + // Update offset for next batch + offset += batchSize + + fmt.Printf("Indexed %d products (offset: %d)\n", len(products), offset) + } + + // Configure filterable attributes + filterableAttributes := []interface{}{ + "product_id", + "category_id", + "category_ids", + "attr", + "feat", + "variations", + "price", + } + task, err := s.meiliClient.Index(indexName).UpdateFilterableAttributes(&filterableAttributes) if err != nil { - return fmt.Errorf("failed to get products: %w", err) + return fmt.Errorf("failed to update filterable attributes: %w", err) + } + _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for filterable task: %w", err) } - if len(products) == 0 { - return nil + // Configure sortable attributes + sortableAttributes := []string{ + "price", + "name", + "product_id", + "name", + "category_ids", + } + task, err = s.meiliClient.Index(indexName).UpdateSortableAttributes(&sortableAttributes) + if err != nil { + return fmt.Errorf("failed to update sortable attributes: %w", err) } - // Process products: prepare for indexing - for i := range products { - // Convert JSON fields to searchable strings - if len(products[i].Features) > 0 { - products[i].FeaturesStr = string(products[i].Features) - } - if len(products[i].Attributes) > 0 { - products[i].AttributesStr = string(products[i].Attributes) - } - if len(products[i].AttributeFilters) > 0 { - products[i].AttributeFiltersStr = string(products[i].AttributeFilters) - } - - // Build cover image URL from image ID - if products[i].IDImage > 0 { - products[i].CoverImage = config.Get().Image.ImagePrefix + fmt.Sprintf("/%d", products[i].IDImage) - } + task, err = s.meiliClient.Index(indexName).UpdateSettings(&meilisearch.Settings{ + LocalizedAttributes: indexatio_params[id_lang].LocalizedAttributes, + Synonyms: indexatio_params[id_lang].Synonyms, + StopWords: indexatio_params[id_lang].StopWords, + }) + if err != nil { + return fmt.Errorf("failed to update ranking rules: %w", err) } - // Add documents to index + _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for sortable task: %w", err) + } + + // Configure displayed attributes + displayedAttributes := []string{ + "product_id", + "name", + "ean13", + "reference", + "variations", + "id_image", + "price", + "category_name", + } + task, err = s.meiliClient.Index(indexName).UpdateDisplayedAttributes(&displayedAttributes) + if err != nil { + return fmt.Errorf("failed to update displayed attributes: %w", err) + } + _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for displayed task: %w", err) + } + + // Configure searchable attributes + searchableAttributes := []string{ + "name", + "description", + "ean13", + "category_name", + "reference", + } + task, err = s.meiliClient.Index(indexName).UpdateSearchableAttributes(&searchableAttributes) + if err != nil { + return fmt.Errorf("failed to update searchable attributes: %w", err) + } + + task, err = s.meiliClient.Index(indexName).UpdateFaceting(&meilisearch.Faceting{MaxValuesPerFacet: 5}) + if err != nil { + return fmt.Errorf("failed to update ranking rules: %w", err) + } + + // keyRequest := &meilisearch.Key{ + // Key: "my secret key", // ✅ provide your own token + // Description: "Search-only key for frontend", + // Actions: []string{"search", "settings.get"}, + // Indexes: []string{indexName}, // restrict to your index + // } + + // createdKey, err := s.meiliClient.CreateKey(keyRequest) + // if err != nil { + // panic(err) + // } + // fmt.Println("Custom search key created:", createdKey.Key) + + _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for searchable task: %w", err) + } + + return nil +} + +// addBatchToIndex adds a batch of products to the Meilisearch index +func (s *MeiliService) addBatchToIndex(indexName string, products []model.MeiliSearchProduct) error { primaryKey := "product_id" docOptions := &meilisearch.DocumentOptions{ PrimaryKey: &primaryKey, @@ -86,112 +197,12 @@ func (s *MeiliService) CreateIndex(id_lang uint) error { return fmt.Errorf("task failed: %v", finishedTask.Error) } - // Configure filterable attributes - filterableAttributes := []interface{}{ - "product_id", - "category_id", - "category_ids", - "active", - "attribute_filters", - "features", - } - task, err = s.meiliClient.Index(indexName).UpdateFilterableAttributes(&filterableAttributes) - if err != nil { - return fmt.Errorf("failed to update filterable attributes: %w", err) - } - _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) - if err != nil { - return fmt.Errorf("failed to wait for filterable task: %w", err) - } - - // Configure sortable attributes - sortableAttributes := []string{ - "price", - "name", - "product_id", - "category_ids", - } - task, err = s.meiliClient.Index(indexName).UpdateSortableAttributes(&sortableAttributes) - if err != nil { - return fmt.Errorf("failed to update sortable attributes: %w", err) - } - _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) - if err != nil { - return fmt.Errorf("failed to wait for sortable task: %w", err) - } - - // Configure displayed attributes - displayedAttributes := []string{ - "product_id", - "name", - "ean13", - "reference", - "variations", - "id_image", - "price", - "category_name", - "category_ids", - "attribute_filters", - } - task, err = s.meiliClient.Index(indexName).UpdateDisplayedAttributes(&displayedAttributes) - if err != nil { - return fmt.Errorf("failed to update displayed attributes: %w", err) - } - _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) - if err != nil { - return fmt.Errorf("failed to wait for displayed task: %w", err) - } - - // Configure searchable attributes - searchableAttributes := []string{ - "name", - "description", - "description_short", - "usage", - "features_str", - "attributes_str", - "reference", - "ean13", - "category_name", - } - task, err = s.meiliClient.Index(indexName).UpdateSearchableAttributes(&searchableAttributes) - if err != nil { - return fmt.Errorf("failed to update searchable attributes: %w", err) - } - _, err = s.meiliClient.WaitForTask(task.TaskUID, 500*time.Millisecond) - if err != nil { - return fmt.Errorf("failed to wait for searchable task: %w", err) - } - return nil } -// ==================================== FOR TESTING ONLY ==================================== -func (s *MeiliService) Test(id_lang uint) (meilisearch.SearchResponse, error) { - indexName := getIndexName(id_lang) - - searchReq := &meilisearch.SearchRequest{ - Limit: 4, - Facets: []string{ - "CategoryID", - }, - } - - // Perform search - results, err := s.meiliClient.Index(indexName).Search("mat", searchReq) - if err != nil { - fmt.Printf("Meilisearch error: %v\n", err) - return meilisearch.SearchResponse{}, err - } - - fmt.Printf("Search results for query 'mat' in %s: %d hits\n", indexName, len(results.Hits)) - - return *results, nil -} - // Search performs a full-text search on the specified index func (s *MeiliService) Search(id_lang uint, query string, id_category uint) (meilisearch.SearchResponse, error) { - indexName := getIndexName(id_lang) + indexName := GetIndexName(id_lang) filter_query := "Active = 1" if id_category != 0 { @@ -228,7 +239,7 @@ func (s *MeiliService) HealthCheck() (*meilisearch.Health, error) { // GetIndexSettings retrieves the current settings for a specific index func (s *MeiliService) GetIndexSettings(id_lang uint) (map[string]interface{}, error) { - indexName := getIndexName(id_lang) + indexName := GetIndexName(id_lang) index := s.meiliClient.Index(indexName) @@ -273,12 +284,62 @@ func (s *MeiliService) GetIndexSettings(id_lang uint) (map[string]interface{}, e return result, nil } -// remove all tags from HTML text -func cleanHTML(s string) string { - // Simple regex to remove all HTML tags - re := regexp.MustCompile(`<[^>]*>`) - result := re.ReplaceAllString(s, "") - // Replace multiple spaces with single space - result = regexp.MustCompile(`\s+`).ReplaceAllString(result, " ") - return strings.TrimSpace(result) +// UpdateIndexSettings updates the index settings (searchable, displayed, filterable, sortable attributes) +func (s *MeiliService) UpdateIndexSettings(id_lang uint, settings MeiliIndexSettings) error { + indexName := GetIndexName(id_lang) + index := s.meiliClient.Index(indexName) + + // Update searchable attributes + if len(settings.SearchableAttributes) > 0 { + task, err := index.UpdateSearchableAttributes(&settings.SearchableAttributes) + if err != nil { + return fmt.Errorf("failed to update searchable attributes: %w", err) + } + _, err = s.meiliClient.WaitForTask(task.TaskUID, 1000*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for searchable attributes task: %w", err) + } + } + + // Update displayed attributes + if len(settings.DisplayedAttributes) > 0 { + task, err := index.UpdateDisplayedAttributes(&settings.DisplayedAttributes) + if err != nil { + return fmt.Errorf("failed to update displayed attributes: %w", err) + } + _, err = s.meiliClient.WaitForTask(task.TaskUID, 1000*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for displayed attributes task: %w", err) + } + } + + // Update filterable attributes + if len(settings.FilterableAttributes) > 0 { + var filterable []interface{} + for _, attr := range settings.FilterableAttributes { + filterable = append(filterable, attr) + } + task, err := index.UpdateFilterableAttributes(&filterable) + if err != nil { + return fmt.Errorf("failed to update filterable attributes: %w", err) + } + _, err = s.meiliClient.WaitForTask(task.TaskUID, 1000*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for filterable attributes task: %w", err) + } + } + + // Update sortable attributes + if len(settings.SortableAttributes) > 0 { + task, err := index.UpdateSortableAttributes(&settings.SortableAttributes) + if err != nil { + return fmt.Errorf("failed to update sortable attributes: %w", err) + } + _, err = s.meiliClient.WaitForTask(task.TaskUID, 1000*time.Millisecond) + if err != nil { + return fmt.Errorf("failed to wait for sortable attributes task: %w", err) + } + } + + return nil } diff --git a/app/service/searchService/searchService.go b/app/service/searchService/searchService.go new file mode 100644 index 0000000..3d77c12 --- /dev/null +++ b/app/service/searchService/searchService.go @@ -0,0 +1,233 @@ +package searchservice + +import ( + "encoding/json" + "fmt" + "strconv" + "strings" + + attributerepo "git.ma-al.com/goc_daniel/b2b/app/repos/attributeRepo" + categoryrepo "git.ma-al.com/goc_daniel/b2b/app/repos/categoryRepo" + featurerepo "git.ma-al.com/goc_daniel/b2b/app/repos/featureRepo" + searchrepo "git.ma-al.com/goc_daniel/b2b/app/repos/searchRepo" +) + +type SearchService struct { + searchRepo searchrepo.UISearchRepo + attributeRepo attributerepo.UIAttributeRepo + featureRepo featurerepo.UIFeatureRepo + categoryRepo categoryrepo.UICategoryRepo +} + +func New() *SearchService { + return &SearchService{ + searchRepo: searchrepo.New(), + attributeRepo: attributerepo.New(), + featureRepo: featurerepo.New(), + categoryRepo: categoryrepo.New(), + } +} + +func (s *SearchService) Search(index string, body []byte, idLang uint) (*searchrepo.SearchProxyResponse, error) { + resp, err := s.searchRepo.Search(index, body) + if err != nil { + return nil, err + } + + if resp.StatusCode == 200 { + var data map[string]interface{} + if err := json.Unmarshal(resp.Body, &data); err == nil { + data = s.filterEmptyFacets(data) + data = s.enrichFacetTranslations(data, idLang) + resp.Body, _ = json.Marshal(data) + } + } + + return resp, nil +} + +func (s *SearchService) GetIndexSettings(index string) (*searchrepo.SearchProxyResponse, error) { + return s.searchRepo.GetIndexSettings(index) +} + +func (s *SearchService) IsIndexNotFound(body []byte) bool { + var resp map[string]interface{} + if err := json.Unmarshal(body, &resp); err != nil { + return false + } + if code, ok := resp["code"].(string); ok { + return code == "index_not_found" + } + return false +} + +func (s *SearchService) filterEmptyFacets(data map[string]interface{}) map[string]interface{} { + if facets, ok := data["facetDistribution"].(map[string]interface{}); ok { + filtered := make(map[string]interface{}) + for k, v := range facets { + if m, ok := v.(map[string]interface{}); ok && len(m) > 0 { + filtered[k] = v + } + } + data["facetDistribution"] = filtered + } + return data +} + +func (s *SearchService) enrichFacetTranslations(data map[string]interface{}, idLang uint) map[string]interface{} { + facets, ok := data["facetDistribution"].(map[string]interface{}) + if !ok { + return data + } + + groupIDs := []uint{} + attrIDs := []uint{} + + featureIDs := []uint{} + featureValueIDs := []uint{} + + categoryIDs := []uint{} + + for key, values := range facets { + valueMap, ok := values.(map[string]interface{}) + if !ok { + continue + } + + if strings.HasPrefix(key, "attr.") { + groupIDStr := strings.TrimPrefix(key, "attr.") + groupID, err := strconv.ParseUint(groupIDStr, 10, 64) + if err != nil { + continue + } + groupIDs = append(groupIDs, uint(groupID)) + + for attrKey := range valueMap { + attrID, err := strconv.ParseUint(attrKey, 10, 64) + if err != nil { + continue + } + attrIDs = append(attrIDs, uint(attrID)) + } + } + + if strings.HasPrefix(key, "feat.") { + featureIDStr := strings.TrimPrefix(key, "feat.") + featureID, err := strconv.ParseUint(featureIDStr, 10, 64) + if err != nil { + continue + } + featureIDs = append(featureIDs, uint(featureID)) + + for valueKey := range valueMap { + valueID, err := strconv.ParseUint(valueKey, 10, 64) + if err != nil { + continue + } + featureValueIDs = append(featureValueIDs, uint(valueID)) + } + } + + if key == "category_ids" { + for catKey := range valueMap { + catID, err := strconv.ParseUint(catKey, 10, 64) + if err != nil { + continue + } + categoryIDs = append(categoryIDs, uint(catID)) + } + } + } + + attributeGroups, _ := s.attributeRepo.GetAttributeGroupsWithAttributes(groupIDs, attrIDs, idLang) + featureGroups, _ := s.featureRepo.GetFeaturesWithValues(featureIDs, featureValueIDs, idLang) + categoryTranslations, _ := s.categoryRepo.GetCategoryTranslations(categoryIDs, idLang) + + translations := make(map[string]interface{}) + + for _, groupID := range groupIDs { + key := fmt.Sprintf("attr.%d", groupID) + group, ok := attributeGroups[groupID] + if !ok { + group = attributerepo.AttributeGroupWithAttrs{ + GroupName: key, + Attrs: make(map[uint]attributerepo.AttributeWithColor), + } + } + + valueTranslations := make(map[string]interface{}) + for attrID, attr := range group.Attrs { + attrName := attr.Name + if attrName == "" { + attrName = strconv.FormatUint(uint64(attrID), 10) + } + entry := map[string]string{"t": attrName} + if attr.Color != "" { + entry["c"] = attr.Color + } + valueTranslations[strconv.FormatUint(uint64(attrID), 10)] = entry + } + + groupName := group.GroupName + if groupName == "" { + groupName = key + } + + translations[key] = map[string]interface{}{ + "groupName": groupName, + "values": valueTranslations, + } + } + + for _, featureID := range featureIDs { + key := fmt.Sprintf("feat.%d", featureID) + feature, ok := featureGroups[featureID] + if !ok { + feature = featurerepo.FeatureGroupWithValues{ + FeatureName: key, + Values: make(map[uint]string), + } + } + + valueTranslations := make(map[string]interface{}) + for valueID, valueName := range feature.Values { + if valueName == "" { + valueName = strconv.FormatUint(uint64(valueID), 10) + } + valueTranslations[strconv.FormatUint(uint64(valueID), 10)] = map[string]string{ + "t": valueName, + } + } + + featureName := feature.FeatureName + if featureName == "" { + featureName = key + } + + translations[key] = map[string]interface{}{ + "groupName": featureName, + "values": valueTranslations, + } + } + + categoryValueTranslations := make(map[string]interface{}) + for _, catID := range categoryIDs { + catName := categoryTranslations[catID] + if catName == "" { + catName = strconv.FormatUint(uint64(catID), 10) + } + categoryValueTranslations[strconv.FormatUint(uint64(catID), 10)] = map[string]string{ + "t": catName, + } + } + + if len(categoryValueTranslations) > 0 { + translations["category_ids"] = map[string]interface{}{ + "groupName": "category_ids", + "values": categoryValueTranslations, + } + } + + data["facetTranslations"] = translations + return data +} diff --git a/app/utils/const_data/consts.go b/app/utils/const_data/consts.go index e8fa951..812364f 100644 --- a/app/utils/const_data/consts.go +++ b/app/utils/const_data/consts.go @@ -5,3 +5,6 @@ const PASSWORD_VALIDATION_REGEX = `^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{10,}$` const SHOP_ID = 1 const MAX_AMOUNT_OF_CARTS_PER_USER = 10 const DEFAULT_NEW_CART_NAME = "new cart" + +const USER_LOCALES_NAME = "user" +const USER_LOCALES_ID = "userID" diff --git a/app/utils/genModels/genModels.go b/app/utils/genModels/genModels.go index f3e64d2..741a57f 100644 --- a/app/utils/genModels/genModels.go +++ b/app/utils/genModels/genModels.go @@ -11,8 +11,8 @@ import ( "gorm.io/gorm" ) -const GENERATED_FILES_FOLDER = "./app/model/prestadb" -const GENERATED_MODEL_PKG = "prestadb" +const GENERATED_FILES_FOLDER = "./app/model/dbmodel" +const GENERATED_MODEL_PKG = "dbmodel" type GormGenModels struct { db *gorm.DB @@ -115,7 +115,7 @@ func (m *GormGenModels) cleanupGeneratedFiles() error { return err } - // Remove package prestadb imports that reference generated DO + // Remove package dbmodel imports that reference generated DO // and clean up the code content = m.cleanModelContent(content) diff --git a/app/utils/query/query_params/params_query.go b/app/utils/query/query_params/params_query.go index 9362657..9321c13 100644 --- a/app/utils/query/query_params/params_query.go +++ b/app/utils/query/query_params/params_query.go @@ -37,7 +37,6 @@ func ParseFilters[T any](c fiber.Ctx, formColumnMappimg ...map[string]string) (f func ParseFieldFilters[T any](c fiber.Ctx, formColumnMapping ...map[string]string) (*filters.FiltersList, error) { // var model T list := filters.NewFiltersList() - whereScopefilters := ParseWhereScopes[T](c, []string{}, formColumnMapping...) list.Append(whereScopefilters...) diff --git a/app/utils/query/query_params/parse_sort.go b/app/utils/query/query_params/parse_sort.go index 02e0c33..f2a39d8 100644 --- a/app/utils/query/query_params/parse_sort.go +++ b/app/utils/query/query_params/parse_sort.go @@ -22,7 +22,7 @@ func ParseOrdering[T any](c fiber.Ctx, columnMapping ...map[string]string) ([]Or for _, r := range rules { ord, err := parseOrderingRule[T](r, columnMapping...) if err != nil { - return orderings, err + continue } orderings = append(orderings, ord) } diff --git a/app/utils/query/query_params/where_scope_from_query.go b/app/utils/query/query_params/where_scope_from_query.go index fe8d992..8655434 100644 --- a/app/utils/query/query_params/where_scope_from_query.go +++ b/app/utils/query/query_params/where_scope_from_query.go @@ -16,7 +16,6 @@ func ParseWhereScopes[T any](c fiber.Ctx, ignoredKeys []string, formColumnMappin for key, value := range c.Request().URI().QueryArgs().All() { keyStr := string(key) valStr := string(value) - isIgnored := false for _, ignoredKey := range ignoredKeys { if keyStr == ignoredKey { diff --git a/bruno/api_v1/.gitignore b/bruno/api_v1/.gitignore new file mode 100644 index 0000000..e19311f --- /dev/null +++ b/bruno/api_v1/.gitignore @@ -0,0 +1,9 @@ +# Secrets +.env* + +# Dependencies +node_modules + +# OS files +.DS_Store +Thumbs.db \ No newline at end of file diff --git a/bruno/api_v1/Change Locales.yml b/bruno/api_v1/Change Locales.yml new file mode 100644 index 0000000..cff1b71 --- /dev/null +++ b/bruno/api_v1/Change Locales.yml @@ -0,0 +1,21 @@ +info: + name: Change Locales + type: http + seq: 4 + +http: + method: POST + url: "{{bas_url}}/public/auth/update-choice?lang_id=1" + params: + - name: lang_id + value: "1" + type: query + auth: + type: bearer + token: "{{token}}" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/api_v1/Create Search Index.yml b/bruno/api_v1/Create Search Index.yml new file mode 100644 index 0000000..74040b6 --- /dev/null +++ b/bruno/api_v1/Create Search Index.yml @@ -0,0 +1,20 @@ +info: + name: Create Search Index + type: http + seq: 2 + +http: + method: GET + url: "{{bas_url}}/restricted/search/create-index" + body: + type: json + data: "" + auth: + type: bearer + token: "{{token}}" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/api_v1/Delete Index - MeiliSearch.yml b/bruno/api_v1/Delete Index - MeiliSearch.yml new file mode 100644 index 0000000..e5e011e --- /dev/null +++ b/bruno/api_v1/Delete Index - MeiliSearch.yml @@ -0,0 +1,17 @@ +info: + name: Delete Index - MeiliSearch + type: http + seq: 7 + +http: + method: DELETE + url: http://localhost:7700/indexes/shop_1_lang_2 + auth: + type: bearer + token: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/api_v1/Products List.yml b/bruno/api_v1/Products List.yml new file mode 100644 index 0000000..ae3d9da --- /dev/null +++ b/bruno/api_v1/Products List.yml @@ -0,0 +1,36 @@ +info: + name: Products List + type: http + seq: 1 + +http: + method: GET + url: "{{bas_url}}/restricted/list-products/get-listing?p=1&elems=30&sort=product_id,asc&category_id_in=243&reference=~62" + params: + - name: p + value: "1" + type: query + - name: elems + value: "30" + type: query + - name: sort + value: product_id,asc + type: query + - name: category_id_in + value: "243" + type: query + - name: reference + value: ~62 + type: query + body: + type: json + data: "" + auth: + type: bearer + token: "{{token}}" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/api_v1/Search Index Settings.yml b/bruno/api_v1/Search Index Settings.yml new file mode 100644 index 0000000..8c3c4cb --- /dev/null +++ b/bruno/api_v1/Search Index Settings.yml @@ -0,0 +1,17 @@ +info: + name: Search Index Settings + type: http + seq: 5 + +http: + method: POST + url: "{{bas_url}}/restricted/search/settings" + auth: + type: bearer + token: "{{token}}" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/api_v1/Search Items.yml b/bruno/api_v1/Search Items.yml new file mode 100644 index 0000000..27a19ab --- /dev/null +++ b/bruno/api_v1/Search Items.yml @@ -0,0 +1,28 @@ +info: + name: Search Items + type: http + seq: 3 + +http: + method: POST + url: "{{bas_url}}/restricted/search/search" + body: + type: json + data: |- + { + "q": "kinder", + "limit": 50, + "offset": 0, + // "filter": "'attr.10'= 71", + "facets":["category_ids", "price"] + // "facets": ["category_ids", "attr", "feat", "price"] + } + auth: + type: bearer + token: "{{token}}" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/bruno/api_v1/environments/dev.yml b/bruno/api_v1/environments/dev.yml new file mode 100644 index 0000000..5058362 --- /dev/null +++ b/bruno/api_v1/environments/dev.yml @@ -0,0 +1,6 @@ +name: dev +variables: + - name: bas_url + value: http://localhost:3000/api/v1 + - name: token + value: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJlbWFpbCI6ImdvY21hcmVrQGdtYWlsLmNvbSIsInVzZXJuYW1lIjoiZ29jbWFyZWtAZ21haWwuY29tIiwiY3VzdG9tZXJfcm9sZSI6InVzZXIiLCJjYXJ0c19pZHMiOltdLCJsYW5nX2lkIjoyLCJjb3VudHJ5X2lkIjoyLCJleHAiOjE3NzQ4OTUxNTAsImlhdCI6MTc3NDgwODc1MH0.q4ed45YNxWiH-4gmhtwzxxsIbAzELx8Rn8W5OT_W_cc diff --git a/bruno/api_v1/opencollection.yml b/bruno/api_v1/opencollection.yml new file mode 100644 index 0000000..8a4ac67 --- /dev/null +++ b/bruno/api_v1/opencollection.yml @@ -0,0 +1,10 @@ +opencollection: 1.0.0 + +info: + name: api_v1 +bundled: false +extensions: + bruno: + ignore: + - node_modules + - .git diff --git a/go.mod b/go.mod index 3c6905a..df99366 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.26.0 require ( cloud.google.com/go/auth v0.16.4 cloud.google.com/go/translate v1.12.7 + github.com/WinterYukky/gorm-extra-clause-plugin v0.4.0 github.com/a-h/templ v0.3.1001 github.com/alecthomas/chroma v0.10.0 github.com/dlclark/regexp2 v1.11.5 @@ -16,7 +17,7 @@ require ( github.com/openai/openai-go/v3 v3.28.0 github.com/samber/lo v1.53.0 github.com/spf13/cobra v1.9.1 - golang.org/x/crypto v0.48.0 + golang.org/x/crypto v0.49.0 golang.org/x/oauth2 v0.36.0 google.golang.org/api v0.247.0 gorm.io/gen v0.3.27 @@ -27,6 +28,7 @@ require ( cloud.google.com/go v0.121.6 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect cloud.google.com/go/longrunning v0.6.7 // indirect + git.ma-al.com/goc_marek/gormcol v1.0.3 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -45,9 +47,9 @@ require ( go.opentelemetry.io/otel v1.36.0 // indirect go.opentelemetry.io/otel/metric v1.36.0 // indirect go.opentelemetry.io/otel/trace v1.36.0 // indirect - golang.org/x/mod v0.33.0 // indirect + golang.org/x/mod v0.34.0 // indirect golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.42.0 // indirect + golang.org/x/tools v0.43.0 // indirect google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect @@ -96,7 +98,7 @@ require ( github.com/valyala/fasthttp v1.69.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xyproto/randomstring v1.2.0 // indirect - golang.org/x/net v0.51.0 // indirect + golang.org/x/net v0.52.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.42.0 // indirect golang.org/x/text v0.35.0 // indirect diff --git a/go.sum b/go.sum index cdcd176..331830c 100644 --- a/go.sum +++ b/go.sum @@ -14,11 +14,17 @@ dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +git.ma-al.com/goc_marek/gormcol v1.0.3 h1:FhDSbiErjNBkLN6xZEc7VDDMonV6Qm8y0Myfyc9KuvE= +git.ma-al.com/goc_marek/gormcol v1.0.3/go.mod h1:KBwk6/NZc/X4aRV3E5wytXOFX1xS9NZM5Hwfsb86QtY= +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/ProtonMail/go-crypto v1.4.0 h1:Zq/pbM3F5DFgJiMouxEdSVY44MVoQNEKp5d5QxIQceQ= github.com/ProtonMail/go-crypto v1.4.0/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo= +github.com/WinterYukky/gorm-extra-clause-plugin v0.4.0 h1:e4gYsN9tNzoBMYKYBaGwwZpSljJhW231+1cBlYwv8YQ= +github.com/WinterYukky/gorm-extra-clause-plugin v0.4.0/go.mod h1:jNWq8AymgsVev9Kq6mke0b3o3yzY6bTSwjMDfTvZPPM= github.com/a-h/templ v0.3.1001 h1:yHDTgexACdJttyiyamcTHXr2QkIeVF1MukLy44EAhMY= github.com/a-h/templ v0.3.1001/go.mod h1:oCZcnKRf5jjsGpf2yELzQfodLphd2mwecwG4Crk5HBo= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= @@ -213,11 +219,17 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= +golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= +golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= @@ -234,6 +246,7 @@ golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= +golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= @@ -242,6 +255,8 @@ golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= google.golang.org/api v0.247.0 h1:tSd/e0QrUlLsrwMKmkbQhYVa109qIintOls2Wh6bngc= google.golang.org/api v0.247.0/go.mod h1:r1qZOPmxXffXg6xS5uhx16Fa/UFY8QU/K4bfKrnvovM= google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= diff --git a/i18n/migrations/20260302163122_create_tables.sql b/i18n/migrations/20260302163122_create_tables.sql index d1dcc9d..bfe5401 100644 --- a/i18n/migrations/20260302163122_create_tables.sql +++ b/i18n/migrations/20260302163122_create_tables.sql @@ -200,6 +200,35 @@ END // DELIMITER ; + +DELIMITER $$ + +CREATE FUNCTION IF NOT EXISTS get_subcategories(startCategory INT) +RETURNS TEXT +DETERMINISTIC +BEGIN + DECLARE result TEXT; + + -- Use GROUP_CONCAT to aggregate all IDs into a single string + WITH RECURSIVE subcategories AS ( + SELECT c.id_category + FROM ps_category c + WHERE c.id_category = startCategory + + UNION ALL + + SELECT c.id_category + FROM ps_category c + INNER JOIN subcategories sc ON c.id_parent = sc.id_category + ) + SELECT GROUP_CONCAT(id_category) INTO result + FROM subcategories; + + RETURN result; +END$$ + +DELIMITER ; + -- +goose Down DROP TABLE IF EXISTS b2b_countries;