Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / Virtualshelfshare.pm
1 package Koha::Schema::Result::Virtualshelfshare;
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::Virtualshelfshare
15
16 =cut
17
18 __PACKAGE__->table("virtualshelfshares");
19
20 =head1 ACCESSORS
21
22 =head2 id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 shelfnumber
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 0
33
34 =head2 borrowernumber
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 1
39
40 =head2 invitekey
41
42   data_type: 'varchar'
43   is_nullable: 1
44   size: 10
45
46 =head2 sharedate
47
48   data_type: 'datetime'
49   is_nullable: 1
50
51 =cut
52
53 __PACKAGE__->add_columns(
54   "id",
55   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
56   "shelfnumber",
57   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
58   "borrowernumber",
59   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
60   "invitekey",
61   { data_type => "varchar", is_nullable => 1, size => 10 },
62   "sharedate",
63   { data_type => "datetime", is_nullable => 1 },
64 );
65 __PACKAGE__->set_primary_key("id");
66
67 =head1 RELATIONS
68
69 =head2 shelfnumber
70
71 Type: belongs_to
72
73 Related object: L<Koha::Schema::Result::Virtualshelve>
74
75 =cut
76
77 __PACKAGE__->belongs_to(
78   "shelfnumber",
79   "Koha::Schema::Result::Virtualshelve",
80   { shelfnumber => "shelfnumber" },
81   { on_delete => "CASCADE", on_update => "CASCADE" },
82 );
83
84 =head2 borrowernumber
85
86 Type: belongs_to
87
88 Related object: L<Koha::Schema::Result::Borrower>
89
90 =cut
91
92 __PACKAGE__->belongs_to(
93   "borrowernumber",
94   "Koha::Schema::Result::Borrower",
95   { borrowernumber => "borrowernumber" },
96   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
97 );
98
99
100 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
101 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wbmtFrbzS+jaFaiZRZ0uwg
102
103
104 # You can replace this text with custom content, and it will be preserved on regeneration
105 1;