Revision b8b112a3
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/AccTransaction.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'acc_trans', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
acc_trans_id => { type => 'bigint', not_null => 1, sequence => 'acc_trans_id_seq' }, |
|
14 |
trans_id => { type => 'integer', not_null => 1 }, |
|
15 |
chart_id => { type => 'integer', not_null => 1 }, |
|
16 |
amount => { type => 'numeric', precision => 5, scale => 15 }, |
|
17 |
transdate => { type => 'date', default => 'now' }, |
|
18 |
gldate => { type => 'date', default => 'now' }, |
|
19 |
source => { type => 'text' }, |
|
20 |
cleared => { type => 'boolean', default => 'false', not_null => 1 }, |
|
21 |
fx_transaction => { type => 'boolean', default => 'false', not_null => 1 }, |
|
22 |
ob_transaction => { type => 'boolean', default => 'false', not_null => 1 }, |
|
23 |
cb_transaction => { type => 'boolean', default => 'false', not_null => 1 }, |
|
24 |
project_id => { type => 'integer' }, |
|
25 |
memo => { type => 'text' }, |
|
26 |
taxkey => { type => 'integer' }, |
|
27 |
itime => { type => 'timestamp', default => 'now()' }, |
|
28 |
mtime => { type => 'timestamp' }, |
|
29 |
tax_id => { type => 'integer', not_null => 1 }, |
|
30 |
chart_link => { type => 'text', not_null => 1 }, |
|
31 |
], |
|
32 |
|
|
33 |
primary_key_columns => [ 'acc_trans_id' ], |
|
34 |
|
|
35 |
allow_inline_column_values => 1, |
|
36 |
|
|
37 |
foreign_keys => [ |
|
38 |
chart => { |
|
39 |
class => 'SL::DB::Chart', |
|
40 |
key_columns => { chart_id => 'id' }, |
|
41 |
}, |
|
42 |
|
|
43 |
project => { |
|
44 |
class => 'SL::DB::Project', |
|
45 |
key_columns => { project_id => 'id' }, |
|
46 |
}, |
|
47 |
|
|
48 |
tax => { |
|
49 |
class => 'SL::DB::Tax', |
|
50 |
key_columns => { tax_id => 'id' }, |
|
51 |
}, |
|
52 |
], |
|
9 |
__PACKAGE__->meta->table('acc_trans'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
acc_trans_id => { type => 'bigint', not_null => 1, sequence => 'acc_trans_id_seq' }, |
|
13 |
trans_id => { type => 'integer', not_null => 1 }, |
|
14 |
chart_id => { type => 'integer', not_null => 1 }, |
|
15 |
amount => { type => 'numeric', precision => 5, scale => 15 }, |
|
16 |
transdate => { type => 'date', default => 'now' }, |
|
17 |
gldate => { type => 'date', default => 'now' }, |
|
18 |
source => { type => 'text' }, |
|
19 |
cleared => { type => 'boolean', default => 'false', not_null => 1 }, |
|
20 |
fx_transaction => { type => 'boolean', default => 'false', not_null => 1 }, |
|
21 |
ob_transaction => { type => 'boolean', default => 'false', not_null => 1 }, |
|
22 |
cb_transaction => { type => 'boolean', default => 'false', not_null => 1 }, |
|
23 |
project_id => { type => 'integer' }, |
|
24 |
memo => { type => 'text' }, |
|
25 |
taxkey => { type => 'integer' }, |
|
26 |
itime => { type => 'timestamp', default => 'now()' }, |
|
27 |
mtime => { type => 'timestamp' }, |
|
28 |
tax_id => { type => 'integer', not_null => 1 }, |
|
29 |
chart_link => { type => 'text', not_null => 1 }, |
|
53 | 30 |
); |
54 | 31 |
|
32 |
__PACKAGE__->meta->primary_key_columns([ 'acc_trans_id' ]); |
|
33 |
|
|
34 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
35 |
|
|
36 |
__PACKAGE__->meta->foreign_keys( |
|
37 |
chart => { |
|
38 |
class => 'SL::DB::Chart', |
|
39 |
key_columns => { chart_id => 'id' }, |
|
40 |
}, |
|
41 |
|
|
42 |
project => { |
|
43 |
class => 'SL::DB::Project', |
|
44 |
key_columns => { project_id => 'id' }, |
|
45 |
}, |
|
46 |
|
|
47 |
tax => { |
|
48 |
class => 'SL::DB::Tax', |
|
49 |
key_columns => { tax_id => 'id' }, |
|
50 |
}, |
|
51 |
); |
|
52 |
|
|
53 |
# __PACKAGE__->meta->initialize; |
|
54 |
|
|
55 | 55 |
1; |
56 | 56 |
; |
SL/DB/MetaSetup/Assembly.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'assembly', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer' }, |
|
14 |
parts_id => { type => 'integer' }, |
|
15 |
qty => { type => 'float', precision => 4 }, |
|
16 |
bom => { type => 'boolean' }, |
|
17 |
itime => { type => 'timestamp', default => 'now()' }, |
|
18 |
mtime => { type => 'timestamp' }, |
|
19 |
assembly_id => { type => 'serial', not_null => 1 }, |
|
20 |
], |
|
21 |
|
|
22 |
primary_key_columns => [ 'assembly_id' ], |
|
23 |
|
|
24 |
allow_inline_column_values => 1, |
|
9 |
__PACKAGE__->meta->table('assembly'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer' }, |
|
13 |
parts_id => { type => 'integer' }, |
|
14 |
qty => { type => 'float', precision => 4 }, |
|
15 |
bom => { type => 'boolean' }, |
|
16 |
itime => { type => 'timestamp', default => 'now()' }, |
|
17 |
mtime => { type => 'timestamp' }, |
|
18 |
assembly_id => { type => 'serial', not_null => 1 }, |
|
25 | 19 |
); |
26 | 20 |
|
21 |
__PACKAGE__->meta->primary_key_columns([ 'assembly_id' ]); |
|
22 |
|
|
23 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
24 |
|
|
25 |
# __PACKAGE__->meta->initialize; |
|
26 |
|
|
27 | 27 |
1; |
28 | 28 |
; |
SL/DB/MetaSetup/AuditTrail.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'audittrail', |
|
9 |
__PACKAGE__->meta->table('audittrail'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
trans_id => { type => 'integer' }, |
|
14 |
tablename => { type => 'text' }, |
|
15 |
reference => { type => 'text' }, |
|
16 |
formname => { type => 'text' }, |
|
17 |
action => { type => 'text' }, |
|
18 |
transdate => { type => 'timestamp', default => 'now' }, |
|
19 |
employee_id => { type => 'integer' }, |
|
20 |
id => { type => 'serial', not_null => 1 }, |
|
21 |
], |
|
22 |
|
|
23 |
primary_key_columns => [ 'id' ], |
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
trans_id => { type => 'integer' }, |
|
13 |
tablename => { type => 'text' }, |
|
14 |
reference => { type => 'text' }, |
|
15 |
formname => { type => 'text' }, |
|
16 |
action => { type => 'text' }, |
|
17 |
transdate => { type => 'timestamp', default => 'now' }, |
|
18 |
employee_id => { type => 'integer' }, |
|
19 |
id => { type => 'serial', not_null => 1 }, |
|
24 | 20 |
); |
25 | 21 |
|
22 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
23 |
|
|
24 |
# __PACKAGE__->meta->initialize; |
|
25 |
|
|
26 | 26 |
1; |
27 | 27 |
; |
SL/DB/MetaSetup/AuthClient.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'clients', |
|
11 |
schema => 'auth', |
|
12 |
|
|
13 |
columns => [ |
|
14 |
id => { type => 'serial', not_null => 1 }, |
|
15 |
name => { type => 'text', not_null => 1 }, |
|
16 |
dbhost => { type => 'text', not_null => 1 }, |
|
17 |
dbport => { type => 'integer', default => 5432, not_null => 1 }, |
|
18 |
dbname => { type => 'text', not_null => 1 }, |
|
19 |
dbuser => { type => 'text', not_null => 1 }, |
|
20 |
dbpasswd => { type => 'text', not_null => 1 }, |
|
21 |
is_default => { type => 'boolean', default => 'false', not_null => 1 }, |
|
22 |
], |
|
23 |
|
|
24 |
primary_key_columns => [ 'id' ], |
|
25 |
|
|
26 |
unique_keys => [ |
|
27 |
[ 'dbhost', 'dbport', 'dbname' ], |
|
28 |
[ 'name' ], |
|
29 |
], |
|
9 |
__PACKAGE__->meta->table('clients'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
11 |
|
|
12 |
__PACKAGE__->meta->columns( |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
name => { type => 'text', not_null => 1 }, |
|
15 |
dbhost => { type => 'text', not_null => 1 }, |
|
16 |
dbport => { type => 'integer', default => 5432, not_null => 1 }, |
|
17 |
dbname => { type => 'text', not_null => 1 }, |
|
18 |
dbuser => { type => 'text', not_null => 1 }, |
|
19 |
dbpasswd => { type => 'text', not_null => 1 }, |
|
20 |
is_default => { type => 'boolean', default => 'false', not_null => 1 }, |
|
30 | 21 |
); |
31 | 22 |
|
23 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
24 |
|
|
25 |
__PACKAGE__->meta->unique_keys( |
|
26 |
[ 'dbhost', 'dbport', 'dbname' ], |
|
27 |
[ 'name' ], |
|
28 |
); |
|
29 |
|
|
30 |
# __PACKAGE__->meta->initialize; |
|
31 |
|
|
32 | 32 |
1; |
33 | 33 |
; |
SL/DB/MetaSetup/AuthClientGroup.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'clients_groups', |
|
11 |
schema => 'auth', |
|
12 |
|
|
13 |
columns => [ |
|
14 |
client_id => { type => 'integer', not_null => 1 }, |
|
15 |
group_id => { type => 'integer', not_null => 1 }, |
|
16 |
], |
|
17 |
|
|
18 |
primary_key_columns => [ 'client_id', 'group_id' ], |
|
19 |
|
|
20 |
foreign_keys => [ |
|
21 |
client => { |
|
22 |
class => 'SL::DB::AuthClient', |
|
23 |
key_columns => { client_id => 'id' }, |
|
24 |
}, |
|
25 |
|
|
26 |
group => { |
|
27 |
class => 'SL::DB::AuthGroup', |
|
28 |
key_columns => { group_id => 'id' }, |
|
29 |
}, |
|
30 |
], |
|
9 |
__PACKAGE__->meta->table('clients_groups'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
11 |
|
|
12 |
__PACKAGE__->meta->columns( |
|
13 |
client_id => { type => 'integer', not_null => 1 }, |
|
14 |
group_id => { type => 'integer', not_null => 1 }, |
|
15 |
); |
|
16 |
|
|
17 |
__PACKAGE__->meta->primary_key_columns([ 'client_id', 'group_id' ]); |
|
18 |
|
|
19 |
__PACKAGE__->meta->foreign_keys( |
|
20 |
client => { |
|
21 |
class => 'SL::DB::AuthClient', |
|
22 |
key_columns => { client_id => 'id' }, |
|
23 |
}, |
|
24 |
|
|
25 |
group => { |
|
26 |
class => 'SL::DB::AuthGroup', |
|
27 |
key_columns => { group_id => 'id' }, |
|
28 |
}, |
|
31 | 29 |
); |
32 | 30 |
|
31 |
# __PACKAGE__->meta->initialize; |
|
32 |
|
|
33 | 33 |
1; |
34 | 34 |
; |
SL/DB/MetaSetup/AuthClientUser.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'clients_users', |
|
11 |
schema => 'auth', |
|
12 |
|
|
13 |
columns => [ |
|
14 |
client_id => { type => 'integer', not_null => 1 }, |
|
15 |
user_id => { type => 'integer', not_null => 1 }, |
|
16 |
], |
|
17 |
|
|
18 |
primary_key_columns => [ 'client_id', 'user_id' ], |
|
19 |
|
|
20 |
foreign_keys => [ |
|
21 |
client => { |
|
22 |
class => 'SL::DB::AuthClient', |
|
23 |
key_columns => { client_id => 'id' }, |
|
24 |
}, |
|
25 |
|
|
26 |
user => { |
|
27 |
class => 'SL::DB::AuthUser', |
|
28 |
key_columns => { user_id => 'id' }, |
|
29 |
}, |
|
30 |
], |
|
9 |
__PACKAGE__->meta->table('clients_users'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
11 |
|
|
12 |
__PACKAGE__->meta->columns( |
|
13 |
client_id => { type => 'integer', not_null => 1 }, |
|
14 |
user_id => { type => 'integer', not_null => 1 }, |
|
15 |
); |
|
16 |
|
|
17 |
__PACKAGE__->meta->primary_key_columns([ 'client_id', 'user_id' ]); |
|
18 |
|
|
19 |
__PACKAGE__->meta->foreign_keys( |
|
20 |
client => { |
|
21 |
class => 'SL::DB::AuthClient', |
|
22 |
key_columns => { client_id => 'id' }, |
|
23 |
}, |
|
24 |
|
|
25 |
user => { |
|
26 |
class => 'SL::DB::AuthUser', |
|
27 |
key_columns => { user_id => 'id' }, |
|
28 |
}, |
|
31 | 29 |
); |
32 | 30 |
|
31 |
# __PACKAGE__->meta->initialize; |
|
32 |
|
|
33 | 33 |
1; |
34 | 34 |
; |
SL/DB/MetaSetup/AuthGroup.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'group', |
|
11 |
schema => 'auth', |
|
9 |
__PACKAGE__->meta->table('group'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
12 | 11 |
|
13 |
columns => [
|
|
14 |
id => { type => 'serial', not_null => 1 },
|
|
15 |
name => { type => 'text', not_null => 1 },
|
|
16 |
description => { type => 'text' },
|
|
17 |
],
|
|
12 |
__PACKAGE__->meta->columns(
|
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
name => { type => 'text', not_null => 1 }, |
|
15 |
description => { type => 'text' }, |
|
16 |
);
|
|
18 | 17 |
|
19 |
primary_key_columns => [ 'id' ],
|
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
|
|
20 | 19 |
|
21 |
unique_key => [ 'name' ], |
|
22 |
); |
|
20 |
__PACKAGE__->meta->unique_keys([ 'name' ]); |
|
21 |
|
|
22 |
# __PACKAGE__->meta->initialize; |
|
23 | 23 |
|
24 | 24 |
1; |
25 | 25 |
; |
SL/DB/MetaSetup/AuthGroupRight.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'group_rights', |
|
11 |
schema => 'auth', |
|
12 |
|
|
13 |
columns => [ |
|
14 |
group_id => { type => 'integer', not_null => 1 }, |
|
15 |
right => { type => 'text', not_null => 1 }, |
|
16 |
granted => { type => 'boolean', not_null => 1 }, |
|
17 |
], |
|
18 |
|
|
19 |
primary_key_columns => [ 'group_id', 'right' ], |
|
20 |
|
|
21 |
foreign_keys => [ |
|
22 |
group => { |
|
23 |
class => 'SL::DB::AuthGroup', |
|
24 |
key_columns => { group_id => 'id' }, |
|
25 |
}, |
|
26 |
], |
|
9 |
__PACKAGE__->meta->table('group_rights'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
11 |
|
|
12 |
__PACKAGE__->meta->columns( |
|
13 |
group_id => { type => 'integer', not_null => 1 }, |
|
14 |
right => { type => 'text', not_null => 1 }, |
|
15 |
granted => { type => 'boolean', not_null => 1 }, |
|
27 | 16 |
); |
28 | 17 |
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'group_id', 'right' ]); |
|
19 |
|
|
20 |
__PACKAGE__->meta->foreign_keys( |
|
21 |
group => { |
|
22 |
class => 'SL::DB::AuthGroup', |
|
23 |
key_columns => { group_id => 'id' }, |
|
24 |
}, |
|
25 |
); |
|
26 |
|
|
27 |
# __PACKAGE__->meta->initialize; |
|
28 |
|
|
29 | 29 |
1; |
30 | 30 |
; |
SL/DB/MetaSetup/AuthUser.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'user', |
|
11 |
schema => 'auth', |
|
9 |
__PACKAGE__->meta->table('user'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
12 | 11 |
|
13 |
columns => [
|
|
14 |
id => { type => 'serial', not_null => 1 },
|
|
15 |
login => { type => 'text', not_null => 1 },
|
|
16 |
password => { type => 'text' },
|
|
17 |
],
|
|
12 |
__PACKAGE__->meta->columns(
|
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
login => { type => 'text', not_null => 1 }, |
|
15 |
password => { type => 'text' }, |
|
16 |
);
|
|
18 | 17 |
|
19 |
primary_key_columns => [ 'id' ],
|
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
|
|
20 | 19 |
|
21 |
unique_key => [ 'login' ], |
|
22 |
); |
|
20 |
__PACKAGE__->meta->unique_keys([ 'login' ]); |
|
21 |
|
|
22 |
# __PACKAGE__->meta->initialize; |
|
23 | 23 |
|
24 | 24 |
1; |
25 | 25 |
; |
SL/DB/MetaSetup/AuthUserConfig.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'user_config', |
|
11 |
schema => 'auth', |
|
12 |
|
|
13 |
columns => [ |
|
14 |
user_id => { type => 'integer', not_null => 1 }, |
|
15 |
cfg_key => { type => 'text', not_null => 1 }, |
|
16 |
cfg_value => { type => 'text' }, |
|
17 |
], |
|
18 |
|
|
19 |
primary_key_columns => [ 'user_id', 'cfg_key' ], |
|
20 |
|
|
21 |
foreign_keys => [ |
|
22 |
user => { |
|
23 |
class => 'SL::DB::AuthUser', |
|
24 |
key_columns => { user_id => 'id' }, |
|
25 |
}, |
|
26 |
], |
|
9 |
__PACKAGE__->meta->table('user_config'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
11 |
|
|
12 |
__PACKAGE__->meta->columns( |
|
13 |
user_id => { type => 'integer', not_null => 1 }, |
|
14 |
cfg_key => { type => 'text', not_null => 1 }, |
|
15 |
cfg_value => { type => 'text' }, |
|
27 | 16 |
); |
28 | 17 |
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'user_id', 'cfg_key' ]); |
|
19 |
|
|
20 |
__PACKAGE__->meta->foreign_keys( |
|
21 |
user => { |
|
22 |
class => 'SL::DB::AuthUser', |
|
23 |
key_columns => { user_id => 'id' }, |
|
24 |
}, |
|
25 |
); |
|
26 |
|
|
27 |
# __PACKAGE__->meta->initialize; |
|
28 |
|
|
29 | 29 |
1; |
30 | 30 |
; |
SL/DB/MetaSetup/AuthUserGroup.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'user_group', |
|
11 |
schema => 'auth', |
|
12 |
|
|
13 |
columns => [ |
|
14 |
user_id => { type => 'integer', not_null => 1 }, |
|
15 |
group_id => { type => 'integer', not_null => 1 }, |
|
16 |
], |
|
17 |
|
|
18 |
primary_key_columns => [ 'user_id', 'group_id' ], |
|
19 |
|
|
20 |
foreign_keys => [ |
|
21 |
group => { |
|
22 |
class => 'SL::DB::AuthGroup', |
|
23 |
key_columns => { group_id => 'id' }, |
|
24 |
}, |
|
25 |
|
|
26 |
user => { |
|
27 |
class => 'SL::DB::AuthUser', |
|
28 |
key_columns => { user_id => 'id' }, |
|
29 |
}, |
|
30 |
], |
|
9 |
__PACKAGE__->meta->table('user_group'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
11 |
|
|
12 |
__PACKAGE__->meta->columns( |
|
13 |
user_id => { type => 'integer', not_null => 1 }, |
|
14 |
group_id => { type => 'integer', not_null => 1 }, |
|
15 |
); |
|
16 |
|
|
17 |
__PACKAGE__->meta->primary_key_columns([ 'user_id', 'group_id' ]); |
|
18 |
|
|
19 |
__PACKAGE__->meta->foreign_keys( |
|
20 |
group => { |
|
21 |
class => 'SL::DB::AuthGroup', |
|
22 |
key_columns => { group_id => 'id' }, |
|
23 |
}, |
|
24 |
|
|
25 |
user => { |
|
26 |
class => 'SL::DB::AuthUser', |
|
27 |
key_columns => { user_id => 'id' }, |
|
28 |
}, |
|
31 | 29 |
); |
32 | 30 |
|
31 |
# __PACKAGE__->meta->initialize; |
|
32 |
|
|
33 | 33 |
1; |
34 | 34 |
; |
SL/DB/MetaSetup/BackgroundJob.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'background_jobs', |
|
9 |
__PACKAGE__->meta->table('background_jobs'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
type => { type => 'varchar', length => 255 }, |
|
15 |
package_name => { type => 'varchar', length => 255 }, |
|
16 |
last_run_at => { type => 'timestamp' }, |
|
17 |
next_run_at => { type => 'timestamp' }, |
|
18 |
data => { type => 'text' }, |
|
19 |
active => { type => 'boolean' }, |
|
20 |
cron_spec => { type => 'varchar', length => 255 }, |
|
21 |
], |
|
22 |
|
|
23 |
primary_key_columns => [ 'id' ], |
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
type => { type => 'varchar', length => 255 }, |
|
14 |
package_name => { type => 'varchar', length => 255 }, |
|
15 |
last_run_at => { type => 'timestamp' }, |
|
16 |
next_run_at => { type => 'timestamp' }, |
|
17 |
data => { type => 'text' }, |
|
18 |
active => { type => 'boolean' }, |
|
19 |
cron_spec => { type => 'varchar', length => 255 }, |
|
24 | 20 |
); |
25 | 21 |
|
22 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
23 |
|
|
24 |
# __PACKAGE__->meta->initialize; |
|
25 |
|
|
26 | 26 |
1; |
27 | 27 |
; |
SL/DB/MetaSetup/BackgroundJobHistory.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'background_job_histories', |
|
9 |
__PACKAGE__->meta->table('background_job_histories'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
package_name => { type => 'varchar', length => 255 }, |
|
15 |
run_at => { type => 'timestamp' }, |
|
16 |
status => { type => 'varchar', length => 255 }, |
|
17 |
result => { type => 'text' }, |
|
18 |
error => { type => 'text', alias => 'error_col' }, |
|
19 |
data => { type => 'text' }, |
|
20 |
], |
|
21 |
|
|
22 |
primary_key_columns => [ 'id' ], |
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
package_name => { type => 'varchar', length => 255 }, |
|
14 |
run_at => { type => 'timestamp' }, |
|
15 |
status => { type => 'varchar', length => 255 }, |
|
16 |
result => { type => 'text' }, |
|
17 |
error => { type => 'text', alias => 'error_col' }, |
|
18 |
data => { type => 'text' }, |
|
23 | 19 |
); |
24 | 20 |
|
21 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
22 |
|
|
23 |
# __PACKAGE__->meta->initialize; |
|
24 |
|
|
25 | 25 |
1; |
26 | 26 |
; |
SL/DB/MetaSetup/BankAccount.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'bank_accounts', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
account_number => { type => 'varchar', length => 100 }, |
|
15 |
bank_code => { type => 'varchar', length => 100 }, |
|
16 |
iban => { type => 'varchar', length => 100 }, |
|
17 |
bic => { type => 'varchar', length => 100 }, |
|
18 |
bank => { type => 'text' }, |
|
19 |
chart_id => { type => 'integer', not_null => 1 }, |
|
20 |
], |
|
21 |
|
|
22 |
primary_key_columns => [ 'id' ], |
|
23 |
|
|
24 |
foreign_keys => [ |
|
25 |
chart => { |
|
26 |
class => 'SL::DB::Chart', |
|
27 |
key_columns => { chart_id => 'id' }, |
|
28 |
}, |
|
29 |
], |
|
9 |
__PACKAGE__->meta->table('bank_accounts'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
account_number => { type => 'varchar', length => 100 }, |
|
14 |
bank_code => { type => 'varchar', length => 100 }, |
|
15 |
iban => { type => 'varchar', length => 100 }, |
|
16 |
bic => { type => 'varchar', length => 100 }, |
|
17 |
bank => { type => 'text' }, |
|
18 |
chart_id => { type => 'integer', not_null => 1 }, |
|
30 | 19 |
); |
31 | 20 |
|
21 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
22 |
|
|
23 |
__PACKAGE__->meta->foreign_keys( |
|
24 |
chart => { |
|
25 |
class => 'SL::DB::Chart', |
|
26 |
key_columns => { chart_id => 'id' }, |
|
27 |
}, |
|
28 |
); |
|
29 |
|
|
30 |
# __PACKAGE__->meta->initialize; |
|
31 |
|
|
32 | 32 |
1; |
33 | 33 |
; |
SL/DB/MetaSetup/Bin.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'bin', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
warehouse_id => { type => 'integer', not_null => 1 }, |
|
15 |
description => { type => 'text' }, |
|
16 |
itime => { type => 'timestamp', default => 'now()' }, |
|
17 |
mtime => { type => 'timestamp' }, |
|
18 |
], |
|
19 |
|
|
20 |
primary_key_columns => [ 'id' ], |
|
21 |
|
|
22 |
allow_inline_column_values => 1, |
|
23 |
|
|
24 |
foreign_keys => [ |
|
25 |
warehouse => { |
|
26 |
class => 'SL::DB::Warehouse', |
|
27 |
key_columns => { warehouse_id => 'id' }, |
|
28 |
}, |
|
29 |
], |
|
9 |
__PACKAGE__->meta->table('bin'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
warehouse_id => { type => 'integer', not_null => 1 }, |
|
14 |
description => { type => 'text' }, |
|
15 |
itime => { type => 'timestamp', default => 'now()' }, |
|
16 |
mtime => { type => 'timestamp' }, |
|
30 | 17 |
); |
31 | 18 |
|
19 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
20 |
|
|
21 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
22 |
|
|
23 |
__PACKAGE__->meta->foreign_keys( |
|
24 |
warehouse => { |
|
25 |
class => 'SL::DB::Warehouse', |
|
26 |
key_columns => { warehouse_id => 'id' }, |
|
27 |
}, |
|
28 |
); |
|
29 |
|
|
30 |
# __PACKAGE__->meta->initialize; |
|
31 |
|
|
32 | 32 |
1; |
33 | 33 |
; |
SL/DB/MetaSetup/Buchungsgruppe.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'buchungsgruppen', |
|
9 |
__PACKAGE__->meta->table('buchungsgruppen'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
description => { type => 'text' }, |
|
15 |
inventory_accno_id => { type => 'integer' }, |
|
16 |
income_accno_id_0 => { type => 'integer' }, |
|
17 |
expense_accno_id_0 => { type => 'integer' }, |
|
18 |
income_accno_id_1 => { type => 'integer' }, |
|
19 |
expense_accno_id_1 => { type => 'integer' }, |
|
20 |
income_accno_id_2 => { type => 'integer' }, |
|
21 |
expense_accno_id_2 => { type => 'integer' }, |
|
22 |
income_accno_id_3 => { type => 'integer' }, |
|
23 |
expense_accno_id_3 => { type => 'integer' }, |
|
24 |
sortkey => { type => 'integer', not_null => 1 }, |
|
25 |
], |
|
26 |
|
|
27 |
primary_key_columns => [ 'id' ], |
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
description => { type => 'text' }, |
|
14 |
inventory_accno_id => { type => 'integer' }, |
|
15 |
income_accno_id_0 => { type => 'integer' }, |
|
16 |
expense_accno_id_0 => { type => 'integer' }, |
|
17 |
income_accno_id_1 => { type => 'integer' }, |
|
18 |
expense_accno_id_1 => { type => 'integer' }, |
|
19 |
income_accno_id_2 => { type => 'integer' }, |
|
20 |
expense_accno_id_2 => { type => 'integer' }, |
|
21 |
income_accno_id_3 => { type => 'integer' }, |
|
22 |
expense_accno_id_3 => { type => 'integer' }, |
|
23 |
sortkey => { type => 'integer', not_null => 1 }, |
|
28 | 24 |
); |
29 | 25 |
|
26 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
27 |
|
|
28 |
# __PACKAGE__->meta->initialize; |
|
29 |
|
|
30 | 30 |
1; |
31 | 31 |
; |
SL/DB/MetaSetup/Business.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'business', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
description => { type => 'text' }, |
|
15 |
discount => { type => 'float', precision => 4 }, |
|
16 |
customernumberinit => { type => 'text' }, |
|
17 |
salesman => { type => 'boolean', default => 'false' }, |
|
18 |
itime => { type => 'timestamp', default => 'now()' }, |
|
19 |
mtime => { type => 'timestamp' }, |
|
20 |
], |
|
21 |
|
|
22 |
primary_key_columns => [ 'id' ], |
|
23 |
|
|
24 |
allow_inline_column_values => 1, |
|
9 |
__PACKAGE__->meta->table('business'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
description => { type => 'text' }, |
|
14 |
discount => { type => 'float', precision => 4 }, |
|
15 |
customernumberinit => { type => 'text' }, |
|
16 |
salesman => { type => 'boolean', default => 'false' }, |
|
17 |
itime => { type => 'timestamp', default => 'now()' }, |
|
18 |
mtime => { type => 'timestamp' }, |
|
25 | 19 |
); |
26 | 20 |
|
21 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
22 |
|
|
23 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
24 |
|
|
25 |
# __PACKAGE__->meta->initialize; |
|
26 |
|
|
27 | 27 |
1; |
28 | 28 |
; |
SL/DB/MetaSetup/Chart.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'chart', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
accno => { type => 'text', not_null => 1 }, |
|
15 |
description => { type => 'text' }, |
|
16 |
charttype => { type => 'character', default => 'A', length => 1 }, |
|
17 |
category => { type => 'character', length => 1 }, |
|
18 |
link => { type => 'text', not_null => 1 }, |
|
19 |
taxkey_id => { type => 'integer' }, |
|
20 |
pos_bwa => { type => 'integer' }, |
|
21 |
pos_bilanz => { type => 'integer' }, |
|
22 |
pos_eur => { type => 'integer' }, |
|
23 |
datevautomatik => { type => 'boolean', default => 'false' }, |
|
24 |
itime => { type => 'timestamp', default => 'now()' }, |
|
25 |
mtime => { type => 'timestamp' }, |
|
26 |
new_chart_id => { type => 'integer' }, |
|
27 |
valid_from => { type => 'date' }, |
|
28 |
], |
|
29 |
|
|
30 |
primary_key_columns => [ 'id' ], |
|
31 |
|
|
32 |
unique_key => [ 'accno' ], |
|
33 |
|
|
34 |
allow_inline_column_values => 1, |
|
9 |
__PACKAGE__->meta->table('chart'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
accno => { type => 'text', not_null => 1 }, |
|
14 |
description => { type => 'text' }, |
|
15 |
charttype => { type => 'character', default => 'A', length => 1 }, |
|
16 |
category => { type => 'character', length => 1 }, |
|
17 |
link => { type => 'text', not_null => 1 }, |
|
18 |
taxkey_id => { type => 'integer' }, |
|
19 |
pos_bwa => { type => 'integer' }, |
|
20 |
pos_bilanz => { type => 'integer' }, |
|
21 |
pos_eur => { type => 'integer' }, |
|
22 |
datevautomatik => { type => 'boolean', default => 'false' }, |
|
23 |
itime => { type => 'timestamp', default => 'now()' }, |
|
24 |
mtime => { type => 'timestamp' }, |
|
25 |
new_chart_id => { type => 'integer' }, |
|
26 |
valid_from => { type => 'date' }, |
|
35 | 27 |
); |
36 | 28 |
|
29 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
30 |
|
|
31 |
__PACKAGE__->meta->unique_keys([ 'accno' ]); |
|
32 |
|
|
33 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
34 |
|
|
35 |
# __PACKAGE__->meta->initialize; |
|
36 |
|
|
37 | 37 |
1; |
38 | 38 |
; |
SL/DB/MetaSetup/Contact.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'contacts', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
cp_id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
cp_cv_id => { type => 'integer' }, |
|
15 |
cp_title => { type => 'varchar', length => 75 }, |
|
16 |
cp_givenname => { type => 'varchar', length => 75 }, |
|
17 |
cp_name => { type => 'varchar', length => 75 }, |
|
18 |
cp_email => { type => 'text' }, |
|
19 |
cp_phone1 => { type => 'varchar', length => 75 }, |
|
20 |
cp_phone2 => { type => 'varchar', length => 75 }, |
|
21 |
itime => { type => 'timestamp', default => 'now()' }, |
|
22 |
mtime => { type => 'timestamp' }, |
|
23 |
cp_fax => { type => 'text' }, |
|
24 |
cp_mobile1 => { type => 'text' }, |
|
25 |
cp_mobile2 => { type => 'text' }, |
|
26 |
cp_satphone => { type => 'text' }, |
|
27 |
cp_satfax => { type => 'text' }, |
|
28 |
cp_project => { type => 'text' }, |
|
29 |
cp_privatphone => { type => 'text' }, |
|
30 |
cp_privatemail => { type => 'text' }, |
|
31 |
cp_abteilung => { type => 'text' }, |
|
32 |
cp_gender => { type => 'character', length => 1 }, |
|
33 |
cp_street => { type => 'text' }, |
|
34 |
cp_zipcode => { type => 'text' }, |
|
35 |
cp_city => { type => 'text' }, |
|
36 |
cp_birthday => { type => 'date' }, |
|
37 |
cp_position => { type => 'varchar', length => 75 }, |
|
38 |
], |
|
39 |
|
|
40 |
primary_key_columns => [ 'cp_id' ], |
|
41 |
|
|
42 |
allow_inline_column_values => 1, |
|
9 |
__PACKAGE__->meta->table('contacts'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
cp_id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
cp_cv_id => { type => 'integer' }, |
|
14 |
cp_title => { type => 'varchar', length => 75 }, |
|
15 |
cp_givenname => { type => 'varchar', length => 75 }, |
|
16 |
cp_name => { type => 'varchar', length => 75 }, |
|
17 |
cp_email => { type => 'text' }, |
|
18 |
cp_phone1 => { type => 'varchar', length => 75 }, |
|
19 |
cp_phone2 => { type => 'varchar', length => 75 }, |
|
20 |
itime => { type => 'timestamp', default => 'now()' }, |
|
21 |
mtime => { type => 'timestamp' }, |
|
22 |
cp_fax => { type => 'text' }, |
|
23 |
cp_mobile1 => { type => 'text' }, |
|
24 |
cp_mobile2 => { type => 'text' }, |
|
25 |
cp_satphone => { type => 'text' }, |
|
26 |
cp_satfax => { type => 'text' }, |
|
27 |
cp_project => { type => 'text' }, |
|
28 |
cp_privatphone => { type => 'text' }, |
|
29 |
cp_privatemail => { type => 'text' }, |
|
30 |
cp_abteilung => { type => 'text' }, |
|
31 |
cp_gender => { type => 'character', length => 1 }, |
|
32 |
cp_street => { type => 'text' }, |
|
33 |
cp_zipcode => { type => 'text' }, |
|
34 |
cp_city => { type => 'text' }, |
|
35 |
cp_birthday => { type => 'date' }, |
|
36 |
cp_position => { type => 'varchar', length => 75 }, |
|
43 | 37 |
); |
44 | 38 |
|
39 |
__PACKAGE__->meta->primary_key_columns([ 'cp_id' ]); |
|
40 |
|
|
41 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
42 |
|
|
43 |
# __PACKAGE__->meta->initialize; |
|
44 |
|
|
45 | 45 |
1; |
46 | 46 |
; |
SL/DB/MetaSetup/CsvImportProfile.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'csv_import_profiles', |
|
9 |
__PACKAGE__->meta->table('csv_import_profiles'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
name => { type => 'text', not_null => 1 }, |
|
15 |
type => { type => 'varchar', length => 20, not_null => 1 }, |
|
16 |
is_default => { type => 'boolean', default => 'false' }, |
|
17 |
login => { type => 'text' }, |
|
18 |
], |
|
19 |
|
|
20 |
primary_key_columns => [ 'id' ], |
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
name => { type => 'text', not_null => 1 }, |
|
14 |
type => { type => 'varchar', length => 20, not_null => 1 }, |
|
15 |
is_default => { type => 'boolean', default => 'false' }, |
|
16 |
login => { type => 'text' }, |
|
21 | 17 |
); |
22 | 18 |
|
19 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
20 |
|
|
21 |
# __PACKAGE__->meta->initialize; |
|
22 |
|
|
23 | 23 |
1; |
24 | 24 |
; |
SL/DB/MetaSetup/CsvImportProfileSetting.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'csv_import_profile_settings', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
csv_import_profile_id => { type => 'integer', not_null => 1 }, |
|
15 |
key => { type => 'text', not_null => 1 }, |
|
16 |
value => { type => 'text' }, |
|
17 |
], |
|
18 |
|
|
19 |
primary_key_columns => [ 'id' ], |
|
20 |
|
|
21 |
unique_key => [ 'csv_import_profile_id', 'key' ], |
|
22 |
|
|
23 |
foreign_keys => [ |
|
24 |
csv_import_profile => { |
|
25 |
class => 'SL::DB::CsvImportProfile', |
|
26 |
key_columns => { csv_import_profile_id => 'id' }, |
|
27 |
}, |
|
28 |
], |
|
9 |
__PACKAGE__->meta->table('csv_import_profile_settings'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
csv_import_profile_id => { type => 'integer', not_null => 1 }, |
|
14 |
key => { type => 'text', not_null => 1 }, |
|
15 |
value => { type => 'text' }, |
|
16 |
); |
|
17 |
|
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
19 |
|
|
20 |
__PACKAGE__->meta->unique_keys([ 'csv_import_profile_id', 'key' ]); |
|
21 |
|
|
22 |
__PACKAGE__->meta->foreign_keys( |
|
23 |
csv_import_profile => { |
|
24 |
class => 'SL::DB::CsvImportProfile', |
|
25 |
key_columns => { csv_import_profile_id => 'id' }, |
|
26 |
}, |
|
29 | 27 |
); |
30 | 28 |
|
29 |
# __PACKAGE__->meta->initialize; |
|
30 |
|
|
31 | 31 |
1; |
32 | 32 |
; |
SL/DB/MetaSetup/CsvImportReport.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'csv_import_reports', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
session_id => { type => 'text', not_null => 1 }, |
|
15 |
profile_id => { type => 'integer', not_null => 1 }, |
|
16 |
type => { type => 'text', not_null => 1 }, |
|
17 |
file => { type => 'text', not_null => 1 }, |
|
18 |
numrows => { type => 'integer' }, |
|
19 |
], |
|
20 |
|
|
21 |
primary_key_columns => [ 'id' ], |
|
22 |
|
|
23 |
foreign_keys => [ |
|
24 |
profile => { |
|
25 |
class => 'SL::DB::CsvImportProfile', |
|
26 |
key_columns => { profile_id => 'id' }, |
|
27 |
}, |
|
28 |
], |
|
9 |
__PACKAGE__->meta->table('csv_import_reports'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
session_id => { type => 'text', not_null => 1 }, |
|
14 |
profile_id => { type => 'integer', not_null => 1 }, |
|
15 |
type => { type => 'text', not_null => 1 }, |
|
16 |
file => { type => 'text', not_null => 1 }, |
|
17 |
numrows => { type => 'integer' }, |
|
29 | 18 |
); |
30 | 19 |
|
20 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
21 |
|
|
22 |
__PACKAGE__->meta->foreign_keys( |
|
23 |
profile => { |
|
24 |
class => 'SL::DB::CsvImportProfile', |
|
25 |
key_columns => { profile_id => 'id' }, |
|
26 |
}, |
|
27 |
); |
|
28 |
|
|
29 |
# __PACKAGE__->meta->initialize; |
|
30 |
|
|
31 | 31 |
1; |
32 | 32 |
; |
SL/DB/MetaSetup/CsvImportReportRow.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'csv_import_report_rows', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
csv_import_report_id => { type => 'integer', not_null => 1 }, |
|
15 |
col => { type => 'integer', not_null => 1 }, |
|
16 |
row => { type => 'integer', not_null => 1 }, |
|
17 |
value => { type => 'text' }, |
|
18 |
], |
|
19 |
|
|
20 |
primary_key_columns => [ 'id' ], |
|
21 |
|
|
22 |
foreign_keys => [ |
|
23 |
csv_import_report => { |
|
24 |
class => 'SL::DB::CsvImportReport', |
|
25 |
key_columns => { csv_import_report_id => 'id' }, |
|
26 |
}, |
|
27 |
], |
|
9 |
__PACKAGE__->meta->table('csv_import_report_rows'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
csv_import_report_id => { type => 'integer', not_null => 1 }, |
|
14 |
col => { type => 'integer', not_null => 1 }, |
|
15 |
row => { type => 'integer', not_null => 1 }, |
|
16 |
value => { type => 'text' }, |
|
28 | 17 |
); |
29 | 18 |
|
19 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
20 |
|
|
21 |
__PACKAGE__->meta->foreign_keys( |
|
22 |
csv_import_report => { |
|
23 |
class => 'SL::DB::CsvImportReport', |
|
24 |
key_columns => { csv_import_report_id => 'id' }, |
|
25 |
}, |
|
26 |
); |
|
27 |
|
|
28 |
# __PACKAGE__->meta->initialize; |
|
29 |
|
|
30 | 30 |
1; |
31 | 31 |
; |
SL/DB/MetaSetup/CsvImportReportStatus.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'csv_import_report_status', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
csv_import_report_id => { type => 'integer', not_null => 1 }, |
|
15 |
row => { type => 'integer', not_null => 1 }, |
|
16 |
type => { type => 'text', not_null => 1 }, |
|
17 |
value => { type => 'text' }, |
|
18 |
], |
|
19 |
|
|
20 |
primary_key_columns => [ 'id' ], |
|
21 |
|
|
22 |
foreign_keys => [ |
|
23 |
csv_import_report => { |
|
24 |
class => 'SL::DB::CsvImportReport', |
|
25 |
key_columns => { csv_import_report_id => 'id' }, |
|
26 |
}, |
|
27 |
], |
|
9 |
__PACKAGE__->meta->table('csv_import_report_status'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
csv_import_report_id => { type => 'integer', not_null => 1 }, |
|
14 |
row => { type => 'integer', not_null => 1 }, |
|
15 |
type => { type => 'text', not_null => 1 }, |
|
16 |
value => { type => 'text' }, |
|
28 | 17 |
); |
29 | 18 |
|
19 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
20 |
|
|
21 |
__PACKAGE__->meta->foreign_keys( |
|
22 |
csv_import_report => { |
|
23 |
class => 'SL::DB::CsvImportReport', |
|
24 |
key_columns => { csv_import_report_id => 'id' }, |
|
25 |
}, |
|
26 |
); |
|
27 |
|
|
28 |
# __PACKAGE__->meta->initialize; |
|
29 |
|
|
30 | 30 |
1; |
31 | 31 |
; |
SL/DB/MetaSetup/Currency.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'currencies', |
|
9 |
__PACKAGE__->meta->table('currencies'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
id => { type => 'serial', not_null => 1 }, |
|
14 |
name => { type => 'text', not_null => 1 }, |
|
15 |
], |
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'serial', not_null => 1 }, |
|
13 |
name => { type => 'text', not_null => 1 }, |
|
14 |
); |
|
15 |
|
|
16 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
16 | 17 |
|
17 |
primary_key_columns => [ 'id' ],
|
|
18 |
__PACKAGE__->meta->unique_keys([ 'name' ]);
|
|
18 | 19 |
|
19 |
unique_key => [ 'name' ], |
|
20 |
__PACKAGE__->meta->relationships( |
|
21 |
ap => { |
|
22 |
class => 'SL::DB::PurchaseInvoice', |
|
23 |
column_map => { id => 'currency_id' }, |
|
24 |
type => 'one to many', |
|
25 |
}, |
|
26 |
|
|
27 |
ar => { |
|
28 |
class => 'SL::DB::Invoice', |
|
29 |
column_map => { id => 'currency_id' }, |
|
30 |
type => 'one to many', |
|
31 |
}, |
|
20 | 32 |
); |
21 | 33 |
|
34 |
# __PACKAGE__->meta->initialize; |
|
35 |
|
|
22 | 36 |
1; |
23 | 37 |
; |
SL/DB/MetaSetup/CustomVariable.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'custom_variables', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' }, |
|
14 |
config_id => { type => 'integer', not_null => 1 }, |
|
15 |
trans_id => { type => 'integer', not_null => 1 }, |
|
16 |
bool_value => { type => 'boolean' }, |
|
17 |
timestamp_value => { type => 'timestamp' }, |
|
18 |
text_value => { type => 'text' }, |
|
19 |
number_value => { type => 'numeric', precision => 5, scale => 25 }, |
|
20 |
itime => { type => 'timestamp', default => 'now()' }, |
|
21 |
mtime => { type => 'timestamp' }, |
|
22 |
sub_module => { type => 'text', default => '', not_null => 1 }, |
|
23 |
], |
|
24 |
|
|
25 |
primary_key_columns => [ 'id' ], |
|
26 |
|
|
27 |
allow_inline_column_values => 1, |
|
28 |
|
|
29 |
foreign_keys => [ |
|
30 |
config => { |
|
31 |
class => 'SL::DB::CustomVariableConfig', |
|
32 |
key_columns => { config_id => 'id' }, |
|
33 |
}, |
|
34 |
], |
|
9 |
__PACKAGE__->meta->table('custom_variables'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' }, |
|
13 |
config_id => { type => 'integer', not_null => 1 }, |
|
14 |
trans_id => { type => 'integer', not_null => 1 }, |
|
15 |
bool_value => { type => 'boolean' }, |
|
16 |
timestamp_value => { type => 'timestamp' }, |
|
17 |
text_value => { type => 'text' }, |
|
18 |
number_value => { type => 'numeric', precision => 5, scale => 25 }, |
|
19 |
itime => { type => 'timestamp', default => 'now()' }, |
|
20 |
mtime => { type => 'timestamp' }, |
|
21 |
sub_module => { type => 'text', default => '', not_null => 1 }, |
|
35 | 22 |
); |
36 | 23 |
|
24 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
25 |
|
|
26 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
27 |
|
|
28 |
__PACKAGE__->meta->foreign_keys( |
|
29 |
config => { |
|
30 |
class => 'SL::DB::CustomVariableConfig', |
|
31 |
key_columns => { config_id => 'id' }, |
|
32 |
}, |
|
33 |
); |
|
34 |
|
|
35 |
# __PACKAGE__->meta->initialize; |
|
36 |
|
|
37 | 37 |
1; |
38 | 38 |
; |
SL/DB/MetaSetup/CustomVariableConfig.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'custom_variable_configs', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'custom_variable_configs_id' }, |
|
14 |
name => { type => 'text', not_null => 1 }, |
|
15 |
description => { type => 'text', not_null => 1 }, |
|
16 |
type => { type => 'text', not_null => 1 }, |
|
17 |
module => { type => 'text', not_null => 1 }, |
|
18 |
default_value => { type => 'text' }, |
|
19 |
options => { type => 'text' }, |
|
20 |
searchable => { type => 'boolean', not_null => 1 }, |
|
21 |
includeable => { type => 'boolean', not_null => 1 }, |
|
22 |
included_by_default => { type => 'boolean', not_null => 1 }, |
|
23 |
sortkey => { type => 'integer', not_null => 1 }, |
|
24 |
itime => { type => 'timestamp', default => 'now()' }, |
|
25 |
mtime => { type => 'timestamp' }, |
|
26 |
flags => { type => 'text' }, |
|
27 |
], |
|
28 |
|
|
29 |
primary_key_columns => [ 'id' ], |
|
30 |
|
|
31 |
allow_inline_column_values => 1, |
|
9 |
__PACKAGE__->meta->table('custom_variable_configs'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'custom_variable_configs_id' }, |
|
13 |
name => { type => 'text', not_null => 1 }, |
|
14 |
description => { type => 'text', not_null => 1 }, |
|
15 |
type => { type => 'text', not_null => 1 }, |
|
16 |
module => { type => 'text', not_null => 1 }, |
|
17 |
default_value => { type => 'text' }, |
|
18 |
options => { type => 'text' }, |
|
19 |
searchable => { type => 'boolean', not_null => 1 }, |
|
20 |
includeable => { type => 'boolean', not_null => 1 }, |
|
21 |
included_by_default => { type => 'boolean', not_null => 1 }, |
|
22 |
sortkey => { type => 'integer', not_null => 1 }, |
|
23 |
itime => { type => 'timestamp', default => 'now()' }, |
|
24 |
mtime => { type => 'timestamp' }, |
|
25 |
flags => { type => 'text' }, |
|
32 | 26 |
); |
33 | 27 |
|
28 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
29 |
|
|
30 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
31 |
|
|
32 |
# __PACKAGE__->meta->initialize; |
|
33 |
|
|
34 | 34 |
1; |
35 | 35 |
; |
SL/DB/MetaSetup/CustomVariableValidity.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'custom_variables_validity', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
config_id => { type => 'integer', not_null => 1 }, |
|
15 |
trans_id => { type => 'integer', not_null => 1 }, |
|
16 |
itime => { type => 'timestamp', default => 'now()' }, |
|
17 |
], |
|
18 |
|
|
19 |
primary_key_columns => [ 'id' ], |
|
20 |
|
|
21 |
allow_inline_column_values => 1, |
|
22 |
|
|
23 |
foreign_keys => [ |
|
24 |
config => { |
|
25 |
class => 'SL::DB::CustomVariableConfig', |
|
26 |
key_columns => { config_id => 'id' }, |
|
27 |
}, |
|
28 |
], |
|
9 |
__PACKAGE__->meta->table('custom_variables_validity'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
config_id => { type => 'integer', not_null => 1 }, |
|
14 |
trans_id => { type => 'integer', not_null => 1 }, |
|
15 |
itime => { type => 'timestamp', default => 'now()' }, |
|
16 |
); |
|
17 |
|
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
19 |
|
|
20 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
21 |
|
|
22 |
__PACKAGE__->meta->foreign_keys( |
|
23 |
config => { |
|
24 |
class => 'SL::DB::CustomVariableConfig', |
|
25 |
key_columns => { config_id => 'id' }, |
|
26 |
}, |
|
29 | 27 |
); |
30 | 28 |
|
29 |
# __PACKAGE__->meta->initialize; |
|
30 |
|
|
31 | 31 |
1; |
32 | 32 |
; |
SL/DB/MetaSetup/Customer.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'customer', |
|
9 |
__PACKAGE__->meta->table('customer'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
name => { type => 'text', not_null => 1 }, |
|
15 |
department_1 => { type => 'varchar', length => 75 }, |
|
16 |
department_2 => { type => 'varchar', length => 75 }, |
|
17 |
street => { type => 'varchar', length => 75 }, |
|
18 |
zipcode => { type => 'varchar', length => 10 }, |
|
19 |
city => { type => 'varchar', length => 75 }, |
|
20 |
country => { type => 'varchar', length => 75 }, |
|
21 |
contact => { type => 'text' }, |
|
22 |
phone => { type => 'text' }, |
|
23 |
fax => { type => 'varchar', length => 30 }, |
|
24 |
homepage => { type => 'text' }, |
|
25 |
email => { type => 'text' }, |
|
26 |
notes => { type => 'text' }, |
|
27 |
discount => { type => 'float', precision => 4 }, |
|
28 |
taxincluded => { type => 'boolean' }, |
|
29 |
creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 }, |
|
30 |
terms => { type => 'integer', default => '0' }, |
|
31 |
customernumber => { type => 'text' }, |
|
32 |
cc => { type => 'text' }, |
|
33 |
bcc => { type => 'text' }, |
|
34 |
business_id => { type => 'integer' }, |
|
35 |
taxnumber => { type => 'text' }, |
|
36 |
account_number => { type => 'text' }, |
Auch abrufbar als: Unified diff
MetaSetup neu generiert