|
Line 0
Link Here
|
| 0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::Desk; |
| 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::Desk |
| 10 |
|
| 11 |
=cut |
| 12 |
|
| 13 |
use strict; |
| 14 |
use warnings; |
| 15 |
|
| 16 |
use base 'DBIx::Class::Core'; |
| 17 |
|
| 18 |
=head1 TABLE: C<desks> |
| 19 |
|
| 20 |
=cut |
| 21 |
|
| 22 |
__PACKAGE__->table("desks"); |
| 23 |
|
| 24 |
=head1 ACCESSORS |
| 25 |
|
| 26 |
=head2 desk_id |
| 27 |
|
| 28 |
data_type: 'integer' |
| 29 |
is_auto_increment: 1 |
| 30 |
is_nullable: 0 |
| 31 |
|
| 32 |
=head2 desk_name |
| 33 |
|
| 34 |
data_type: 'varchar' |
| 35 |
default_value: (empty string) |
| 36 |
is_nullable: 0 |
| 37 |
size: 100 |
| 38 |
|
| 39 |
=head2 branchcode |
| 40 |
|
| 41 |
data_type: 'varchar' |
| 42 |
is_foreign_key: 1 |
| 43 |
is_nullable: 0 |
| 44 |
size: 10 |
| 45 |
|
| 46 |
=cut |
| 47 |
|
| 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 }, |
| 55 |
); |
| 56 |
|
| 57 |
=head1 PRIMARY KEY |
| 58 |
|
| 59 |
=over 4 |
| 60 |
|
| 61 |
=item * L</desk_id> |
| 62 |
|
| 63 |
=back |
| 64 |
|
| 65 |
=cut |
| 66 |
|
| 67 |
__PACKAGE__->set_primary_key("desk_id"); |
| 68 |
|
| 69 |
=head1 RELATIONS |
| 70 |
|
| 71 |
=head2 branchcode |
| 72 |
|
| 73 |
Type: belongs_to |
| 74 |
|
| 75 |
Related object: L<Koha::Schema::Result::Branch> |
| 76 |
|
| 77 |
=cut |
| 78 |
|
| 79 |
__PACKAGE__->belongs_to( |
| 80 |
"branchcode", |
| 81 |
"Koha::Schema::Result::Branch", |
| 82 |
{ branchcode => "branchcode" }, |
| 83 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
| 84 |
); |
| 85 |
|
| 86 |
|
| 87 |
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-10-02 13:43:57 |
| 88 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IklOycKlChqv9Tftm8rjqA |
| 89 |
|
| 90 |
|
| 91 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
| 92 |
1; |