| 1 | package Bracket::Schema::Result::Role; | ||
| 2 | |||
| 3 | # Created by DBIx::Class::Schema::Loader | ||
| 4 | # DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
| 5 | |||
| 6 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 4 | ▶ | use base 'DBIx::Class::Core'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | |||
| 12 | =head1 NAME | ||
| 13 | |||
| 14 | Bracket::Schema::Result::Role | ||
| 15 | |||
| 16 | =cut | ||
| 17 | |||
| 18 | 4 | __PACKAGE__->table("role"); | |
| 19 | |||
| 20 | =head1 ACCESSORS | ||
| 21 | |||
| 22 | =head2 id | ||
| 23 | |||
| 24 | data_type: INT | ||
| 25 | default_value: undef | ||
| 26 | is_auto_increment: 1 | ||
| 27 | is_nullable: 0 | ||
| 28 | size: 11 | ||
| 29 | |||
| 30 | =head2 role | ||
| 31 | |||
| 32 | data_type: VARCHAR | ||
| 33 | default_value: undef | ||
| 34 | is_nullable: 1 | ||
| 35 | size: 32 | ||
| 36 | |||
| 37 | =cut | ||
| 38 | |||
| 39 | 4 | __PACKAGE__->add_columns( | |
| 40 | "id", | ||
| 41 | { | ||
| 42 | data_type => "INT", | ||
| 43 | default_value => undef, | ||
| 44 | is_auto_increment => 1, | ||
| 45 | is_nullable => 0, | ||
| 46 | size => 11, | ||
| 47 | }, | ||
| 48 | "role", | ||
| 49 | { | ||
| 50 | data_type => "VARCHAR", | ||
| 51 | default_value => undef, | ||
| 52 | is_nullable => 1, | ||
| 53 | size => 32, | ||
| 54 | }, | ||
| 55 | ); | ||
| 56 | 4 | __PACKAGE__->set_primary_key("id"); | |
| 57 | 4 | __PACKAGE__->add_unique_constraint("role_name_UNIQ", ["role"]); | |
| 58 | |||
| 59 | =head1 RELATIONS | ||
| 60 | |||
| 61 | =head2 player_roles | ||
| 62 | |||
| 63 | Type: has_many | ||
| 64 | |||
| 65 | Related object: L<Bracket::Schema::Result::PlayerRole> | ||
| 66 | |||
| 67 | =cut | ||
| 68 | |||
| 69 | 4 | __PACKAGE__->has_many( | |
| 70 | "player_roles", | ||
| 71 | "Bracket::Schema::Result::PlayerRole", | ||
| 72 | { "foreign.role" => "self.id" }, | ||
| 73 | ); | ||
| 74 | |||
| 75 | |||
| 76 | # Created by DBIx::Class::Schema::Loader v0.05003 @ 2010-03-17 12:15:08 | ||
| 77 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wtNPV2NOLB6IEKVJm0rsTw | ||
| 78 | |||
| 79 | |||
| 80 | # You can replace this text with custom content, and it will be preserved on regeneration | ||
| 81 | 4 | 1; | |