Merge pull request #42 from solgenomics/topic/duplicate_image_warning
[cxgn-corelibs.git] / lib / SGN / Schema / Clone.pm
blob0df7a69b06fd8ce685e04331b847262dec795f6e
1 package SGN::Schema::Clone;
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::Clone
16 =cut
18 __PACKAGE__->table("clone");
20 =head1 ACCESSORS
22 =head2 clone_id
24 data_type: 'integer'
25 is_auto_increment: 1
26 is_nullable: 0
27 sequence: 'clone_clone_id_seq'
29 =head2 library_id
31 data_type: 'integer'
32 is_foreign_key: 1
33 is_nullable: 1
35 =head2 clone_name
37 data_type: 'varchar'
38 is_nullable: 1
39 size: 50
41 =head2 clone_group_id
43 data_type: 'integer'
44 is_nullable: 1
46 =cut
48 __PACKAGE__->add_columns(
49 "clone_id",
51 data_type => "integer",
52 is_auto_increment => 1,
53 is_nullable => 0,
54 sequence => "clone_clone_id_seq",
56 "library_id",
57 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
58 "clone_name",
59 { data_type => "varchar", is_nullable => 1, size => 50 },
60 "clone_group_id",
61 { data_type => "integer", is_nullable => 1 },
63 __PACKAGE__->set_primary_key("clone_id");
64 __PACKAGE__->add_unique_constraint("clone_name_library_id_unique", ["clone_name", "library_id"]);
65 __PACKAGE__->add_unique_constraint("library_id_clone_name_key", ["library_id", "clone_name"]);
67 =head1 RELATIONS
69 =head2 library
71 Type: belongs_to
73 Related object: L<SGN::Schema::Library>
75 =cut
77 __PACKAGE__->belongs_to(
78 "library",
79 "SGN::Schema::Library",
80 { library_id => "library_id" },
82 is_deferrable => 1,
83 join_type => "LEFT",
84 on_delete => "CASCADE",
85 on_update => "CASCADE",
89 =head2 seqreads
91 Type: has_many
93 Related object: L<SGN::Schema::Seqread>
95 =cut
97 __PACKAGE__->has_many(
98 "seqreads",
99 "SGN::Schema::Seqread",
100 { "foreign.clone_id" => "self.clone_id" },
101 { cascade_copy => 0, cascade_delete => 0 },
105 # Created by DBIx::Class::Schema::Loader v0.07002 @ 2012-03-03 12:32:42
106 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qHcI1QlJSTctgHcs6FedCg
109 # You can replace this text with custom content, and it will be preserved on regeneration