1 package SL::DB::Helpers::Mappings;
5 # threse will not be managed as Rose::DB models, because they are not normalized
6 # significant changes are needed to get them done.
7 my @lxoffice_blacklist_permanent = qw(
8 acc_trans audittrail customertax datev defaults department dpt_trans
9 exchangerate finanzamt follow_up_access gifi inventory leads licenseinvoice
10 makemodel partsgroup partstax prices record_links rmaitems status tax_zones
11 todo_user_config translation translation_payment_terms units_language
14 # these are not managed _yet_, but will hopefully at some point.
15 # if you are confident that one of these works, remove it here.
16 my @lxoffice_blacklist_temp = qw(
17 bank_accounts buchungsgruppen contacts custom_variable_configs
18 custom_variables custom_variables_validity drafts dunning dunning_config
19 employee follow_up_links follow_ups generic_translations history_erp language
20 license notes payment_terms pricegroup rma schema_info sepa_export
21 sepa_export_items tax taxkeys
24 my @lxoffice_blacklist = (@lxoffice_blacklist_permanent, @lxoffice_blacklist_temp);
26 # map table names to their models.
27 # unlike rails we have no singular<->plural magic.
28 # remeber: tables should be named as the plural of the model name.
29 my %lxoffice_package_names = (
31 ap => 'purchase_invoice',
32 delivery_orders => 'delivery_order',
33 delivery_order_items => 'delivery_order_item',
34 gl => 'GLTransaction',
35 invoice => 'invoice_item',
36 orderitems => 'order_item',
39 price_factors => 'price_factor',
40 printers => 'Printer',
45 return LXOFFICE => \@lxoffice_blacklist;
48 sub get_package_names {
49 return LXOFFICE => \%lxoffice_package_names;
58 SL::DB::Helpers::Mappings - Rose Table <-> Model mapping information
62 use SL::DB::Helpers::Mappings qw(@blacklist %table2model);
66 This modul stores table <-> model mappings used by the
67 L<scripts/rose_auto_create_model.pl> script. If you add a new table that has
68 custom mappings, add it here.
76 L<scripts/rose_auto_create_model.pl>
80 Sven Schöling <s.schoeling@linet-services.de>