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

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

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

  
12
  columns => [
13
    id                      => { type => 'integer', not_null => 1, sequence => 'id' },
14
    ordnumber               => { type => 'text', not_null => 1 },
15
    transdate               => { type => 'date', default => 'now' },
16
    vendor_id               => { type => 'integer' },
17
    customer_id             => { type => 'integer' },
18
    amount                  => { type => 'numeric', precision => 5, scale => 15 },
19
    netamount               => { type => 'numeric', precision => 5, scale => 15 },
20
    reqdate                 => { type => 'date' },
21
    taxincluded             => { type => 'boolean' },
22
    shippingpoint           => { type => 'text' },
23
    notes                   => { type => 'text' },
24
    employee_id             => { type => 'integer' },
25
    closed                  => { type => 'boolean', default => 'false' },
26
    quotation               => { type => 'boolean', default => 'false' },
27
    quonumber               => { type => 'text' },
28
    cusordnumber            => { type => 'text' },
29
    intnotes                => { type => 'text' },
30
    department_id           => { type => 'integer' },
31
    itime                   => { type => 'timestamp', default => 'now()' },
32
    mtime                   => { type => 'timestamp' },
33
    shipvia                 => { type => 'text' },
34
    cp_id                   => { type => 'integer' },
35
    language_id             => { type => 'integer' },
36
    payment_id              => { type => 'integer' },
37
    delivery_customer_id    => { type => 'integer' },
38
    delivery_vendor_id      => { type => 'integer' },
39
    taxzone_id              => { type => 'integer' },
40
    proforma                => { type => 'boolean', default => 'false' },
41
    shipto_id               => { type => 'integer' },
42
    delivered               => { type => 'boolean', default => 'false' },
43
    globalproject_id        => { type => 'integer' },
44
    salesman_id             => { type => 'integer' },
45
    marge_total             => { type => 'numeric', precision => 5, scale => 15 },
46
    marge_percent           => { type => 'numeric', precision => 5, scale => 15 },
47
    transaction_description => { type => 'text' },
48
    currency_id             => { type => 'integer', not_null => 1 },
49
  ],
50

  
51
  primary_key_columns => [ 'id' ],
52

  
53
  allow_inline_column_values => 1,
54

  
55
  foreign_keys => [
56
    contact => {
57
      class       => 'SL::DB::Contact',
58
      key_columns => { cp_id => 'cp_id' },
59
    },
60

  
61
    currency => {
62
      class       => 'SL::DB::Currency',
63
      key_columns => { currency_id => 'id' },
64
    },
65

  
66
    customer => {
67
      class       => 'SL::DB::Customer',
68
      key_columns => { customer_id => 'id' },
69
    },
70

  
71
    delivery_customer => {
72
      class       => 'SL::DB::Customer',
73
      key_columns => { delivery_customer_id => 'id' },
74
    },
75

  
76
    delivery_vendor => {
77
      class       => 'SL::DB::Vendor',
78
      key_columns => { delivery_vendor_id => 'id' },
79
    },
80

  
81
    department => {
82
      class       => 'SL::DB::Department',
83
      key_columns => { department_id => 'id' },
84
    },
85

  
86
    employee => {
87
      class       => 'SL::DB::Employee',
88
      key_columns => { employee_id => 'id' },
89
    },
90

  
91
    globalproject => {
92
      class       => 'SL::DB::Project',
93
      key_columns => { globalproject_id => 'id' },
94
    },
95

  
96
    language => {
97
      class       => 'SL::DB::Language',
98
      key_columns => { language_id => 'id' },
99
    },
100

  
101
    payment_terms => {
102
      class       => 'SL::DB::PaymentTerm',
103
      key_columns => { payment_id => 'id' },
104
    },
105

  
106
    salesman => {
107
      class       => 'SL::DB::Employee',
108
      key_columns => { salesman_id => 'id' },
109
    },
110

  
111
    shipto => {
112
      class       => 'SL::DB::Shipto',
113
      key_columns => { shipto_id => 'shipto_id' },
114
    },
115

  
116
    vendor => {
117
      class       => 'SL::DB::Vendor',
118
      key_columns => { vendor_id => 'id' },
119
    },
120
  ],
9
__PACKAGE__->meta->table('oe');
10

  
11
__PACKAGE__->meta->columns(
12
  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
13
  ordnumber               => { type => 'text', not_null => 1 },
14
  transdate               => { type => 'date', default => 'now' },
15
  vendor_id               => { type => 'integer' },
16
  customer_id             => { type => 'integer' },
17
  amount                  => { type => 'numeric', precision => 5, scale => 15 },
18
  netamount               => { type => 'numeric', precision => 5, scale => 15 },
19
  reqdate                 => { type => 'date' },
20
  taxincluded             => { type => 'boolean' },
21
  shippingpoint           => { type => 'text' },
22
  notes                   => { type => 'text' },
23
  employee_id             => { type => 'integer' },
24
  closed                  => { type => 'boolean', default => 'false' },
25
  quotation               => { type => 'boolean', default => 'false' },
26
  quonumber               => { type => 'text' },
27
  cusordnumber            => { type => 'text' },
28
  intnotes                => { type => 'text' },
29
  department_id           => { type => 'integer' },
30
  itime                   => { type => 'timestamp', default => 'now()' },
31
  mtime                   => { type => 'timestamp' },
32
  shipvia                 => { type => 'text' },
33
  cp_id                   => { type => 'integer' },
34
  language_id             => { type => 'integer' },
35
  payment_id              => { type => 'integer' },
36
  delivery_customer_id    => { type => 'integer' },
37
  delivery_vendor_id      => { type => 'integer' },
38
  taxzone_id              => { type => 'integer' },
39
  proforma                => { type => 'boolean', default => 'false' },
40
  shipto_id               => { type => 'integer' },
41
  delivered               => { type => 'boolean', default => 'false' },
42
  globalproject_id        => { type => 'integer' },
43
  salesman_id             => { type => 'integer' },
44
  transaction_description => { type => 'text' },
45
  marge_total             => { type => 'numeric', precision => 5, scale => 15 },
46
  marge_percent           => { type => 'numeric', precision => 5, scale => 15 },
47
  currency_id             => { type => 'integer', not_null => 1 },
121 48
);
122 49

  
50
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
51

  
52
__PACKAGE__->meta->allow_inline_column_values(1);
53

  
54
__PACKAGE__->meta->foreign_keys(
55
  contact => {
56
    class       => 'SL::DB::Contact',
57
    key_columns => { cp_id => 'cp_id' },
58
  },
59

  
60
  currency => {
61
    class       => 'SL::DB::Currency',
62
    key_columns => { currency_id => 'id' },
63
  },
64

  
65
  customer => {
66
    class       => 'SL::DB::Customer',
67
    key_columns => { customer_id => 'id' },
68
  },
69

  
70
  delivery_customer => {
71
    class       => 'SL::DB::Customer',
72
    key_columns => { delivery_customer_id => 'id' },
73
  },
74

  
75
  delivery_vendor => {
76
    class       => 'SL::DB::Vendor',
77
    key_columns => { delivery_vendor_id => 'id' },
78
  },
79

  
80
  department => {
81
    class       => 'SL::DB::Department',
82
    key_columns => { department_id => 'id' },
83
  },
84

  
85
  employee => {
86
    class       => 'SL::DB::Employee',
87
    key_columns => { employee_id => 'id' },
88
  },
89

  
90
  globalproject => {
91
    class       => 'SL::DB::Project',
92
    key_columns => { globalproject_id => 'id' },
93
  },
94

  
95
  language => {
96
    class       => 'SL::DB::Language',
97
    key_columns => { language_id => 'id' },
98
  },
99

  
100
  salesman => {
101
    class       => 'SL::DB::Employee',
102
    key_columns => { salesman_id => 'id' },
103
  },
104

  
105
  vendor => {
106
    class       => 'SL::DB::Vendor',
107
    key_columns => { vendor_id => 'id' },
108
  },
109
);
110

  
111
# __PACKAGE__->meta->initialize;
112

  
123 113
1;
124 114
;

Auch abrufbar als: Unified diff