View | Details | Raw Unified | Return to bug 22435
Collapse All | Expand All

(-)a/Koha/Schema/Result/AccountOffset.pm (-21 / +17 lines)
Lines 49-58 The id of the accountline that decreased the patron's balance Link Here
49
49
50
=head2 type
50
=head2 type
51
51
52
  data_type: 'varchar'
52
  data_type: 'enum'
53
  is_foreign_key: 1
53
  extra: {list => ["CREATE","APPLY","VOID","OVERDUE_INCREASE","OVERDUE_DECREASE"]}
54
  is_nullable: 0
54
  is_nullable: 0
55
  size: 16
56
55
57
The type of offset this is
56
The type of offset this is
58
57
Lines 81-87 __PACKAGE__->add_columns( Link Here
81
  "debit_id",
80
  "debit_id",
82
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
81
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
83
  "type",
82
  "type",
84
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 16 },
83
  {
84
    data_type => "enum",
85
    extra => {
86
      list => [
87
        "CREATE",
88
        "APPLY",
89
        "VOID",
90
        "OVERDUE_INCREASE",
91
        "OVERDUE_DECREASE",
92
      ],
93
    },
94
    is_nullable => 0,
95
  },
85
  "amount",
96
  "amount",
86
  { data_type => "decimal", is_nullable => 0, size => [26, 6] },
97
  { data_type => "decimal", is_nullable => 0, size => [26, 6] },
87
  "created_on",
98
  "created_on",
Lines 147-170 __PACKAGE__->belongs_to( Link Here
147
  },
158
  },
148
);
159
);
149
160
150
=head2 type
151
152
Type: belongs_to
153
154
Related object: L<Koha::Schema::Result::AccountOffsetType>
155
156
=cut
157
158
__PACKAGE__->belongs_to(
159
  "type",
160
  "Koha::Schema::Result::AccountOffsetType",
161
  { type => "type" },
162
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
163
);
164
165
161
166
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
162
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-06-21 15:27:32
167
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d6cqxL2VddjOmUqe3nLptw
163
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zCeE/SWvdz898zlfcvfRGg
168
164
169
sub koha_object_class {
165
sub koha_object_class {
170
    'Koha::Account::Offset';
166
    'Koha::Account::Offset';
(-)a/Koha/Schema/Result/AccountOffsetType.pm (-77 lines)
Lines 1-76 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountOffsetType;
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::AccountOffsetType
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_offset_types>
19
20
=cut
21
22
__PACKAGE__->table("account_offset_types");
23
24
=head1 ACCESSORS
25
26
=head2 type
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 16
31
32
The type of offset this is
33
34
=cut
35
36
__PACKAGE__->add_columns(
37
  "type",
38
  { data_type => "varchar", is_nullable => 0, size => 16 },
39
);
40
41
=head1 PRIMARY KEY
42
43
=over 4
44
45
=item * L</type>
46
47
=back
48
49
=cut
50
51
__PACKAGE__->set_primary_key("type");
52
53
=head1 RELATIONS
54
55
=head2 account_offsets
56
57
Type: has_many
58
59
Related object: L<Koha::Schema::Result::AccountOffset>
60
61
=cut
62
63
__PACKAGE__->has_many(
64
  "account_offsets",
65
  "Koha::Schema::Result::AccountOffset",
66
  { "foreign.type" => "self.type" },
67
  { cascade_copy => 0, cascade_delete => 0 },
68
);
69
70
71
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
72
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HGUopAaOUF8FcmqQjIrRiw
73
74
75
# You can replace this text with custom code or comments, and it will be preserved on regeneration
76
1;
77
- 

Return to bug 22435