|
Revision 406, 0.7 KB
(checked in by eevee, 2 years ago)
|
|
Database refactoring. Renamed columns and tables to be more consistent and more readable. (#58)
|
| Line | |
|---|
| 1 | package Vee::Schema::Abilities; |
|---|
| 2 | |
|---|
| 3 | use strict; |
|---|
| 4 | use warnings; |
|---|
| 5 | use base 'DBIx::Class'; |
|---|
| 6 | |
|---|
| 7 | =head1 NAME |
|---|
| 8 | |
|---|
| 9 | Vee::Schema::Abilities - DBIC class for the C<abilities> table |
|---|
| 10 | |
|---|
| 11 | =cut |
|---|
| 12 | |
|---|
| 13 | __PACKAGE__->load_components('Core'); |
|---|
| 14 | __PACKAGE__->table('abilities'); |
|---|
| 15 | __PACKAGE__->add_columns(qw/ id name blurb_dp description /); |
|---|
| 16 | __PACKAGE__->set_primary_key('id'); |
|---|
| 17 | |
|---|
| 18 | __PACKAGE__->has_many(pokemon_abilities => 'Vee::Schema::PokemonAbilities', 'ability_id'); |
|---|
| 19 | __PACKAGE__->many_to_many(pokemon => 'pokemon_abilities', 'pokemon'); |
|---|
| 20 | |
|---|
| 21 | =head1 SEE ALSO |
|---|
| 22 | |
|---|
| 23 | L<Vee::Schema>, L<DBIx::Class> |
|---|
| 24 | |
|---|
| 25 | =head1 AUTHOR |
|---|
| 26 | |
|---|
| 27 | Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) |
|---|
| 28 | |
|---|
| 29 | See the included F<AUTHORS> file for a full list of contributers. |
|---|
| 30 | |
|---|
| 31 | =head1 LICENSE |
|---|
| 32 | |
|---|
| 33 | See the included F<LICENSE> file. |
|---|
| 34 | |
|---|
| 35 | =cut |
|---|
| 36 | |
|---|
| 37 | 1; |
|---|