Change namespace
[scpubgit/stemmatology.git] / lib / Text / Tradition / Schema / Result / Reading.pm
CommitLineData
b49c4318 1package Traditions::Schema::Result::Reading;
2
3# Created by DBIx::Class::Schema::Loader
4# DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6use strict;
7use warnings;
8
9use base 'DBIx::Class::Core';
10
11
12=head1 NAME
13
14Traditions::Schema::Result::Reading
15
16=cut
17
18__PACKAGE__->table("readings");
19
20=head1 ACCESSORS
21
22=head2 readingid
23
24 data_type: 'integer'
25 is_auto_increment: 1
26 is_nullable: 0
27
28=head2 prior_reading
29
30 data_type: 'integer'
31 is_foreign_key: 1
32 is_nullable: 1
33
34=head2 next_reading
35
36 data_type: 'integer'
37 is_foreign_key: 1
38 is_nullable: 1
39
40=head2 readingtext
41
42 data_type: 'text'
43 is_nullable: 0
44
45=head2 ante_corr
46
47 data_type: 'text'
48 is_nullable: 1
49
50=head2 manuscript
51
52 data_type: 'integer'
53 is_foreign_key: 1
54 is_nullable: 0
55
56=head2 collation
57
58 data_type: 'integer'
59 is_foreign_key: 1
60 is_nullable: 1
61
62=cut
63
64__PACKAGE__->add_columns(
65 "readingid",
66 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
67 "prior_reading",
68 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
69 "next_reading",
70 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
71 "readingtext",
72 { data_type => "text", is_nullable => 0 },
73 "ante_corr",
74 { data_type => "text", is_nullable => 1 },
75 "manuscript",
76 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
77 "collation",
78 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
79);
80__PACKAGE__->set_primary_key("readingid");
81__PACKAGE__->add_unique_constraint("next_reading_unique", ["next_reading"]);
82__PACKAGE__->add_unique_constraint("prior_reading_unique", ["prior_reading"]);
83
84=head1 RELATIONS
85
86=head2 manuscripts
87
88Type: has_many
89
90Related object: L<Traditions::Schema::Result::Manuscript>
91
92=cut
93
94__PACKAGE__->has_many(
95 "manuscripts",
96 "Traditions::Schema::Result::Manuscript",
97 { "foreign.first_word" => "self.readingid" },
98 { cascade_copy => 0, cascade_delete => 0 },
99);
100
101=head2 collation
102
103Type: belongs_to
104
105Related object: L<Traditions::Schema::Result::Collation>
106
107=cut
108
109__PACKAGE__->belongs_to(
110 "collation",
111 "Traditions::Schema::Result::Collation",
112 { collationid => "collation" },
113 {
114 is_deferrable => 1,
115 join_type => "LEFT",
116 on_delete => "CASCADE",
117 on_update => "CASCADE",
118 },
119);
120
121=head2 manuscript
122
123Type: belongs_to
124
125Related object: L<Traditions::Schema::Result::Manuscript>
126
127=cut
128
129__PACKAGE__->belongs_to(
130 "manuscript",
131 "Traditions::Schema::Result::Manuscript",
132 { manuscriptid => "manuscript" },
133 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
134);
135
136=head2 next_reading
137
138Type: belongs_to
139
140Related object: L<Traditions::Schema::Result::Reading>
141
142=cut
143
144__PACKAGE__->belongs_to(
145 "next_reading",
146 "Traditions::Schema::Result::Reading",
147 { readingid => "next_reading" },
148 {
149 is_deferrable => 1,
150 join_type => "LEFT",
151 on_delete => "CASCADE",
152 on_update => "CASCADE",
153 },
154);
155
156=head2 reading_next_reading
157
158Type: might_have
159
160Related object: L<Traditions::Schema::Result::Reading>
161
162=cut
163
164__PACKAGE__->might_have(
165 "reading_next_reading",
166 "Traditions::Schema::Result::Reading",
167 { "foreign.next_reading" => "self.readingid" },
168 { cascade_copy => 0, cascade_delete => 0 },
169);
170
171=head2 prior_reading
172
173Type: belongs_to
174
175Related object: L<Traditions::Schema::Result::Reading>
176
177=cut
178
179__PACKAGE__->belongs_to(
180 "prior_reading",
181 "Traditions::Schema::Result::Reading",
182 { readingid => "prior_reading" },
183 {
184 is_deferrable => 1,
185 join_type => "LEFT",
186 on_delete => "CASCADE",
187 on_update => "CASCADE",
188 },
189);
190
191=head2 reading_prior_reading
192
193Type: might_have
194
195Related object: L<Traditions::Schema::Result::Reading>
196
197=cut
198
199__PACKAGE__->might_have(
200 "reading_prior_reading",
201 "Traditions::Schema::Result::Reading",
202 { "foreign.prior_reading" => "self.readingid" },
203 { cascade_copy => 0, cascade_delete => 0 },
204);
205
206
207# Created by DBIx::Class::Schema::Loader v0.07002 @ 2010-10-19 17:34:43
208# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ze+1/h74nB4r9fc6AGIIkQ
209
210
211# You can replace this text with custom content, and it will be preserved on regeneration
2121;