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(
19 my @lxoffice_blacklist = (@lxoffice_blacklist_permanent, @lxoffice_blacklist_temp);
21 # map table names to their models.
22 # unlike rails we have no singular<->plural magic.
23 # remeber: tables should be named as the plural of the model name.
24 my %lxoffice_package_names = (
26 ap => 'purchase_invoice',
27 bank_accounts => 'bank_account',
28 buchungsgruppen => 'buchungsgruppe',
29 contacts => 'contact',
30 custom_variable_configs => 'custom_variable_config',
31 custom_variables => 'custom_variable',
32 custom_variables_validity => 'custom_variable_validity',
33 delivery_orders => 'delivery_order',
34 delivery_order_items => 'delivery_order_item',
37 dunning_config => 'dunning_config',
38 employee => 'employee',
39 follow_up_links => 'follow_up_link',
40 follow_ups => 'follow_up',
41 generic_translations => 'generic_translation',
42 gl => 'GLTransaction',
43 history_erp => 'history',
44 invoice => 'invoice_item',
45 language => 'language',
48 orderitems => 'order_item',
51 payment_terms => 'payment_term',
52 price_factors => 'price_factor',
53 pricegroup => 'pricegroup',
54 printers => 'Printer',
56 sepa_export => 'sepa_export',
57 sepa_export_items => 'sepa_export_item',
58 schema_info => 'schema_info',
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>