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/Language.pm
6 6

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

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

  
12
  columns => [
13
    id                  => { type => 'integer', not_null => 1, sequence => 'id' },
14
    description         => { type => 'text' },
15
    template_code       => { type => 'text' },
16
    article_code        => { type => 'text' },
17
    itime               => { type => 'timestamp', default => 'now()' },
18
    mtime               => { type => 'timestamp' },
19
    output_numberformat => { type => 'text' },
20
    output_dateformat   => { type => 'text' },
21
    output_longdates    => { type => 'boolean' },
22
  ],
23

  
24
  primary_key_columns => [ 'id' ],
25

  
26
  allow_inline_column_values => 1,
9
__PACKAGE__->meta->table('language');
10

  
11
__PACKAGE__->meta->columns(
12
  id                  => { type => 'integer', not_null => 1, sequence => 'id' },
13
  description         => { type => 'text' },
14
  template_code       => { type => 'text' },
15
  article_code        => { type => 'text' },
16
  itime               => { type => 'timestamp', default => 'now()' },
17
  mtime               => { type => 'timestamp' },
18
  output_numberformat => { type => 'text' },
19
  output_dateformat   => { type => 'text' },
20
  output_longdates    => { type => 'boolean' },
27 21
);
28 22

  
23
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
24

  
25
__PACKAGE__->meta->allow_inline_column_values(1);
26

  
27
__PACKAGE__->meta->relationships(
28
  ap => {
29
    class      => 'SL::DB::PurchaseInvoice',
30
    column_map => { id => 'language_id' },
31
    type       => 'one to many',
32
  },
33

  
34
  ar => {
35
    class      => 'SL::DB::Invoice',
36
    column_map => { id => 'language_id' },
37
    type       => 'one to many',
38
  },
39

  
40
  customer => {
41
    class      => 'SL::DB::Customer',
42
    column_map => { id => 'language_id' },
43
    type       => 'one to many',
44
  },
45

  
46
  generic_translations => {
47
    class      => 'SL::DB::GenericTranslation',
48
    column_map => { id => 'language_id' },
49
    type       => 'one to many',
50
  },
51
);
52

  
53
# __PACKAGE__->meta->initialize;
54

  
29 55
1;
30 56
;

Auch abrufbar als: Unified diff