Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b8b112a3

Von Sven Schöling vor mehr als 11 Jahren hinzugefügt

  • ID b8b112a39bd601b0bc717646d78de470631da22a
  • Vorgänger c0931303
  • Nachfolger 2d7e4203

MetaSetup neu generiert

Unterschiede anzeigen:

SL/DB/MetaSetup/PeriodicInvoicesConfig.pm
6 6

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

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

  
12
  columns => [
13
    id                      => { type => 'integer', not_null => 1, sequence => 'id' },
14
    oe_id                   => { type => 'integer', not_null => 1 },
15
    periodicity             => { type => 'varchar', length => 10, not_null => 1 },
16
    print                   => { type => 'boolean', default => 'false' },
17
    printer_id              => { type => 'integer' },
18
    copies                  => { type => 'integer' },
19
    active                  => { type => 'boolean', default => 'true' },
20
    start_date              => { type => 'date' },
21
    ar_chart_id             => { type => 'integer', not_null => 1 },
22
    terminated              => { type => 'boolean', default => 'false' },
23
    end_date                => { type => 'date' },
24
    extend_automatically_by => { type => 'integer' },
25
  ],
26

  
27
  primary_key_columns => [ 'id' ],
28

  
29
  foreign_keys => [
30
    ar_chart => {
31
      class       => 'SL::DB::Chart',
32
      key_columns => { ar_chart_id => 'id' },
33
    },
34

  
35
    order => {
36
      class       => 'SL::DB::Order',
37
      key_columns => { oe_id => 'id' },
38
    },
39

  
40
    printer => {
41
      class       => 'SL::DB::Printer',
42
      key_columns => { printer_id => 'id' },
43
    },
44
  ],
9
__PACKAGE__->meta->table('periodic_invoices_configs');
10

  
11
__PACKAGE__->meta->columns(
12
  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
13
  oe_id                   => { type => 'integer', not_null => 1 },
14
  periodicity             => { type => 'varchar', length => 10, not_null => 1 },
15
  print                   => { type => 'boolean', default => 'false' },
16
  printer_id              => { type => 'integer' },
17
  copies                  => { type => 'integer' },
18
  active                  => { type => 'boolean', default => 'true' },
19
  terminated              => { type => 'boolean', default => 'false' },
20
  start_date              => { type => 'date' },
21
  end_date                => { type => 'date' },
22
  ar_chart_id             => { type => 'integer', not_null => 1 },
23
  extend_automatically_by => { type => 'integer' },
45 24
);
46 25

  
26
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
27

  
28
__PACKAGE__->meta->foreign_keys(
29
  ar_chart => {
30
    class       => 'SL::DB::Chart',
31
    key_columns => { ar_chart_id => 'id' },
32
  },
33

  
34
  oe => {
35
    class       => 'SL::DB::Order',
36
    key_columns => { oe_id => 'id' },
37
  },
38
);
39

  
40
__PACKAGE__->meta->relationships(
41
  ars => {
42
    map_class => 'SL::DB::PeriodicInvoice',
43
    map_from  => 'config',
44
    map_to    => 'ar',
45
    type      => 'many to many',
46
  },
47
);
48

  
49
# __PACKAGE__->meta->initialize;
50

  
47 51
1;
48 52
;

Auch abrufbar als: Unified diff