Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / Biblioimage.pm
1 package Koha::Schema::Result::Biblioimage;
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::Biblioimage
15
16 =cut
17
18 __PACKAGE__->table("biblioimages");
19
20 =head1 ACCESSORS
21
22 =head2 imagenumber
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 biblionumber
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 0
33
34 =head2 mimetype
35
36   data_type: 'varchar'
37   is_nullable: 0
38   size: 15
39
40 =head2 imagefile
41
42   data_type: 'mediumblob'
43   is_nullable: 0
44
45 =head2 thumbnail
46
47   data_type: 'mediumblob'
48   is_nullable: 0
49
50 =cut
51
52 __PACKAGE__->add_columns(
53   "imagenumber",
54   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
55   "biblionumber",
56   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
57   "mimetype",
58   { data_type => "varchar", is_nullable => 0, size => 15 },
59   "imagefile",
60   { data_type => "mediumblob", is_nullable => 0 },
61   "thumbnail",
62   { data_type => "mediumblob", is_nullable => 0 },
63 );
64 __PACKAGE__->set_primary_key("imagenumber");
65
66 =head1 RELATIONS
67
68 =head2 biblionumber
69
70 Type: belongs_to
71
72 Related object: L<Koha::Schema::Result::Biblio>
73
74 =cut
75
76 __PACKAGE__->belongs_to(
77   "biblionumber",
78   "Koha::Schema::Result::Biblio",
79   { biblionumber => "biblionumber" },
80   { on_delete => "CASCADE", on_update => "CASCADE" },
81 );
82
83
84 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
85 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9P2Yp+Ye/tJ3+aG7mQR8sQ
86
87
88 # You can replace this text with custom content, and it will be preserved on regeneration
89 1;