Bug 15084: DBIx::Class - Shema changes
[koha.git] / Koha / Schema / Result / Currency.pm
1 use utf8;
2 package Koha::Schema::Result::Currency;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::Currency
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<currency>
19
20 =cut
21
22 __PACKAGE__->table("currency");
23
24 =head1 ACCESSORS
25
26 =head2 currency
27
28   data_type: 'varchar'
29   default_value: (empty string)
30   is_nullable: 0
31   size: 10
32
33 =head2 symbol
34
35   data_type: 'varchar'
36   is_nullable: 1
37   size: 5
38
39 =head2 isocode
40
41   data_type: 'varchar'
42   is_nullable: 1
43   size: 5
44
45 =head2 timestamp
46
47   data_type: 'timestamp'
48   datetime_undef_if_invalid: 1
49   default_value: current_timestamp
50   is_nullable: 0
51
52 =head2 rate
53
54   data_type: 'float'
55   is_nullable: 1
56   size: [15,5]
57
58 =head2 active
59
60   data_type: 'tinyint'
61   is_nullable: 1
62
63 =head2 archived
64
65   data_type: 'tinyint'
66   default_value: 0
67   is_nullable: 1
68
69 =cut
70
71 __PACKAGE__->add_columns(
72   "currency",
73   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
74   "symbol",
75   { data_type => "varchar", is_nullable => 1, size => 5 },
76   "isocode",
77   { data_type => "varchar", is_nullable => 1, size => 5 },
78   "timestamp",
79   {
80     data_type => "timestamp",
81     datetime_undef_if_invalid => 1,
82     default_value => \"current_timestamp",
83     is_nullable => 0,
84   },
85   "rate",
86   { data_type => "float", is_nullable => 1, size => [15, 5] },
87   "active",
88   { data_type => "tinyint", is_nullable => 1 },
89   "archived",
90   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
91 );
92
93 =head1 PRIMARY KEY
94
95 =over 4
96
97 =item * L</currency>
98
99 =back
100
101 =cut
102
103 __PACKAGE__->set_primary_key("currency");
104
105 =head1 RELATIONS
106
107 =head2 aqbooksellers_invoiceprices
108
109 Type: has_many
110
111 Related object: L<Koha::Schema::Result::Aqbookseller>
112
113 =cut
114
115 __PACKAGE__->has_many(
116   "aqbooksellers_invoiceprices",
117   "Koha::Schema::Result::Aqbookseller",
118   { "foreign.invoiceprice" => "self.currency" },
119   { cascade_copy => 0, cascade_delete => 0 },
120 );
121
122 =head2 aqbooksellers_listprices
123
124 Type: has_many
125
126 Related object: L<Koha::Schema::Result::Aqbookseller>
127
128 =cut
129
130 __PACKAGE__->has_many(
131   "aqbooksellers_listprices",
132   "Koha::Schema::Result::Aqbookseller",
133   { "foreign.listprice" => "self.currency" },
134   { cascade_copy => 0, cascade_delete => 0 },
135 );
136
137 =head2 aqorders
138
139 Type: has_many
140
141 Related object: L<Koha::Schema::Result::Aqorder>
142
143 =cut
144
145 __PACKAGE__->has_many(
146   "aqorders",
147   "Koha::Schema::Result::Aqorder",
148   { "foreign.currency" => "self.currency" },
149   { cascade_copy => 0, cascade_delete => 0 },
150 );
151
152
153 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-12-17 10:57:24
154 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B9JY/pDkp8icT7m0xDDKAA
155
156
157 # You can replace this text with custom content, and it will be preserved on regeneration
158 1;