Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f97b0778

Von Sven Schöling vor etwa 14 Jahren hinzugefügt

  • ID f97b07787db5cacc0f90338fdb3c1237262917cb
  • Vorgänger 3cc8ad87
  • Nachfolger f9676efe

RDBO Normalisierung Part 2

Alle Tables mit id Spalte versehen. Taxkey und Licemse naming gefixt.
Ausserdem eine Funktion db eingefügt, die in package main sitzt und die
passenden Datenbankmodels zurückgibt, siehe Helpers::Mappings

Unterschiede anzeigen:

SL/DB/AccTrans.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::AccTrans;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::AccTrans;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/AccTransaction.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::AccTransaction;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::AccTransaction;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/AuditTrail.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::AuditTrail;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::AuditTrail;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/CustomerTax.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::CustomerTax;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::CustomerTax;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Datev.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Datev;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Datev;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Default.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Default;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Default;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Department.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Department;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Department;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/DptTrans.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::DptTrans;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::DptTrans;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Exchangerate.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Exchangerate;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Exchangerate;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Finanzamt.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Finanzamt;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Finanzamt;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/FollowUpAccess.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::FollowUpAccess;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::FollowUpAccess;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Gifi.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Gifi;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Gifi;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Helpers/ALL.pm
2 2

  
3 3
use strict;
4 4

  
5
use SL::DB::AccTrans;
6
use SL::DB::AccTransaction;
5 7
use SL::DB::Assembly;
8
use SL::DB::AuditTrail;
6 9
use SL::DB::BankAccount;
7 10
use SL::DB::Bin;
8 11
use SL::DB::Buchungsgruppe;
......
13 16
use SL::DB::CustomVariableConfig;
14 17
use SL::DB::CustomVariableValidity;
15 18
use SL::DB::Customer;
19
use SL::DB::CustomerTax;
20
use SL::DB::Datev;
21
use SL::DB::Default;
16 22
use SL::DB::DeliveryOrder;
17 23
use SL::DB::DeliveryOrderItem;
18 24
use SL::DB::DeliveryOrderItemsStock;
25
use SL::DB::Department;
26
use SL::DB::DptTrans;
19 27
use SL::DB::Draft;
20 28
use SL::DB::Dunning;
21 29
use SL::DB::DunningConfig;
22 30
use SL::DB::Employee;
31
use SL::DB::Exchangerate;
32
use SL::DB::Finanzamt;
23 33
use SL::DB::FollowUp;
34
use SL::DB::FollowUpAccess;
24 35
use SL::DB::FollowUpLink;
25 36
use SL::DB::GLTransaction;
26 37
use SL::DB::GenericTranslation;
38
use SL::DB::Gifi;
27 39
use SL::DB::History;
40
use SL::DB::Inventory;
28 41
use SL::DB::Invoice;
29 42
use SL::DB::InvoiceItem;
30 43
use SL::DB::Language;
31
use SL::DB::Licemse;
44
use SL::DB::Lead;
45
use SL::DB::License;
46
use SL::DB::LicenseInvoice;
47
use SL::DB::MakeModel;
32 48
use SL::DB::Note;
33 49
use SL::DB::Order;
34 50
use SL::DB::OrderItem;
35 51
use SL::DB::Part;
52
use SL::DB::PartsGroup;
53
use SL::DB::PartsTax;
36 54
use SL::DB::PaymentTerm;
37 55
use SL::DB::PriceFactor;
38 56
use SL::DB::Pricegroup;
57
use SL::DB::Prices;
39 58
use SL::DB::Printer;
40 59
use SL::DB::Project;
41 60
use SL::DB::PurchaseInvoice;
42 61
use SL::DB::RMA;
62
use SL::DB::RMAItem;
63
use SL::DB::RecordLink;
64
use SL::DB::SchemaInfo;
43 65
use SL::DB::SepaExport;
44 66
use SL::DB::SepaExportItem;
45
use SL::DB::SchemaInfo;
46 67
use SL::DB::Shipto;
68
use SL::DB::Status;
47 69
use SL::DB::Tax;
48
use SL::DB::Taxkey;
70
use SL::DB::TaxKey;
71
use SL::DB::TaxZone;
72
use SL::DB::TodoUserConfig;
49 73
use SL::DB::TransferType;
74
use SL::DB::Translation;
75
use SL::DB::TranslationPaymentTerm;
50 76
use SL::DB::Unit;
77
use SL::DB::UnitsLanguage;
51 78
use SL::DB::Vendor;
79
use SL::DB::VendorTax;
52 80
use SL::DB::Warehouse;
53 81

  
54

  
55

  
56 82
1;
57 83

  
58 84
__END__
SL/DB/Helpers/Mappings.pm
2 2

  
3 3
use strict;
4 4

  
5
use Exporter qw(import);
6

  
7
our @EXPORT_OK = qw(db);
8

  
9 5
# these will not be managed as Rose::DB models, because they are not normalized
10 6
# significant changes are needed to get them done.
11 7
my @lxoffice_blacklist_permanent = qw(
12
  acc_trans audittrail customertax datev defaults department dpt_trans
13
  exchangerate finanzamt follow_up_access gifi inventory leads licenseinvoice
14
  makemodel partsgroup partstax prices record_links rmaitems status tax_zones
15
  todo_user_config translation translation_payment_terms units_language
16
  vendortax);
8
);
17 9

  
18 10
# these are not managed _yet_, but will hopefully at some point.
19 11
# if you are confident that one of these works, remove it here.
......
26 18
# unlike rails we have no singular<->plural magic.
27 19
# remeber: tables should be named as the plural of the model name.
28 20
my %lxoffice_package_names = (
21
  acc_trans                      => 'acc_transaction',
22
  audittrail                     => 'audit_trail',
29 23
  ar                             => 'invoice',
30 24
  ap                             => 'purchase_invoice',
31 25
  bank_accounts                  => 'bank_account',
......
34 28
  custom_variable_configs        => 'custom_variable_config',
35 29
  custom_variables               => 'custom_variable',
36 30
  custom_variables_validity      => 'custom_variable_validity',
31
  customertax                    => 'customer_tax',
32
  datev                          => 'datev',
33
  defaults                       => 'default',
37 34
  delivery_orders                => 'delivery_order',
38 35
  delivery_order_items           => 'delivery_order_item',
36
  department                     => 'department',
37
  dpt_trans                      => 'dpt_trans',
39 38
  drafts                         => 'draft',
40 39
  dunning                        => 'dunning',
41 40
  dunning_config                 => 'dunning_config',
42 41
  employee                       => 'employee',
42
  exchangerate                   => 'exchangerate',
43
  finanzamt                      => 'finanzamt',
44
  follow_up_access               => 'follow_up_access',
43 45
  follow_up_links                => 'follow_up_link',
44 46
  follow_ups                     => 'follow_up',
45 47
  generic_translations           => 'generic_translation',
48
  gifi                           => 'gifi',
46 49
  gl                             => 'GLTransaction',
47 50
  history_erp                    => 'history',
51
  inventory                      => 'inventory',
48 52
  invoice                        => 'invoice_item',
49 53
  language                       => 'language',
50
  license                        => 'licemse',
54
  leads                          => 'lead',
55
  license                        => 'license',
56
  licenseinvoice                 => 'license_invoice',
57
  makemodel                      => 'make_model',
51 58
  notes                          => 'note',
52 59
  orderitems                     => 'order_item',
53 60
  oe                             => 'order',
54 61
  parts                          => 'part',
62
  partsgroup                     => 'parts_group',
63
  partstax                       => 'parts_tax',
55 64
  payment_terms                  => 'payment_term',
65
  prices                         => 'prices',
56 66
  price_factors                  => 'price_factor',
57 67
  pricegroup                     => 'pricegroup',
58 68
  printers                       => 'Printer',
69
  record_links                   => 'record_link',
59 70
  rma                            => 'RMA',
71
  rmaitems                       => 'RMA_item',
60 72
  sepa_export                    => 'sepa_export',
61 73
  sepa_export_items              => 'sepa_export_item',
62 74
  schema_info                    => 'schema_info',
75
  status                         => 'status',
63 76
  tax                            => 'tax',
64
  taxkeys                        => 'taxkey',
77
  taxkeys                        => 'tax_key',
78
  tax_zones                      => 'tax_zone',
79
  todo_user_config               => 'todo_user_config',
80
  translation                    => 'translation',
81
  translation_payment_terms      => 'translation_payment_term',
65 82
  units                          => 'unit',
83
  units_language                 => 'units_language',
84
  vendortax                      => 'vendor_tax',
66 85
);
67 86

  
68 87
sub get_blacklist {
SL/DB/Inventory.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Inventory;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Inventory;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Lead.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Lead;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Lead;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Licemse.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Licemse;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::Licemse;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/License.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::License;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::License;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/LicenseInvoice.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::LicenseInvoice;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::LicenseInvoice;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/MakeModel.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::MakeModel;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::MakeModel;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/MetaSetup/AccTrans.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::AccTrans;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'acc_trans',
11

  
12
  columns => [
13
    acc_trans_id   => { type => 'bigint', sequence => 'acc_trans_id_seq' },
14
    trans_id       => { type => 'integer', not_null => 1 },
15
    chart_id       => { type => 'integer', not_null => 1 },
16
    amount         => { type => 'numeric', precision => 5, scale => 15 },
17
    transdate      => { type => 'date', default => 'now' },
18
    gldate         => { type => 'date', default => 'now' },
19
    source         => { type => 'text' },
20
    cleared        => { type => 'boolean', default => 'false' },
21
    fx_transaction => { type => 'boolean', default => 'false' },
22
    ob_transaction => { type => 'boolean', default => 'false' },
23
    cb_transaction => { type => 'boolean', default => 'false' },
24
    project_id     => { type => 'integer' },
25
    memo           => { type => 'text' },
26
    taxkey         => { type => 'integer' },
27
    itime          => { type => 'timestamp', default => 'now()' },
28
    mtime          => { type => 'timestamp' },
29
    id             => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' },
30
  ],
31

  
32
  primary_key_columns => [ 'id' ],
33

  
34
  allow_inline_column_values => 1,
35

  
36
  foreign_keys => [
37
    chart => {
38
      class       => 'SL::DB::Chart',
39
      key_columns => { chart_id => 'id' },
40
    },
41

  
42
    project => {
43
      class       => 'SL::DB::Project',
44
      key_columns => { project_id => 'id' },
45
    },
46
  ],
47
);
48

  
49
1;
50
;
SL/DB/MetaSetup/AccTransaction.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::AccTransaction;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'acc_trans',
11

  
12
  columns => [
13
    acc_trans_id   => { type => 'bigint', sequence => 'acc_trans_id_seq' },
14
    trans_id       => { type => 'integer', not_null => 1 },
15
    chart_id       => { type => 'integer', not_null => 1 },
16
    amount         => { type => 'numeric', precision => 5, scale => 15 },
17
    transdate      => { type => 'date', default => 'now' },
18
    gldate         => { type => 'date', default => 'now' },
19
    source         => { type => 'text' },
20
    cleared        => { type => 'boolean', default => 'false' },
21
    fx_transaction => { type => 'boolean', default => 'false' },
22
    ob_transaction => { type => 'boolean', default => 'false' },
23
    cb_transaction => { type => 'boolean', default => 'false' },
24
    project_id     => { type => 'integer' },
25
    memo           => { type => 'text' },
26
    taxkey         => { type => 'integer' },
27
    itime          => { type => 'timestamp', default => 'now()' },
28
    mtime          => { type => 'timestamp' },
29
    id             => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' },
30
  ],
31

  
32
  primary_key_columns => [ 'id' ],
33

  
34
  allow_inline_column_values => 1,
35

  
36
  foreign_keys => [
37
    chart => {
38
      class       => 'SL::DB::Chart',
39
      key_columns => { chart_id => 'id' },
40
    },
41

  
42
    project => {
43
      class       => 'SL::DB::Project',
44
      key_columns => { project_id => 'id' },
45
    },
46
  ],
47
);
48

  
49
1;
50
;
SL/DB/MetaSetup/AuditTrail.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::AuditTrail;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'audittrail',
11

  
12
  columns => [
13
    trans_id    => { type => 'integer' },
14
    tablename   => { type => 'text' },
15
    reference   => { type => 'text' },
16
    formname    => { type => 'text' },
17
    action      => { type => 'text' },
18
    transdate   => { type => 'timestamp', default => 'now' },
19
    employee_id => { type => 'integer' },
20
    id          => { type => 'serial', not_null => 1 },
21
  ],
22

  
23
  primary_key_columns => [ 'id' ],
24
);
25

  
26
1;
27
;
SL/DB/MetaSetup/CustomerTax.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::CustomerTax;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'customertax',
11

  
12
  columns => [
13
    customer_id => { type => 'integer' },
14
    chart_id    => { type => 'integer' },
15
    itime       => { type => 'timestamp', default => 'now()' },
16
    mtime       => { type => 'timestamp' },
17
    id          => { type => 'serial', not_null => 1 },
18
  ],
19

  
20
  primary_key_columns => [ 'id' ],
21

  
22
  allow_inline_column_values => 1,
23
);
24

  
25
1;
26
;
SL/DB/MetaSetup/Datev.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Datev;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'datev',
11

  
12
  columns => [
13
    beraternr      => { type => 'varchar', length => 7 },
14
    beratername    => { type => 'varchar', length => 9 },
15
    mandantennr    => { type => 'varchar', length => 5 },
16
    dfvkz          => { type => 'varchar', length => 2 },
17
    datentraegernr => { type => 'varchar', length => 3 },
18
    abrechnungsnr  => { type => 'varchar', length => 6 },
19
    itime          => { type => 'timestamp', default => 'now()' },
20
    mtime          => { type => 'timestamp' },
21
    id             => { type => 'serial', not_null => 1 },
22
  ],
23

  
24
  primary_key_columns => [ 'id' ],
25

  
26
  allow_inline_column_values => 1,
27
);
28

  
29
1;
30
;
SL/DB/MetaSetup/Default.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Default;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'defaults',
11

  
12
  columns => [
13
    inventory_accno_id         => { type => 'integer' },
14
    income_accno_id            => { type => 'integer' },
15
    expense_accno_id           => { type => 'integer' },
16
    fxgain_accno_id            => { type => 'integer' },
17
    fxloss_accno_id            => { type => 'integer' },
18
    invnumber                  => { type => 'text' },
19
    sonumber                   => { type => 'text' },
20
    yearend                    => { type => 'varchar', length => 5 },
21
    weightunit                 => { type => 'varchar', length => 5 },
22
    businessnumber             => { type => 'text' },
23
    version                    => { type => 'varchar', length => 8 },
24
    curr                       => { type => 'text' },
25
    closedto                   => { type => 'date' },
26
    revtrans                   => { type => 'boolean', default => 'false' },
27
    ponumber                   => { type => 'text' },
28
    sqnumber                   => { type => 'text' },
29
    rfqnumber                  => { type => 'text' },
30
    customernumber             => { type => 'text' },
31
    vendornumber               => { type => 'text' },
32
    audittrail                 => { type => 'boolean', default => 'false' },
33
    articlenumber              => { type => 'text' },
34
    servicenumber              => { type => 'text' },
35
    coa                        => { type => 'text' },
36
    itime                      => { type => 'timestamp', default => 'now()' },
37
    mtime                      => { type => 'timestamp' },
38
    rmanumber                  => { type => 'text' },
39
    cnnumber                   => { type => 'text' },
40
    dunning_ar_amount_fee      => { type => 'integer' },
41
    dunning_ar_amount_interest => { type => 'integer' },
42
    dunning_ar                 => { type => 'integer' },
43
    pdonumber                  => { type => 'text' },
44
    sdonumber                  => { type => 'text' },
45
    id                         => { type => 'serial', not_null => 1 },
46
  ],
47

  
48
  primary_key_columns => [ 'id' ],
49

  
50
  allow_inline_column_values => 1,
51
);
52

  
53
1;
54
;
SL/DB/MetaSetup/Department.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Department;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'department',
11

  
12
  columns => [
13
    id          => { type => 'integer', not_null => 1, sequence => 'id' },
14
    description => { type => 'text' },
15
    role        => { type => 'character', default => 'P', length => 1 },
16
    itime       => { type => 'timestamp', default => 'now()' },
17
    mtime       => { type => 'timestamp' },
18
  ],
19

  
20
  primary_key_columns => [ 'id' ],
21

  
22
  allow_inline_column_values => 1,
23
);
24

  
25
1;
26
;
SL/DB/MetaSetup/DptTrans.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::DptTrans;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'dpt_trans',
11

  
12
  columns => [
13
    trans_id      => { type => 'integer' },
14
    department_id => { type => 'integer' },
15
    itime         => { type => 'timestamp', default => 'now()' },
16
    mtime         => { type => 'timestamp' },
17
    id            => { type => 'serial', not_null => 1 },
18
  ],
19

  
20
  primary_key_columns => [ 'id' ],
21

  
22
  allow_inline_column_values => 1,
23
);
24

  
25
1;
26
;
SL/DB/MetaSetup/Exchangerate.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Exchangerate;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'exchangerate',
11

  
12
  columns => [
13
    curr      => { type => 'character', length => 3 },
14
    transdate => { type => 'date' },
15
    buy       => { type => 'numeric', precision => 5, scale => 15 },
16
    sell      => { type => 'numeric', precision => 5, scale => 15 },
17
    itime     => { type => 'timestamp', default => 'now()' },
18
    mtime     => { type => 'timestamp' },
19
    id        => { type => 'serial', not_null => 1 },
20
  ],
21

  
22
  primary_key_columns => [ 'id' ],
23

  
24
  allow_inline_column_values => 1,
25
);
26

  
27
1;
28
;
SL/DB/MetaSetup/Finanzamt.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Finanzamt;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'finanzamt',
11

  
12
  columns => [
13
    fa_land_nr           => { type => 'text' },
14
    fa_bufa_nr           => { type => 'text' },
15
    fa_name              => { type => 'text' },
16
    fa_strasse           => { type => 'text' },
17
    fa_plz               => { type => 'text' },
18
    fa_ort               => { type => 'text' },
19
    fa_telefon           => { type => 'text' },
20
    fa_fax               => { type => 'text' },
21
    fa_plz_grosskunden   => { type => 'text' },
22
    fa_plz_postfach      => { type => 'text' },
23
    fa_postfach          => { type => 'text' },
24
    fa_blz_1             => { type => 'text' },
25
    fa_kontonummer_1     => { type => 'text' },
26
    fa_bankbezeichnung_1 => { type => 'text' },
27
    fa_blz_2             => { type => 'text' },
28
    fa_kontonummer_2     => { type => 'text' },
29
    fa_bankbezeichnung_2 => { type => 'text' },
30
    fa_oeffnungszeiten   => { type => 'text' },
31
    fa_email             => { type => 'text' },
32
    fa_internet          => { type => 'text' },
33
    id                   => { type => 'serial', not_null => 1 },
34
  ],
35

  
36
  primary_key_columns => [ 'id' ],
37
);
38

  
39
1;
40
;
SL/DB/MetaSetup/FollowUpAccess.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::FollowUpAccess;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'follow_up_access',
11

  
12
  columns => [
13
    who  => { type => 'integer', not_null => 1 },
14
    what => { type => 'integer', not_null => 1 },
15
    id   => { type => 'serial', not_null => 1 },
16
  ],
17

  
18
  primary_key_columns => [ 'id' ],
19

  
20
  foreign_keys => [
21
    employee => {
22
      class       => 'SL::DB::Employee',
23
      key_columns => { who => 'id' },
24
    },
25

  
26
    employee_obj => {
27
      class       => 'SL::DB::Employee',
28
      key_columns => { what => 'id' },
29
    },
30
  ],
31
);
32

  
33
1;
34
;
SL/DB/MetaSetup/Gifi.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Gifi;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'gifi',
11

  
12
  columns => [
13
    accno       => { type => 'text' },
14
    description => { type => 'text' },
15
    id          => { type => 'serial', not_null => 1 },
16
  ],
17

  
18
  primary_key_columns => [ 'id' ],
19

  
20
  unique_key => [ 'accno' ],
21
);
22

  
23
1;
24
;
SL/DB/MetaSetup/Inventory.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Inventory;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'inventory',
11

  
12
  columns => [
13
    warehouse_id  => { type => 'integer', not_null => 1 },
14
    parts_id      => { type => 'integer', not_null => 1 },
15
    oe_id         => { type => 'integer' },
16
    orderitems_id => { type => 'integer' },
17
    shippingdate  => { type => 'date' },
18
    employee_id   => { type => 'integer', not_null => 1 },
19
    itime         => { type => 'timestamp', default => 'now()' },
20
    mtime         => { type => 'timestamp' },
21
    bin_id        => { type => 'integer', not_null => 1 },
22
    qty           => { type => 'numeric', precision => 5, scale => 25 },
23
    trans_id      => { type => 'integer', not_null => 1 },
24
    trans_type_id => { type => 'integer', not_null => 1 },
25
    project_id    => { type => 'integer' },
26
    chargenumber  => { type => 'text' },
27
    comment       => { type => 'text' },
28
    bestbefore    => { type => 'date' },
29
    id            => { type => 'serial', not_null => 1 },
30
  ],
31

  
32
  primary_key_columns => [ 'id' ],
33

  
34
  allow_inline_column_values => 1,
35

  
36
  foreign_keys => [
37
    bin => {
38
      class       => 'SL::DB::Bin',
39
      key_columns => { bin_id => 'id' },
40
    },
41

  
42
    employee => {
43
      class       => 'SL::DB::Employee',
44
      key_columns => { employee_id => 'id' },
45
    },
46

  
47
    parts => {
48
      class       => 'SL::DB::Part',
49
      key_columns => { parts_id => 'id' },
50
    },
51

  
52
    project => {
53
      class       => 'SL::DB::Project',
54
      key_columns => { project_id => 'id' },
55
    },
56

  
57
    trans_type => {
58
      class       => 'SL::DB::TransferType',
59
      key_columns => { trans_type_id => 'id' },
60
    },
61

  
62
    warehouse => {
63
      class       => 'SL::DB::Warehouse',
64
      key_columns => { warehouse_id => 'id' },
65
    },
66
  ],
67
);
68

  
69
1;
70
;
SL/DB/MetaSetup/Lead.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Lead;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'leads',
11

  
12
  columns => [
13
    id   => { type => 'integer', not_null => 1, sequence => 'id' },
14
    lead => { type => 'varchar', length => 50 },
15
  ],
16

  
17
  primary_key_columns => [ 'id' ],
18
);
19

  
20
1;
21
;
SL/DB/MetaSetup/License.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::License;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'license',
11

  
12
  columns => [
13
    id            => { type => 'integer', not_null => 1, sequence => 'id' },
14
    parts_id      => { type => 'integer' },
15
    customer_id   => { type => 'integer' },
16
    comment       => { type => 'text' },
17
    validuntil    => { type => 'date' },
18
    issuedate     => { type => 'date', default => 'now' },
19
    quantity      => { type => 'integer' },
20
    licensenumber => { type => 'text' },
21
  ],
22

  
23
  primary_key_columns => [ 'id' ],
24
);
25

  
26
1;
27
;
SL/DB/MetaSetup/LicenseInvoice.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::LicenseInvoice;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'licenseinvoice',
11

  
12
  columns => [
13
    trans_id   => { type => 'integer' },
14
    license_id => { type => 'integer' },
15
    id         => { type => 'serial', not_null => 1 },
16
  ],
17

  
18
  primary_key_columns => [ 'id' ],
19
);
20

  
21
1;
22
;
SL/DB/MetaSetup/MakeModel.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::MakeModel;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'makemodel',
11

  
12
  columns => [
13
    parts_id => { type => 'integer' },
14
    model    => { type => 'text' },
15
    itime    => { type => 'timestamp', default => 'now()' },
16
    mtime    => { type => 'timestamp' },
17
    make     => { type => 'integer' },
18
    id       => { type => 'serial', not_null => 1 },
19
  ],
20

  
21
  primary_key_columns => [ 'id' ],
22

  
23
  allow_inline_column_values => 1,
24
);
25

  
26
1;
27
;
SL/DB/MetaSetup/PartsGroup.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::PartsGroup;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'partsgroup',
11

  
12
  columns => [
13
    id         => { type => 'integer', not_null => 1, sequence => 'id' },
14
    partsgroup => { type => 'text' },
15
    itime      => { type => 'timestamp', default => 'now()' },
16
    mtime      => { type => 'timestamp' },
17
  ],
18

  
19
  primary_key_columns => [ 'id' ],
20

  
21
  allow_inline_column_values => 1,
22
);
23

  
24
1;
25
;
SL/DB/MetaSetup/PartsTax.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::PartsTax;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'partstax',
11

  
12
  columns => [
13
    parts_id => { type => 'integer' },
14
    chart_id => { type => 'integer' },
15
    itime    => { type => 'timestamp', default => 'now()' },
16
    mtime    => { type => 'timestamp' },
17
    id       => { type => 'serial', not_null => 1 },
18
  ],
19

  
20
  primary_key_columns => [ 'id' ],
21

  
22
  allow_inline_column_values => 1,
23
);
24

  
25
1;
26
;
SL/DB/MetaSetup/Prices.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Prices;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'prices',
11

  
12
  columns => [
13
    parts_id      => { type => 'integer' },
14
    pricegroup_id => { type => 'integer' },
15
    price         => { type => 'numeric', precision => 5, scale => 15 },
16
    id            => { type => 'serial', not_null => 1 },
17
  ],
18

  
19
  primary_key_columns => [ 'id' ],
20

  
21
  foreign_keys => [
22
    parts => {
23
      class       => 'SL::DB::Part',
24
      key_columns => { parts_id => 'id' },
25
    },
26

  
27
    pricegroup => {
28
      class       => 'SL::DB::Pricegroup',
29
      key_columns => { pricegroup_id => 'id' },
30
    },
31
  ],
32
);
33

  
34
1;
35
;
SL/DB/MetaSetup/RMAItem.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::RMAItem;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'rmaitems',
11

  
12
  columns => [
13
    trans_id      => { type => 'integer' },
14
    parts_id      => { type => 'integer' },
15
    description   => { type => 'text' },
16
    qty           => { type => 'float', precision => 4 },
17
    base_qty      => { type => 'float', precision => 4 },
18
    sellprice     => { type => 'numeric', precision => 5, scale => 15 },
19
    discount      => { type => 'float', precision => 4 },
20
    project_id    => { type => 'integer' },
21
    reqdate       => { type => 'date' },
22
    ship          => { type => 'float', precision => 4 },
23
    serialnumber  => { type => 'text' },
24
    id            => { type => 'integer', not_null => 1, sequence => 'orderitemsid' },
25
    itime         => { type => 'timestamp', default => 'now()' },
26
    mtime         => { type => 'timestamp' },
27
    pricegroup_id => { type => 'integer' },
28
    rmanumber     => { type => 'text' },
29
    transdate     => { type => 'text' },
30
    cusrmanumber  => { type => 'text' },
31
    unit          => { type => 'varchar', length => 20 },
32
  ],
33

  
34
  primary_key_columns => [ 'id' ],
35

  
36
  allow_inline_column_values => 1,
37

  
38
  foreign_keys => [
39
    parts => {
40
      class       => 'SL::DB::Part',
41
      key_columns => { parts_id => 'id' },
42
    },
43
  ],
44
);
45

  
46
1;
47
;
SL/DB/MetaSetup/RecordLink.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::RecordLink;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'record_links',
11

  
12
  columns => [
13
    from_table => { type => 'varchar', length => 50, not_null => 1 },
14
    from_id    => { type => 'integer', not_null => 1 },
15
    to_table   => { type => 'varchar', length => 50, not_null => 1 },
16
    to_id      => { type => 'integer', not_null => 1 },
17
    itime      => { type => 'timestamp', default => 'now()' },
18
    id         => { type => 'serial', not_null => 1 },
19
  ],
20

  
21
  primary_key_columns => [ 'id' ],
22

  
23
  allow_inline_column_values => 1,
24
);
25

  
26
1;
27
;
SL/DB/MetaSetup/Status.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::Status;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'status',
11

  
12
  columns => [
13
    trans_id  => { type => 'integer' },
14
    formname  => { type => 'text' },
15
    printed   => { type => 'boolean', default => 'false' },
16
    emailed   => { type => 'boolean', default => 'false' },
17
    spoolfile => { type => 'text' },
18
    chart_id  => { type => 'integer' },
19
    itime     => { type => 'timestamp', default => 'now()' },
20
    mtime     => { type => 'timestamp' },
21
    id        => { type => 'serial', not_null => 1 },
22
  ],
23

  
24
  primary_key_columns => [ 'id' ],
25

  
26
  allow_inline_column_values => 1,
27
);
28

  
29
1;
30
;
SL/DB/MetaSetup/TaxKey.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::TaxKey;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'taxkeys',
11

  
12
  columns => [
13
    id        => { type => 'integer', not_null => 1, sequence => 'id' },
14
    chart_id  => { type => 'integer' },
15
    tax_id    => { type => 'integer' },
16
    taxkey_id => { type => 'integer' },
17
    pos_ustva => { type => 'integer' },
18
    startdate => { type => 'date' },
19
  ],
20

  
21
  primary_key_columns => [ 'id' ],
22

  
23
  foreign_keys => [
24
    tax => {
25
      class       => 'SL::DB::Tax',
26
      key_columns => { tax_id => 'id' },
27
    },
28
  ],
29
);
30

  
31
1;
32
;
SL/DB/MetaSetup/TaxZone.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::TaxZone;
4

  
5
use strict;
6

  
7
use base qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->setup(
... Dieser Diff wurde abgeschnitten, weil er die maximale Anzahl anzuzeigender Zeilen überschreitet.

Auch abrufbar als: Unified diff