Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / SL / DB / MetaSetup / ShopPart.pm
1 # This file has been auto-generated. Do not modify it; it will be overwritten
2 # by rose_auto_create_model.pl automatically.
3 package SL::DB::ShopPart;
4
5 use strict;
6
7 use parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('shop_parts');
10
11 __PACKAGE__->meta->columns(
12   active              => { type => 'boolean', default => 'false', not_null => 1 },
13   active_price_source => { type => 'text' },
14   front_page          => { type => 'boolean', default => 'false', not_null => 1 },
15   id                  => { type => 'serial', not_null => 1 },
16   itime               => { type => 'timestamp', default => 'now()' },
17   last_update         => { type => 'timestamp' },
18   metatag_description => { type => 'text' },
19   metatag_keywords    => { type => 'text' },
20   metatag_title       => { type => 'text' },
21   mtime               => { type => 'timestamp' },
22   part_id             => { type => 'integer', not_null => 1 },
23   shop_category       => { type => 'array' },
24   shop_description    => { type => 'text' },
25   shop_id             => { type => 'integer', not_null => 1 },
26   show_date           => { type => 'date' },
27   sortorder           => { type => 'integer' },
28 );
29
30 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
31
32 __PACKAGE__->meta->unique_keys([ 'shop_id', 'part_id' ]);
33
34 __PACKAGE__->meta->allow_inline_column_values(1);
35
36 __PACKAGE__->meta->foreign_keys(
37   part => {
38     class       => 'SL::DB::Part',
39     key_columns => { part_id => 'id' },
40   },
41
42   shop => {
43     class       => 'SL::DB::Shop',
44     key_columns => { shop_id => 'id' },
45   },
46 );
47
48 1;
49 ;