Bug 24860: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2022-11-04 19:44:59 -03:00
parent 42ff41f95e
commit 5157aaa092
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
4 changed files with 114 additions and 8 deletions

View file

@ -147,9 +147,39 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 old_reserves
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-02 16:18:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YO7VdfzHDqBjGHt7vQX7gw
Type: has_many
Related object: L<Koha::Schema::Result::OldReserve>
=cut
__PACKAGE__->has_many(
"old_reserves",
"Koha::Schema::Result::OldReserve",
{ "foreign.item_group_id" => "self.item_group_id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 reserves
Type: has_many
Related object: L<Koha::Schema::Result::Reserve>
=cut
__PACKAGE__->has_many(
"reserves",
"Koha::Schema::Result::Reserve",
{ "foreign.item_group_id" => "self.item_group_id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-04 22:42:42
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q2LTnircvx4khvkVm9eIsQ
sub koha_objects_class {
'Koha::Biblio::ItemGroups';

View file

@ -54,6 +54,14 @@ the date the hold was places
foreign key from the biblio table defining which bib record this hold is on
=head2 item_group_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
foreign key from the item_groups table defining if this is an item group level hold
=head2 branchcode
data_type: 'varchar'
@ -226,6 +234,8 @@ __PACKAGE__->add_columns(
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
"biblionumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"item_group_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"branchcode",
{ data_type => "varchar", is_nullable => 1, size => 10 },
"desk_id",
@ -336,6 +346,26 @@ __PACKAGE__->belongs_to(
},
);
=head2 item_group
Type: belongs_to
Related object: L<Koha::Schema::Result::ItemGroup>
=cut
__PACKAGE__->belongs_to(
"item_group",
"Koha::Schema::Result::ItemGroup",
{ item_group_id => "item_group_id" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "SET NULL",
on_update => "SET NULL",
},
);
=head2 itemnumber
Type: belongs_to
@ -377,8 +407,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-01-28 20:08:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A3iHpf4nDeIpPsapNzdv8w
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-04 22:42:42
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zoepd1m+pi6dEnOlhWttQQ
__PACKAGE__->belongs_to(
"item",

View file

@ -57,6 +57,14 @@ the date the hold was placed
foreign key from the biblio table defining which bib record this hold is on
=head2 item_group_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
foreign key from the item_groups table defining if this is an item group level hold
=head2 branchcode
data_type: 'varchar'
@ -235,6 +243,8 @@ __PACKAGE__->add_columns(
is_foreign_key => 1,
is_nullable => 0,
},
"item_group_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"branchcode",
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
"desk_id",
@ -385,6 +395,26 @@ __PACKAGE__->belongs_to(
},
);
=head2 item_group
Type: belongs_to
Related object: L<Koha::Schema::Result::ItemGroup>
=cut
__PACKAGE__->belongs_to(
"item_group",
"Koha::Schema::Result::ItemGroup",
{ item_group_id => "item_group_id" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);
=head2 itemnumber
Type: belongs_to
@ -426,8 +456,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-07-22 17:37:42
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kYRPPeoVo0WMk1gH+qmi/w
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-04 22:42:42
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vYS5THhVu6Sox6Luz4EJbg
__PACKAGE__->belongs_to(
"item",

View file

@ -108,6 +108,15 @@ __PACKAGE__->table("tmp_holdsqueue");
default_value: 0
is_nullable: 0
=head2 timestamp
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
date and time this entry as added/last updated
=cut
__PACKAGE__->add_columns(
@ -141,6 +150,13 @@ __PACKAGE__->add_columns(
{ data_type => "mediumtext", is_nullable => 1 },
"item_level_request",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"timestamp",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
);
=head1 RELATIONS
@ -201,8 +217,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-20 12:00:15
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ytvFiixR/AIAgTV/5sewcQ
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-04 22:42:42
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RdIrLi+vbzj3ab/UP7e9pw
# You can replace this text with custom content, and it will be preserved on regeneration