ensembl-hive  2.8.1
AltAllele.pm
Go to the documentation of this file.
1 =head1 LICENSE
2 
3 See the NOTICE file distributed with this work for additional information
4 regarding copyright ownership.
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 
18 =cut
19 
20 package Xref::Schema::Result::AltAllele;
21 
22 
23 =head1 NAME
24 
25 Xref::Schema::Result::AltAllele
26 
27 =cut
28 
29 use strict;
30 use warnings;
31 use utf8;
32 
33 use base 'DBIx::Class::Core';
34 
35 =head1 TABLE: C<alt_allele>
36 
37 =cut
38 
39 __PACKAGE__->table("alt_allele");
40 
41 =head1 ACCESSORS
42 
43 =head2 alt_allele_id
44 
45  data_type: 'integer'
46  extra: {unsigned => 1}
47  is_auto_increment: 1
48  is_nullable: 0
49 
50 =head2 gene_id
51 
52  data_type: 'integer'
53  extra: {unsigned => 1}
54  is_nullable: 0
55 
56 =head2 is_reference
57 
58  data_type: 'integer'
59  default_value: 0
60  extra: {unsigned => 1}
61  is_nullable: 1
62 
63 =cut
64 
65 __PACKAGE__->add_columns(
66  "alt_allele_id",
67  {
68  data_type => "integer",
69  extra => { unsigned => 1 },
70  is_auto_increment => 1,
71  is_nullable => 0,
72  },
73  "gene_id",
74  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 },
75  "is_reference",
76  {
77  data_type => "integer",
78  default_value => 0,
79  extra => { unsigned => 1 },
80  is_nullable => 1,
81  },
82 );
83 
84 =head1 UNIQUE CONSTRAINTS
85 
86 =head2 C<allele_idx>
87 
88 =over 4
89 
90 =item * L</alt_allele_id>
91 
92 =item * L</gene_id>
93 
94 =back
95 
96 =cut
97 
98 __PACKAGE__->add_unique_constraint("allele_idx", ["alt_allele_id", "gene_id"]);
99 
100 =head2 C<gene_idx>
101 
102 =over 4
103 
104 =item * L</gene_id>
105 
106 =back
107 
108 =cut
109 
110 # __PACKAGE__->add_unique_constraint("gene_idx", ["gene_id"]);
111 
112 __PACKAGE__->has_one('gene', 'Xref::Schema::Result::GeneStableId', { 'foreign.internal_id' => 'self.gene_id'});
113 
114 1;