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

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

  
9
__PACKAGE__->meta->setup(
10
  table   => 'orderitems',
9
__PACKAGE__->meta->table('orderitems');
11 10

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

  
42
  primary_key_columns => [ 'id' ],
41
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
43 42

  
44
  allow_inline_column_values => 1,
43
__PACKAGE__->meta->allow_inline_column_values(1);
45 44

  
46
  foreign_keys => [
47
    part => {
48
      class       => 'SL::DB::Part',
49
      key_columns => { parts_id => 'id' },
50
    },
45
__PACKAGE__->meta->foreign_keys(
46
  part => {
47
    class       => 'SL::DB::Part',
48
    key_columns => { parts_id => 'id' },
49
  },
51 50

  
52
    price_factor_obj => {
53
      class       => 'SL::DB::PriceFactor',
54
      key_columns => { price_factor_id => 'id' },
55
    },
51
  price_factor_obj => {
52
    class       => 'SL::DB::PriceFactor',
53
    key_columns => { price_factor_id => 'id' },
54
  },
56 55

  
57
    pricegroup => {
58
      class       => 'SL::DB::Pricegroup',
59
      key_columns => { pricegroup_id => 'id' },
60
    },
56
  pricegroup => {
57
    class       => 'SL::DB::Pricegroup',
58
    key_columns => { pricegroup_id => 'id' },
59
  },
61 60

  
62
    project => {
63
      class       => 'SL::DB::Project',
64
      key_columns => { project_id => 'id' },
65
    },
61
  project => {
62
    class       => 'SL::DB::Project',
63
    key_columns => { project_id => 'id' },
64
  },
66 65

  
67
    order => {
68
      class       => 'SL::DB::Order',
69
      key_columns => { trans_id => 'id' },
70
    },
71
  ],
66
  order => {
67
    class       => 'SL::DB::Order',
68
    key_columns => { trans_id => 'id' },
69
  },
72 70
);
73 71

  
72
# __PACKAGE__->meta->initialize;
73

  
74 74
1;
75 75
;

Auch abrufbar als: Unified diff