Bug 8798: DBIx::Class base classes for all Koha tables
[koha_fer] / Koha / Schema / Result / Accountoffset.pm
1 package Koha::Schema::Result::Accountoffset;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Accountoffset
15
16 =cut
17
18 __PACKAGE__->table("accountoffsets");
19
20 =head1 ACCESSORS
21
22 =head2 borrowernumber
23
24   data_type: 'integer'
25   default_value: 0
26   is_foreign_key: 1
27   is_nullable: 0
28
29 =head2 accountno
30
31   data_type: 'smallint'
32   default_value: 0
33   is_nullable: 0
34
35 =head2 offsetaccount
36
37   data_type: 'smallint'
38   default_value: 0
39   is_nullable: 0
40
41 =head2 offsetamount
42
43   data_type: 'decimal'
44   is_nullable: 1
45   size: [28,6]
46
47 =head2 timestamp
48
49   data_type: 'timestamp'
50   default_value: current_timestamp
51   is_nullable: 0
52
53 =cut
54
55 __PACKAGE__->add_columns(
56   "borrowernumber",
57   {
58     data_type      => "integer",
59     default_value  => 0,
60     is_foreign_key => 1,
61     is_nullable    => 0,
62   },
63   "accountno",
64   { data_type => "smallint", default_value => 0, is_nullable => 0 },
65   "offsetaccount",
66   { data_type => "smallint", default_value => 0, is_nullable => 0 },
67   "offsetamount",
68   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
69   "timestamp",
70   {
71     data_type     => "timestamp",
72     default_value => \"current_timestamp",
73     is_nullable   => 0,
74   },
75 );
76
77 =head1 RELATIONS
78
79 =head2 borrowernumber
80
81 Type: belongs_to
82
83 Related object: L<Koha::Schema::Result::Borrower>
84
85 =cut
86
87 __PACKAGE__->belongs_to(
88   "borrowernumber",
89   "Koha::Schema::Result::Borrower",
90   { borrowernumber => "borrowernumber" },
91   { on_delete => "CASCADE", on_update => "CASCADE" },
92 );
93
94
95 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
96 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EgbEZx495kZ40/HqRcPXfA
97
98
99 # You can replace this text with custom content, and it will be preserved on regeneration
100 1;