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

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

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

  
12
  columns => [
13
    id                 => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
14
    trans_id           => { type => 'integer' },
15
    parts_id           => { type => 'integer' },
16
    description        => { type => 'text' },
17
    qty                => { type => 'float', precision => 4 },
18
    allocated          => { type => 'float', precision => 4 },
19
    sellprice          => { type => 'numeric', precision => 5, scale => 15 },
20
    fxsellprice        => { type => 'numeric', precision => 5, scale => 15 },
21
    discount           => { type => 'float', precision => 4 },
22
    assemblyitem       => { type => 'boolean', default => 'false' },
23
    project_id         => { type => 'integer' },
24
    deliverydate       => { type => 'date' },
25
    serialnumber       => { type => 'text' },
26
    itime              => { type => 'timestamp', default => 'now()' },
27
    mtime              => { type => 'timestamp' },
28
    pricegroup_id      => { type => 'integer' },
29
    ordnumber          => { type => 'text' },
30
    transdate          => { type => 'text' },
31
    cusordnumber       => { type => 'text' },
32
    unit               => { type => 'varchar', length => 20 },
33
    base_qty           => { type => 'float', precision => 4 },
34
    subtotal           => { type => 'boolean', default => 'false' },
35
    longdescription    => { type => 'text' },
36
    marge_total        => { type => 'numeric', precision => 5, scale => 15 },
37
    marge_percent      => { type => 'numeric', precision => 5, scale => 15 },
38
    lastcost           => { type => 'numeric', precision => 5, scale => 15 },
39
    price_factor_id    => { type => 'integer' },
40
    price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
41
    marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
42
  ],
43

  
44
  primary_key_columns => [ 'id' ],
45

  
46
  allow_inline_column_values => 1,
9
__PACKAGE__->meta->table('invoice');
10

  
11
__PACKAGE__->meta->columns(
12
  id                 => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
13
  trans_id           => { type => 'integer' },
14
  parts_id           => { type => 'integer' },
15
  description        => { type => 'text' },
16
  qty                => { type => 'float', precision => 4 },
17
  allocated          => { type => 'float', precision => 4 },
18
  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
19
  fxsellprice        => { type => 'numeric', precision => 5, scale => 15 },
20
  discount           => { type => 'float', precision => 4 },
21
  assemblyitem       => { type => 'boolean', default => 'false' },
22
  project_id         => { type => 'integer' },
23
  deliverydate       => { type => 'date' },
24
  serialnumber       => { type => 'text' },
25
  itime              => { type => 'timestamp', default => 'now()' },
26
  mtime              => { type => 'timestamp' },
27
  pricegroup_id      => { type => 'integer' },
28
  ordnumber          => { type => 'text' },
29
  transdate          => { type => 'text' },
30
  cusordnumber       => { type => 'text' },
31
  unit               => { type => 'varchar', length => 20 },
32
  base_qty           => { type => 'float', precision => 4 },
33
  subtotal           => { type => 'boolean', default => 'false' },
34
  longdescription    => { type => 'text' },
35
  marge_total        => { type => 'numeric', precision => 5, scale => 15 },
36
  marge_percent      => { type => 'numeric', precision => 5, scale => 15 },
37
  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
38
  price_factor_id    => { type => 'integer' },
39
  price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
40
  marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
41
);
47 42

  
48
  foreign_keys => [
49
    part => {
50
      class       => 'SL::DB::Part',
51
      key_columns => { parts_id => 'id' },
52
    },
43
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
53 44

  
54
    price_factor_obj => {
55
      class       => 'SL::DB::PriceFactor',
56
      key_columns => { price_factor_id => 'id' },
57
    },
45
__PACKAGE__->meta->allow_inline_column_values(1);
58 46

  
59
    pricegroup => {
60
      class       => 'SL::DB::Pricegroup',
61
      key_columns => { pricegroup_id => 'id' },
62
    },
47
__PACKAGE__->meta->foreign_keys(
48
  parts => {
49
    class       => 'SL::DB::Part',
50
    key_columns => { parts_id => 'id' },
51
  },
63 52

  
64
    project => {
65
      class       => 'SL::DB::Project',
66
      key_columns => { project_id => 'id' },
67
    },
68
  ],
53
  project => {
54
    class       => 'SL::DB::Project',
55
    key_columns => { project_id => 'id' },
56
  },
69 57
);
70 58

  
59
# __PACKAGE__->meta->initialize;
60

  
71 61
1;
72 62
;

Auch abrufbar als: Unified diff