Merge pull request #42 from solgenomics/topic/duplicate_image_warning
[cxgn-corelibs.git] / lib / SGN / Schema / Organism.pm
blob213372f9edaa8fb01fb1fc2d869ae436da4a1871
1 package SGN::Schema::Organism;
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6 use strict;
7 use warnings;
9 use base 'DBIx::Class::Core';
12 =head1 NAME
14 SGN::Schema::Organism
16 =cut
18 __PACKAGE__->table("organism");
20 =head1 ACCESSORS
22 =head2 organism_id
24 data_type: 'integer'
25 is_auto_increment: 1
26 is_nullable: 0
27 sequence: 'organism_organism_id_seq'
29 =head2 organism_name
31 data_type: 'varchar'
32 is_nullable: 1
33 size: 80
35 =head2 common_name_id
37 data_type: 'bigint'
38 is_foreign_key: 1
39 is_nullable: 0
41 =head2 organism_descrip
43 data_type: 'text'
44 is_nullable: 1
46 =head2 specie_tax
48 data_type: 'varchar'
49 is_nullable: 1
50 size: 80
52 =head2 genus_tax
54 data_type: 'integer'
55 is_foreign_key: 1
56 is_nullable: 1
58 =head2 subfamily_tax
60 data_type: 'integer'
61 is_foreign_key: 1
62 is_nullable: 1
64 =head2 family_tax
66 data_type: 'integer'
67 is_foreign_key: 1
68 is_nullable: 1
70 =head2 order_tax
72 data_type: 'integer'
73 is_foreign_key: 1
74 is_nullable: 1
76 =head2 chr_n_gnmc
78 data_type: 'integer'
79 is_nullable: 1
81 =head2 polypl_gnmc
83 data_type: 'varchar'
84 is_nullable: 1
85 size: 50
87 =head2 genom_size_gnmc
89 data_type: 'varchar'
90 is_nullable: 1
91 size: 50
93 =head2 genom_proj_gnmc
95 data_type: 'text'
96 is_nullable: 1
98 =head2 est_attribution_tqmc
100 data_type: 'text'
101 is_nullable: 1
103 =head2 chado_organism_id
105 data_type: 'integer'
106 is_nullable: 1
108 =cut
110 __PACKAGE__->add_columns(
111 "organism_id",
113 data_type => "integer",
114 is_auto_increment => 1,
115 is_nullable => 0,
116 sequence => "organism_organism_id_seq",
118 "organism_name",
119 { data_type => "varchar", is_nullable => 1, size => 80 },
120 "common_name_id",
121 { data_type => "bigint", is_foreign_key => 1, is_nullable => 0 },
122 "organism_descrip",
123 { data_type => "text", is_nullable => 1 },
124 "specie_tax",
125 { data_type => "varchar", is_nullable => 1, size => 80 },
126 "genus_tax",
127 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
128 "subfamily_tax",
129 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
130 "family_tax",
131 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
132 "order_tax",
133 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
134 "chr_n_gnmc",
135 { data_type => "integer", is_nullable => 1 },
136 "polypl_gnmc",
137 { data_type => "varchar", is_nullable => 1, size => 50 },
138 "genom_size_gnmc",
139 { data_type => "varchar", is_nullable => 1, size => 50 },
140 "genom_proj_gnmc",
141 { data_type => "text", is_nullable => 1 },
142 "est_attribution_tqmc",
143 { data_type => "text", is_nullable => 1 },
144 "chado_organism_id",
145 { data_type => "integer", is_nullable => 1 },
147 __PACKAGE__->set_primary_key("organism_id");
148 __PACKAGE__->add_unique_constraint("unique_organism_name", ["organism_name"]);
150 =head1 RELATIONS
152 =head2 accessions
154 Type: has_many
156 Related object: L<SGN::Schema::Accession>
158 =cut
160 __PACKAGE__->has_many(
161 "accessions",
162 "SGN::Schema::Accession",
163 { "foreign.organism_id" => "self.organism_id" },
164 { cascade_copy => 0, cascade_delete => 0 },
167 =head2 deprecated_map_crosses
169 Type: has_many
171 Related object: L<SGN::Schema::DeprecatedMapCross>
173 =cut
175 __PACKAGE__->has_many(
176 "deprecated_map_crosses",
177 "SGN::Schema::DeprecatedMapCross",
178 { "foreign.organism_id" => "self.organism_id" },
179 { cascade_copy => 0, cascade_delete => 0 },
182 =head2 order_tax
184 Type: belongs_to
186 Related object: L<SGN::Schema::Taxonomy>
188 =cut
190 __PACKAGE__->belongs_to(
191 "order_tax",
192 "SGN::Schema::Taxonomy",
193 { tax_id => "order_tax" },
195 is_deferrable => 1,
196 join_type => "LEFT",
197 on_delete => "CASCADE",
198 on_update => "CASCADE",
202 =head2 family_tax
204 Type: belongs_to
206 Related object: L<SGN::Schema::Taxonomy>
208 =cut
210 __PACKAGE__->belongs_to(
211 "family_tax",
212 "SGN::Schema::Taxonomy",
213 { tax_id => "family_tax" },
215 is_deferrable => 1,
216 join_type => "LEFT",
217 on_delete => "CASCADE",
218 on_update => "CASCADE",
222 =head2 genus_tax
224 Type: belongs_to
226 Related object: L<SGN::Schema::Taxonomy>
228 =cut
230 __PACKAGE__->belongs_to(
231 "genus_tax",
232 "SGN::Schema::Taxonomy",
233 { tax_id => "genus_tax" },
235 is_deferrable => 1,
236 join_type => "LEFT",
237 on_delete => "CASCADE",
238 on_update => "CASCADE",
242 =head2 subfamily_tax
244 Type: belongs_to
246 Related object: L<SGN::Schema::Taxonomy>
248 =cut
250 __PACKAGE__->belongs_to(
251 "subfamily_tax",
252 "SGN::Schema::Taxonomy",
253 { tax_id => "subfamily_tax" },
255 is_deferrable => 1,
256 join_type => "LEFT",
257 on_delete => "CASCADE",
258 on_update => "CASCADE",
262 =head2 common_name
264 Type: belongs_to
266 Related object: L<SGN::Schema::CommonName>
268 =cut
270 __PACKAGE__->belongs_to(
271 "common_name",
272 "SGN::Schema::CommonName",
273 { common_name_id => "common_name_id" },
274 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
278 # Created by DBIx::Class::Schema::Loader v0.07002 @ 2012-03-03 12:35:39
279 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:P659Eo8bylRSynQff1O2mg
282 # You can replace this text with custom content, and it will be preserved on regeneration