Bug 24412: DBIC schema changes
[koha.git] / Koha / Schema / Result / Desk.pm
blob9201a9315ed97a2fdc385db1e623a7d0584b2fc4
1 use utf8;
2 package Koha::Schema::Result::Desk;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Desk
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<desks>
20 =cut
22 __PACKAGE__->table("desks");
24 =head1 ACCESSORS
26 =head2 desk_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 desk_name
34 data_type: 'varchar'
35 default_value: (empty string)
36 is_nullable: 0
37 size: 100
39 =head2 branchcode
41 data_type: 'varchar'
42 is_foreign_key: 1
43 is_nullable: 0
44 size: 10
46 =cut
48 __PACKAGE__->add_columns(
49 "desk_id",
50 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
51 "desk_name",
52 { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 },
53 "branchcode",
54 { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
57 =head1 PRIMARY KEY
59 =over 4
61 =item * L</desk_id>
63 =back
65 =cut
67 __PACKAGE__->set_primary_key("desk_id");
69 =head1 RELATIONS
71 =head2 branchcode
73 Type: belongs_to
75 Related object: L<Koha::Schema::Result::Branch>
77 =cut
79 __PACKAGE__->belongs_to(
80 "branchcode",
81 "Koha::Schema::Result::Branch",
82 { branchcode => "branchcode" },
83 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
86 =head2 reserves
88 Type: has_many
90 Related object: L<Koha::Schema::Result::Reserve>
92 =cut
94 __PACKAGE__->has_many(
95 "reserves",
96 "Koha::Schema::Result::Reserve",
97 { "foreign.desk_id" => "self.desk_id" },
98 { cascade_copy => 0, cascade_delete => 0 },
102 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-11-06 11:00:40
103 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Weoxj3CBeajLEzx9DBX1ag
106 # You can replace this text with custom code or comments, and it will be preserved on regeneration