7528869cdfc89c6a46da83bdfc5c22eb4d3eca9d
[koha_fer] / 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 timestamp
40
41   data_type: 'timestamp'
42   datetime_undef_if_invalid: 1
43   default_value: current_timestamp
44   is_nullable: 0
45
46 =head2 rate
47
48   data_type: 'float'
49   is_nullable: 1
50   size: [15,5]
51
52 =head2 active
53
54   data_type: 'tinyint'
55   is_nullable: 1
56
57 =cut
58
59 __PACKAGE__->add_columns(
60   "currency",
61   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
62   "symbol",
63   { data_type => "varchar", is_nullable => 1, size => 5 },
64   "timestamp",
65   {
66     data_type => "timestamp",
67     datetime_undef_if_invalid => 1,
68     default_value => \"current_timestamp",
69     is_nullable => 0,
70   },
71   "rate",
72   { data_type => "float", is_nullable => 1, size => [15, 5] },
73   "active",
74   { data_type => "tinyint", is_nullable => 1 },
75 );
76
77 =head1 PRIMARY KEY
78
79 =over 4
80
81 =item * L</currency>
82
83 =back
84
85 =cut
86
87 __PACKAGE__->set_primary_key("currency");
88
89 =head1 RELATIONS
90
91 =head2 aqbooksellers_invoiceprices
92
93 Type: has_many
94
95 Related object: L<Koha::Schema::Result::Aqbookseller>
96
97 =cut
98
99 __PACKAGE__->has_many(
100   "aqbooksellers_invoiceprices",
101   "Koha::Schema::Result::Aqbookseller",
102   { "foreign.invoiceprice" => "self.currency" },
103   { cascade_copy => 0, cascade_delete => 0 },
104 );
105
106 =head2 aqbooksellers_listprices
107
108 Type: has_many
109
110 Related object: L<Koha::Schema::Result::Aqbookseller>
111
112 =cut
113
114 __PACKAGE__->has_many(
115   "aqbooksellers_listprices",
116   "Koha::Schema::Result::Aqbookseller",
117   { "foreign.listprice" => "self.currency" },
118   { cascade_copy => 0, cascade_delete => 0 },
119 );
120
121
122 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
123 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1fpLJHtP0bseXVfytxii5Q
124
125
126 # You can replace this text with custom content, and it will be preserved on regeneration
127 1;