Initial library
[scpubgit/stemmatology.git] / lib / Traditions / Schema / Result / Manuscript.pm
1 package Traditions::Schema::Result::Manuscript;
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 Traditions::Schema::Result::Manuscript
15
16 =cut
17
18 __PACKAGE__->table("manuscripts");
19
20 =head1 ACCESSORS
21
22 =head2 manuscriptid
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 text
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 0
33
34 =head2 description
35
36   data_type: 'text'
37   is_nullable: 0
38
39 =head2 sigil
40
41   data_type: 'text'
42   is_nullable: 0
43
44 =head2 first_word
45
46   data_type: 'integer'
47   is_foreign_key: 1
48   is_nullable: 1
49
50 =cut
51
52 __PACKAGE__->add_columns(
53   "manuscriptid",
54   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
55   "text",
56   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
57   "description",
58   { data_type => "text", is_nullable => 0 },
59   "sigil",
60   { data_type => "text", is_nullable => 0 },
61   "first_word",
62   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
63 );
64 __PACKAGE__->set_primary_key("manuscriptid");
65
66 =head1 RELATIONS
67
68 =head2 first_word
69
70 Type: belongs_to
71
72 Related object: L<Traditions::Schema::Result::Reading>
73
74 =cut
75
76 __PACKAGE__->belongs_to(
77   "first_word",
78   "Traditions::Schema::Result::Reading",
79   { readingid => "first_word" },
80   {
81     is_deferrable => 1,
82     join_type     => "LEFT",
83     on_delete     => "CASCADE",
84     on_update     => "CASCADE",
85   },
86 );
87
88 =head2 text
89
90 Type: belongs_to
91
92 Related object: L<Traditions::Schema::Result::Text>
93
94 =cut
95
96 __PACKAGE__->belongs_to(
97   "text",
98   "Traditions::Schema::Result::Text",
99   { textid => "text" },
100   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
101 );
102
103 =head2 readings
104
105 Type: has_many
106
107 Related object: L<Traditions::Schema::Result::Reading>
108
109 =cut
110
111 __PACKAGE__->has_many(
112   "readings",
113   "Traditions::Schema::Result::Reading",
114   { "foreign.manuscript" => "self.manuscriptid" },
115   { cascade_copy => 0, cascade_delete => 0 },
116 );
117
118
119 # Created by DBIx::Class::Schema::Loader v0.07002 @ 2010-10-19 17:34:43
120 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:71XIOYGQBGADyQrj4WE49Q
121
122
123 # You can replace this text with custom content, and it will be preserved on regeneration
124 1;