ensembl-hive  2.7.0
DisplayXrefPriority.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::DisplayXrefPriority;
21 
22 =head1 NAME
23 
25 
26 =cut
27 
28 use strict;
29 use warnings;
30 use utf8;
31 
32 use base 'DBIx::Class::Core';
33 
34 =head1 TABLE: C<display_xref_priority>
35 
36 =cut
37 
38 __PACKAGE__->table("display_xref_priority");
39 
40 =head1 ACCESSORS
41 
42 =head2 ensembl_object_type
43 
44  data_type: 'varchar'
45  default_value: (empty string)
46  is_nullable: 0
47  size: 100
48 
49 =head2 source_id
50 
51  data_type: 'integer'
52  extra: {unsigned => 1}
53  is_nullable: 0
54 
55 =head2 priority
56 
57  data_type: 'smallint'
58  extra: {unsigned => 1}
59  is_nullable: 0
60 
61 =cut
62 
63 __PACKAGE__->add_columns(
64  'display_xref_source_id',
65  { data_type => 'integer', extra => { unsigned => 1}, is_nullable => 0, is_auto_increment => 1},
66  "ensembl_object_type",
67  { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 },
68  "source_id",
69  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 },
70  "priority",
71  { data_type => "smallint", extra => { unsigned => 1 }, is_nullable => 0 },
72 );
73 
74 =head1 PRIMARY KEY
75 
76 =over 4
77 
78 =item * L</ensembl_object_type>
79 
80 =item * L</source_id>
81 
82 =back
83 
84 =cut
85 
86 __PACKAGE__->set_primary_key('display_xref_source_id');
87 __PACKAGE__->add_unique_constraint('unique_idx', ["ensembl_object_type", "source_id"]);
88 
89 __PACKAGE__->has_one('source', 'Xref::Schema::Result::Source', 'source_id' );
90 # Can we link ensembl_object_type?
91 
92 1;
Xref::Schema::Result::DisplayXrefPriority
Definition: DisplayXrefPriority.pm:5