Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / Currency.pm
1 package Koha::Schema::Result::Currency;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Currency
15
16 =cut
17
18 __PACKAGE__->table("currency");
19
20 =head1 ACCESSORS
21
22 =head2 currency
23
24   data_type: 'varchar'
25   default_value: (empty string)
26   is_nullable: 0
27   size: 10
28
29 =head2 symbol
30
31   data_type: 'varchar'
32   is_nullable: 1
33   size: 5
34
35 =head2 timestamp
36
37   data_type: 'timestamp'
38   default_value: current_timestamp
39   is_nullable: 0
40
41 =head2 rate
42
43   data_type: 'float'
44   is_nullable: 1
45   size: [15,5]
46
47 =head2 active
48
49   data_type: 'tinyint'
50   is_nullable: 1
51
52 =cut
53
54 __PACKAGE__->add_columns(
55   "currency",
56   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
57   "symbol",
58   { data_type => "varchar", is_nullable => 1, size => 5 },
59   "timestamp",
60   {
61     data_type     => "timestamp",
62     default_value => \"current_timestamp",
63     is_nullable   => 0,
64   },
65   "rate",
66   { data_type => "float", is_nullable => 1, size => [15, 5] },
67   "active",
68   { data_type => "tinyint", is_nullable => 1 },
69 );
70 __PACKAGE__->set_primary_key("currency");
71
72 =head1 RELATIONS
73
74 =head2 aqbooksellers_listprices
75
76 Type: has_many
77
78 Related object: L<Koha::Schema::Result::Aqbookseller>
79
80 =cut
81
82 __PACKAGE__->has_many(
83   "aqbooksellers_listprices",
84   "Koha::Schema::Result::Aqbookseller",
85   { "foreign.listprice" => "self.currency" },
86   { cascade_copy => 0, cascade_delete => 0 },
87 );
88
89 =head2 aqbooksellers_invoiceprices
90
91 Type: has_many
92
93 Related object: L<Koha::Schema::Result::Aqbookseller>
94
95 =cut
96
97 __PACKAGE__->has_many(
98   "aqbooksellers_invoiceprices",
99   "Koha::Schema::Result::Aqbookseller",
100   { "foreign.invoiceprice" => "self.currency" },
101   { cascade_copy => 0, cascade_delete => 0 },
102 );
103
104
105 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
106 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6SWDTY33KjtpW71Elgs69g
107
108
109 # You can replace this text with custom content, and it will be preserved on regeneration
110 1;