Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / TransportCost.pm
1 package Koha::Schema::Result::TransportCost;
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::TransportCost
15
16 =cut
17
18 __PACKAGE__->table("transport_cost");
19
20 =head1 ACCESSORS
21
22 =head2 frombranch
23
24   data_type: 'varchar'
25   is_foreign_key: 1
26   is_nullable: 0
27   size: 10
28
29 =head2 tobranch
30
31   data_type: 'varchar'
32   is_foreign_key: 1
33   is_nullable: 0
34   size: 10
35
36 =head2 cost
37
38   data_type: 'decimal'
39   is_nullable: 0
40   size: [6,2]
41
42 =head2 disable_transfer
43
44   data_type: 'tinyint'
45   default_value: 0
46   is_nullable: 0
47
48 =cut
49
50 __PACKAGE__->add_columns(
51   "frombranch",
52   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
53   "tobranch",
54   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
55   "cost",
56   { data_type => "decimal", is_nullable => 0, size => [6, 2] },
57   "disable_transfer",
58   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
59 );
60 __PACKAGE__->set_primary_key("frombranch", "tobranch");
61
62 =head1 RELATIONS
63
64 =head2 frombranch
65
66 Type: belongs_to
67
68 Related object: L<Koha::Schema::Result::Branch>
69
70 =cut
71
72 __PACKAGE__->belongs_to(
73   "frombranch",
74   "Koha::Schema::Result::Branch",
75   { branchcode => "frombranch" },
76   { on_delete => "CASCADE", on_update => "CASCADE" },
77 );
78
79 =head2 tobranch
80
81 Type: belongs_to
82
83 Related object: L<Koha::Schema::Result::Branch>
84
85 =cut
86
87 __PACKAGE__->belongs_to(
88   "tobranch",
89   "Koha::Schema::Result::Branch",
90   { branchcode => "tobranch" },
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:xaYbVRwPFyhljmGybBzTqA
97
98
99 # You can replace this text with custom content, and it will be preserved on regeneration
100 1;