Bug 23355: [DO NOT PUSH] DBIC Classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-01-23 13:37:33 +00:00
parent 239ac3303c
commit 5cf1e85191
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
3 changed files with 174 additions and 4 deletions

View file

@ -929,6 +929,21 @@ __PACKAGE__->belongs_to(
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
);
=head2 cash_register_actions
Type: has_many
Related object: L<Koha::Schema::Result::CashRegisterAction>
=cut
__PACKAGE__->has_many(
"cash_register_actions",
"Koha::Schema::Result::CashRegisterAction",
{ "foreign.manager_id" => "self.borrowernumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 categorycode
Type: belongs_to
@ -1634,9 +1649,14 @@ Composing rels: L</aqorder_users> -> ordernumber
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-23 13:21:02
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f25Xar862YgzWuWq5/LIRA
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-10 14:31:00
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GjJLIOViIFRm185Yjl9vYA
__PACKAGE__->belongs_to(
"guarantor",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "guarantorid" },
);
__PACKAGE__->add_columns(
'+anonymized' => { is_boolean => 1 },

View file

@ -144,9 +144,24 @@ __PACKAGE__->belongs_to(
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 cash_register_actions
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-23 13:14:31
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TfGf0U/vWS7IviRlvDdE1w
Type: has_many
Related object: L<Koha::Schema::Result::CashRegisterAction>
=cut
__PACKAGE__->has_many(
"cash_register_actions",
"Koha::Schema::Result::CashRegisterAction",
{ "foreign.register_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-23 13:21:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zP8my0Zp5bSARTBfws4n1A
__PACKAGE__->add_columns(
'+archived' => { is_boolean => 1 },

View file

@ -0,0 +1,135 @@
use utf8;
package Koha::Schema::Result::CashRegisterAction;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Koha::Schema::Result::CashRegisterAction
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 TABLE: C<cash_register_actions>
=cut
__PACKAGE__->table("cash_register_actions");
=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 code
data_type: 'varchar'
is_nullable: 0
size: 24
=head2 register_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 manager_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 amount
data_type: 'decimal'
is_nullable: 1
size: [28,6]
=head2 timestamp
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"code",
{ data_type => "varchar", is_nullable => 0, size => 24 },
"register_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"manager_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"amount",
{ data_type => "decimal", is_nullable => 1, size => [28, 6] },
"timestamp",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
);
=head1 PRIMARY KEY
=over 4
=item * L</id>
=back
=cut
__PACKAGE__->set_primary_key("id");
=head1 RELATIONS
=head2 manager
Type: belongs_to
Related object: L<Koha::Schema::Result::Borrower>
=cut
__PACKAGE__->belongs_to(
"manager",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "manager_id" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 register
Type: belongs_to
Related object: L<Koha::Schema::Result::CashRegister>
=cut
__PACKAGE__->belongs_to(
"register",
"Koha::Schema::Result::CashRegister",
{ id => "register_id" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-23 13:21:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Oaee+hS82IEJHHBGuOXDtw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;