1 package SL::DB::Helpers::Mappings;
5 # these 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(
20 my @lxoffice_blacklist = (@lxoffice_blacklist_permanent, @lxoffice_blacklist_temp);
22 # map table names to their models.
23 # unlike rails we have no singular<->plural magic.
24 # remeber: tables should be named as the plural of the model name.
25 my %lxoffice_package_names = (
27 ap => 'purchase_invoice',
28 bank_accounts => 'bank_account',
29 buchungsgruppen => 'buchungsgruppe',
30 contacts => 'contact',
31 custom_variable_configs => 'custom_variable_config',
32 custom_variables => 'custom_variable',
33 custom_variables_validity => 'custom_variable_validity',
34 delivery_orders => 'delivery_order',
35 delivery_order_items => 'delivery_order_item',
38 dunning_config => 'dunning_config',
39 employee => 'employee',
40 follow_up_links => 'follow_up_link',
41 follow_ups => 'follow_up',
42 generic_translations => 'generic_translation',
43 gl => 'GLTransaction',
44 history_erp => 'history',
45 invoice => 'invoice_item',
46 language => 'language',
49 orderitems => 'order_item',
52 payment_terms => 'payment_term',
53 price_factors => 'price_factor',
54 pricegroup => 'pricegroup',
55 printers => 'Printer',
57 sepa_export => 'sepa_export',
58 sepa_export_items => 'sepa_export_item',
65 return LXOFFICE => \@lxoffice_blacklist;
68 sub get_package_names {
69 return LXOFFICE => \%lxoffice_package_names;
78 SL::DB::Helpers::Mappings - Rose Table <-> Model mapping information
82 use SL::DB::Helpers::Mappings qw(@blacklist %table2model);
86 This modul stores table <-> model mappings used by the
87 L<scripts/rose_auto_create_model.pl> script. If you add a new table that has
88 custom mappings, add it here.
96 L<scripts/rose_auto_create_model.pl>
100 Sven Schöling <s.schoeling@linet-services.de>