Bug 23152: Implement koha_object[s]_class when needed
[koha-equinox.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 =head2 p_sep_by_space
70
71   data_type: 'tinyint'
72   default_value: 0
73   is_nullable: 1
74
75 =cut
76
77 __PACKAGE__->add_columns(
78   "currency",
79   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
80   "symbol",
81   { data_type => "varchar", is_nullable => 1, size => 5 },
82   "isocode",
83   { data_type => "varchar", is_nullable => 1, size => 5 },
84   "timestamp",
85   {
86     data_type => "timestamp",
87     datetime_undef_if_invalid => 1,
88     default_value => \"current_timestamp",
89     is_nullable => 0,
90   },
91   "rate",
92   { data_type => "float", is_nullable => 1, size => [15, 5] },
93   "active",
94   { data_type => "tinyint", is_nullable => 1 },
95   "archived",
96   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
97   "p_sep_by_space",
98   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
99 );
100
101 =head1 PRIMARY KEY
102
103 =over 4
104
105 =item * L</currency>
106
107 =back
108
109 =cut
110
111 __PACKAGE__->set_primary_key("currency");
112
113 =head1 RELATIONS
114
115 =head2 aqbooksellers_invoiceprices
116
117 Type: has_many
118
119 Related object: L<Koha::Schema::Result::Aqbookseller>
120
121 =cut
122
123 __PACKAGE__->has_many(
124   "aqbooksellers_invoiceprices",
125   "Koha::Schema::Result::Aqbookseller",
126   { "foreign.invoiceprice" => "self.currency" },
127   { cascade_copy => 0, cascade_delete => 0 },
128 );
129
130 =head2 aqbooksellers_listprices
131
132 Type: has_many
133
134 Related object: L<Koha::Schema::Result::Aqbookseller>
135
136 =cut
137
138 __PACKAGE__->has_many(
139   "aqbooksellers_listprices",
140   "Koha::Schema::Result::Aqbookseller",
141   { "foreign.listprice" => "self.currency" },
142   { cascade_copy => 0, cascade_delete => 0 },
143 );
144
145 =head2 aqorders
146
147 Type: has_many
148
149 Related object: L<Koha::Schema::Result::Aqorder>
150
151 =cut
152
153 __PACKAGE__->has_many(
154   "aqorders",
155   "Koha::Schema::Result::Aqorder",
156   { "foreign.currency" => "self.currency" },
157   { cascade_copy => 0, cascade_delete => 0 },
158 );
159
160
161 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-01 14:23:58
162 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PnJEcCgrM1Edf99phWFdyQ
163
164
165 sub koha_object_class {
166     'Koha::Acquisition::Currency';
167 }
168 sub koha_objects_class {
169     'Koha::Acquisition::Currencies';
170 }
171
172 1;