Merge pull request #42 from solgenomics/topic/duplicate_image_warning
[cxgn-corelibs.git] / lib / SGN / Schema / Accession.pm
blob9e71e47954744e8389fd96e2bac7a9078d42acfb
1 package SGN::Schema::Accession;
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::Accession
16 =cut
18 __PACKAGE__->table("accession");
20 =head1 ACCESSORS
22 =head2 accession_id
24 data_type: 'integer'
25 is_auto_increment: 1
26 is_nullable: 0
27 sequence: 'accession_accession_id_seq'
29 =head2 organism_id
31 data_type: 'bigint'
32 is_foreign_key: 1
33 is_nullable: 1
35 =head2 common_name
37 data_type: 'varchar'
38 is_nullable: 1
39 size: 80
41 =head2 accession_name_id
43 data_type: 'bigint'
44 is_foreign_key: 1
45 is_nullable: 1
47 =head2 chado_organism_id
49 data_type: 'integer'
50 is_nullable: 1
52 =head2 stock_id
54 data_type: 'integer'
55 is_nullable: 1
57 =cut
59 __PACKAGE__->add_columns(
60 "accession_id",
62 data_type => "integer",
63 is_auto_increment => 1,
64 is_nullable => 0,
65 sequence => "accession_accession_id_seq",
67 "organism_id",
68 { data_type => "bigint", is_foreign_key => 1, is_nullable => 1 },
69 "common_name",
70 { data_type => "varchar", is_nullable => 1, size => 80 },
71 "accession_name_id",
72 { data_type => "bigint", is_foreign_key => 1, is_nullable => 1 },
73 "chado_organism_id",
74 { data_type => "integer", is_nullable => 1 },
75 "stock_id",
76 { data_type => "integer", is_nullable => 1 },
78 __PACKAGE__->set_primary_key("accession_id");
79 __PACKAGE__->add_unique_constraint("unique_accession_name", ["accession_name_id"]);
81 =head1 RELATIONS
83 =head2 organism
85 Type: belongs_to
87 Related object: L<SGN::Schema::Organism>
89 =cut
91 __PACKAGE__->belongs_to(
92 "organism",
93 "SGN::Schema::Organism",
94 { organism_id => "organism_id" },
96 is_deferrable => 1,
97 join_type => "LEFT",
98 on_delete => "CASCADE",
99 on_update => "CASCADE",
103 =head2 accession_name
105 Type: belongs_to
107 Related object: L<SGN::Schema::AccessionName>
109 =cut
111 __PACKAGE__->belongs_to(
112 "accession_name",
113 "SGN::Schema::AccessionName",
114 { accession_name_id => "accession_name_id" },
116 is_deferrable => 1,
117 join_type => "LEFT",
118 on_delete => "CASCADE",
119 on_update => "CASCADE",
123 =head2 accession_names
125 Type: has_many
127 Related object: L<SGN::Schema::AccessionName>
129 =cut
131 __PACKAGE__->has_many(
132 "accession_names",
133 "SGN::Schema::AccessionName",
134 { "foreign.accession_id" => "self.accession_id" },
135 { cascade_copy => 0, cascade_delete => 0 },
138 =head2 map_ancestors
140 Type: has_many
142 Related object: L<SGN::Schema::Map>
144 =cut
146 __PACKAGE__->has_many(
147 "map_ancestors",
148 "SGN::Schema::Map",
149 { "foreign.ancestor" => "self.accession_id" },
150 { cascade_copy => 0, cascade_delete => 0 },
153 =head2 map_parent_2s
155 Type: has_many
157 Related object: L<SGN::Schema::Map>
159 =cut
161 __PACKAGE__->has_many(
162 "map_parent_2s",
163 "SGN::Schema::Map",
164 { "foreign.parent_2" => "self.accession_id" },
165 { cascade_copy => 0, cascade_delete => 0 },
168 =head2 map_parent_1s
170 Type: has_many
172 Related object: L<SGN::Schema::Map>
174 =cut
176 __PACKAGE__->has_many(
177 "map_parent_1s",
178 "SGN::Schema::Map",
179 { "foreign.parent_1" => "self.accession_id" },
180 { cascade_copy => 0, cascade_delete => 0 },
183 =head2 pcr_exp_accessions
185 Type: has_many
187 Related object: L<SGN::Schema::PcrExpAccession>
189 =cut
191 __PACKAGE__->has_many(
192 "pcr_exp_accessions",
193 "SGN::Schema::PcrExpAccession",
194 { "foreign.accession_id" => "self.accession_id" },
195 { cascade_copy => 0, cascade_delete => 0 },
199 # Created by DBIx::Class::Schema::Loader v0.07002 @ 2012-03-03 12:32:42
200 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:838fnA2hrzzcn5PKEGLZRA
203 # You can replace this text with custom content, and it will be preserved on regeneration