Bug 7295: (follow-up) update DBIx::Class schema classes
[koha.git] / Koha / Schema / Result / Patroncard.pm
1 use utf8;
2 package Koha::Schema::Result::Patroncard;
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::Patroncard
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<patroncards>
19
20 =cut
21
22 __PACKAGE__->table("patroncards");
23
24 =head1 ACCESSORS
25
26 =head2 cardid
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 batch_id
33
34   data_type: 'varchar'
35   default_value: 1
36   is_nullable: 0
37   size: 10
38
39 =head2 borrowernumber
40
41   data_type: 'integer'
42   is_foreign_key: 1
43   is_nullable: 0
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 =cut
53
54 __PACKAGE__->add_columns(
55   "cardid",
56   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
57   "batch_id",
58   { data_type => "varchar", default_value => 1, is_nullable => 0, size => 10 },
59   "borrowernumber",
60   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
61   "timestamp",
62   {
63     data_type => "timestamp",
64     datetime_undef_if_invalid => 1,
65     default_value => \"current_timestamp",
66     is_nullable => 0,
67   },
68 );
69
70 =head1 PRIMARY KEY
71
72 =over 4
73
74 =item * L</cardid>
75
76 =back
77
78 =cut
79
80 __PACKAGE__->set_primary_key("cardid");
81
82 =head1 RELATIONS
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   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
97 );
98
99
100 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
101 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZDpN4iw7+y9YP7Dc+ou8lQ
102
103
104 # You can replace this text with custom content, and it will be preserved on regeneration
105 1;