Bug 8798: DBIx::Class base classes for all Koha tables
[koha_fer] / Koha / Schema / Result / MatchpointComponent.pm
1 package Koha::Schema::Result::MatchpointComponent;
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::MatchpointComponent
15
16 =cut
17
18 __PACKAGE__->table("matchpoint_components");
19
20 =head1 ACCESSORS
21
22 =head2 matchpoint_id
23
24   data_type: 'integer'
25   is_foreign_key: 1
26   is_nullable: 0
27
28 =head2 matchpoint_component_id
29
30   data_type: 'integer'
31   is_auto_increment: 1
32   is_nullable: 0
33
34 =head2 sequence
35
36   accessor: undef
37   data_type: 'integer'
38   default_value: 0
39   is_nullable: 0
40
41 =head2 tag
42
43   data_type: 'varchar'
44   default_value: (empty string)
45   is_nullable: 0
46   size: 3
47
48 =head2 subfields
49
50   data_type: 'varchar'
51   default_value: (empty string)
52   is_nullable: 0
53   size: 40
54
55 =head2 offset
56
57   data_type: 'integer'
58   default_value: 0
59   is_nullable: 0
60
61 =head2 length
62
63   data_type: 'integer'
64   default_value: 0
65   is_nullable: 0
66
67 =cut
68
69 __PACKAGE__->add_columns(
70   "matchpoint_id",
71   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
72   "matchpoint_component_id",
73   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
74   "sequence",
75   {
76     accessor      => undef,
77     data_type     => "integer",
78     default_value => 0,
79     is_nullable   => 0,
80   },
81   "tag",
82   { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 },
83   "subfields",
84   { data_type => "varchar", default_value => "", is_nullable => 0, size => 40 },
85   "offset",
86   { data_type => "integer", default_value => 0, is_nullable => 0 },
87   "length",
88   { data_type => "integer", default_value => 0, is_nullable => 0 },
89 );
90 __PACKAGE__->set_primary_key("matchpoint_component_id");
91
92 =head1 RELATIONS
93
94 =head2 matchpoint_component_norms
95
96 Type: has_many
97
98 Related object: L<Koha::Schema::Result::MatchpointComponentNorm>
99
100 =cut
101
102 __PACKAGE__->has_many(
103   "matchpoint_component_norms",
104   "Koha::Schema::Result::MatchpointComponentNorm",
105   {
106     "foreign.matchpoint_component_id" => "self.matchpoint_component_id",
107   },
108   { cascade_copy => 0, cascade_delete => 0 },
109 );
110
111 =head2 matchpoint
112
113 Type: belongs_to
114
115 Related object: L<Koha::Schema::Result::Matchpoint>
116
117 =cut
118
119 __PACKAGE__->belongs_to(
120   "matchpoint",
121   "Koha::Schema::Result::Matchpoint",
122   { matchpoint_id => "matchpoint_id" },
123   { on_delete => "CASCADE", on_update => "CASCADE" },
124 );
125
126
127 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
128 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/7C/jFYOMSF/AtJViHH7jQ
129
130
131 # You can replace this text with custom content, and it will be preserved on regeneration
132 1;