Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / Patronimage.pm
1 use utf8;
2 package Koha::Schema::Result::Patronimage;
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::Patronimage
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<patronimage>
19
20 =cut
21
22 __PACKAGE__->table("patronimage");
23
24 =head1 ACCESSORS
25
26 =head2 borrowernumber
27
28   data_type: 'integer'
29   is_foreign_key: 1
30   is_nullable: 0
31
32 the borrowernumber of the patron this image is attached to (borrowers.borrowernumber)
33
34 =head2 mimetype
35
36   data_type: 'varchar'
37   is_nullable: 0
38   size: 15
39
40 the format of the image (png, jpg, etc)
41
42 =head2 imagefile
43
44   data_type: 'mediumblob'
45   is_nullable: 0
46
47 the image
48
49 =cut
50
51 __PACKAGE__->add_columns(
52   "borrowernumber",
53   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
54   "mimetype",
55   { data_type => "varchar", is_nullable => 0, size => 15 },
56   "imagefile",
57   { data_type => "mediumblob", is_nullable => 0 },
58 );
59
60 =head1 PRIMARY KEY
61
62 =over 4
63
64 =item * L</borrowernumber>
65
66 =back
67
68 =cut
69
70 __PACKAGE__->set_primary_key("borrowernumber");
71
72 =head1 RELATIONS
73
74 =head2 borrowernumber
75
76 Type: belongs_to
77
78 Related object: L<Koha::Schema::Result::Borrower>
79
80 =cut
81
82 __PACKAGE__->belongs_to(
83   "borrowernumber",
84   "Koha::Schema::Result::Borrower",
85   { borrowernumber => "borrowernumber" },
86   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
87 );
88
89
90 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
91 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DWbMgbxlYcZhGF1YK9fDIA
92
93 sub koha_object_class {
94     'Koha::Patron::Image';
95 }
96 sub koha_objects_class {
97     'Koha::Patron::Images';
98 }
99
100 1;