Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / OldIssue.pm
1 package Koha::Schema::Result::OldIssue;
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::OldIssue
15
16 =cut
17
18 __PACKAGE__->table("old_issues");
19
20 =head1 ACCESSORS
21
22 =head2 borrowernumber
23
24   data_type: 'integer'
25   is_foreign_key: 1
26   is_nullable: 1
27
28 =head2 itemnumber
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 1
33
34 =head2 date_due
35
36   data_type: 'datetime'
37   is_nullable: 1
38
39 =head2 branchcode
40
41   data_type: 'varchar'
42   is_nullable: 1
43   size: 10
44
45 =head2 issuingbranch
46
47   data_type: 'varchar'
48   is_nullable: 1
49   size: 18
50
51 =head2 returndate
52
53   data_type: 'datetime'
54   is_nullable: 1
55
56 =head2 lastreneweddate
57
58   data_type: 'datetime'
59   is_nullable: 1
60
61 =head2 return
62
63   data_type: 'varchar'
64   is_nullable: 1
65   size: 4
66
67 =head2 renewals
68
69   data_type: 'tinyint'
70   is_nullable: 1
71
72 =head2 timestamp
73
74   data_type: 'timestamp'
75   default_value: current_timestamp
76   is_nullable: 0
77
78 =head2 issuedate
79
80   data_type: 'datetime'
81   is_nullable: 1
82
83 =cut
84
85 __PACKAGE__->add_columns(
86   "borrowernumber",
87   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
88   "itemnumber",
89   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
90   "date_due",
91   { data_type => "datetime", is_nullable => 1 },
92   "branchcode",
93   { data_type => "varchar", is_nullable => 1, size => 10 },
94   "issuingbranch",
95   { data_type => "varchar", is_nullable => 1, size => 18 },
96   "returndate",
97   { data_type => "datetime", is_nullable => 1 },
98   "lastreneweddate",
99   { data_type => "datetime", is_nullable => 1 },
100   "return",
101   { data_type => "varchar", is_nullable => 1, size => 4 },
102   "renewals",
103   { data_type => "tinyint", is_nullable => 1 },
104   "timestamp",
105   {
106     data_type     => "timestamp",
107     default_value => \"current_timestamp",
108     is_nullable   => 0,
109   },
110   "issuedate",
111   { data_type => "datetime", is_nullable => 1 },
112 );
113
114 =head1 RELATIONS
115
116 =head2 borrowernumber
117
118 Type: belongs_to
119
120 Related object: L<Koha::Schema::Result::Borrower>
121
122 =cut
123
124 __PACKAGE__->belongs_to(
125   "borrowernumber",
126   "Koha::Schema::Result::Borrower",
127   { borrowernumber => "borrowernumber" },
128   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
129 );
130
131 =head2 itemnumber
132
133 Type: belongs_to
134
135 Related object: L<Koha::Schema::Result::Item>
136
137 =cut
138
139 __PACKAGE__->belongs_to(
140   "itemnumber",
141   "Koha::Schema::Result::Item",
142   { itemnumber => "itemnumber" },
143   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
144 );
145
146
147 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
148 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OmCAF2QYzR59eHr1w51seA
149
150
151 # You can replace this text with custom content, and it will be preserved on regeneration
152 1;