Changeset 350 for veekun/trunk/lib/Vee/Schema
- Timestamp:
- 10/23/07 01:30:10 (2 years ago)
- Location:
- veekun/trunk/lib/Vee/Schema
- Files:
-
- 36 modified
-
Abilities.pm (modified) (1 diff)
-
Berries.pm (modified) (1 diff)
-
ContestMoves.pm (modified) (1 diff)
-
Creators.pm (modified) (1 diff)
-
Edits.pm (modified) (1 diff)
-
ErrorLog.pm (modified) (1 diff)
-
EvChains.pm (modified) (3 diffs)
-
FlavorText.pm (modified) (1 diff)
-
Forums.pm (modified) (1 diff)
-
Gallery.pm (modified) (1 diff)
-
GalleryKeywords.pm (modified) (1 diff)
-
GroupPermissions.pm (modified) (1 diff)
-
Groups.pm (modified) (1 diff)
-
ItemKeywords.pm (modified) (1 diff)
-
Items.pm (modified) (5 diffs)
-
LocationEncounters.pm (modified) (2 diffs)
-
Locations.pm (modified) (1 diff)
-
Machines.pm (modified) (1 diff)
-
Messages.pm (modified) (1 diff)
-
MoveEffects.pm (modified) (1 diff)
-
Moves.pm (modified) (6 diffs)
-
Permissions.pm (modified) (1 diff)
-
PokeMoves.pm (modified) (1 diff)
-
Pokemon.pm (modified) (6 diffs)
-
PokemonAbilities.pm (modified) (1 diff)
-
PokemonBreeds.pm (modified) (1 diff)
-
PokemonItems.pm (modified) (1 diff)
-
Posts.pm (modified) (2 diffs)
-
Sessions.pm (modified) (1 diff)
-
Shoutbox.pm (modified) (1 diff)
-
ThreadViews.pm (modified) (2 diffs)
-
Threads.pm (modified) (4 diffs)
-
Types.pm (modified) (1 diff)
-
UserGroups.pm (modified) (1 diff)
-
UserPermissions.pm (modified) (1 diff)
-
Users.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/lib/Vee/Schema/Abilities.pm
r109 r350 1 1 package Vee::Schema::Abilities; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("abilities"); 12 __PACKAGE__->add_columns("id", "name", "gameblurb", "effect"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 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 gameblurb effect /); 16 __PACKAGE__->set_primary_key('id'); 15 17 16 18 __PACKAGE__->has_many(pokemon_abilities => 'Vee::Schema::PokemonAbilities', 'abilityid'); 17 19 __PACKAGE__->many_to_many(pokemon => 'pokemon_abilities', 'pokemon'); 18 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 19 37 1; 20 -
veekun/trunk/lib/Vee/Schema/Berries.pm
r212 r350 1 1 package Vee::Schema::Berries; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("berries"); 7 =head1 NAME 8 9 Vee::Schema::Berries - DBIC class for the C<berries> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('berries'); 12 15 __PACKAGE__->add_columns(qw/ id size firmness max_harvest growth_time soil_dryness spicy dry sweet bitter sour smoothness /); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 16 __PACKAGE__->set_primary_key('id'); 15 17 16 18 __PACKAGE__->belongs_to(item => 'Vee::Schema::Items', { 'foreign.berry_id' => 'self.id' }); 17 19 20 =head1 SEE ALSO 21 22 L<Vee::Schema>, L<DBIx::Class> 23 24 =head1 AUTHOR 25 26 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 27 28 See the included F<AUTHORS> file for a full list of contributers. 29 30 =head1 LICENSE 31 32 See the included F<LICENSE> file. 33 34 =cut 35 18 36 1; 19 -
veekun/trunk/lib/Vee/Schema/ContestMoves.pm
r31 r350 1 1 package Vee::Schema::ContestMoves; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("contestmoves"); 12 __PACKAGE__->add_columns("id", "appeal", "jam", "description", "effect"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::ContestMoves - DBIC class for the C<contestmoves> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('contestmoves'); 15 __PACKAGE__->add_columns(qw/ id appeal jam description effect /); 16 __PACKAGE__->set_primary_key('id'); 17 18 =head1 SEE ALSO 19 20 L<Vee::Schema>, L<DBIx::Class> 21 22 =head1 AUTHOR 23 24 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 25 26 See the included F<AUTHORS> file for a full list of contributers. 27 28 =head1 LICENSE 29 30 See the included F<LICENSE> file. 31 32 =cut 15 33 16 34 1; 17 -
veekun/trunk/lib/Vee/Schema/Creators.pm
r31 r350 1 1 package Vee::Schema::Creators; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("creators"); 12 __PACKAGE__->add_columns("id", "userid", "name", "itemct"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint("userid", ["userid"]); 15 __PACKAGE__->add_unique_constraint(["userid"], undef); 16 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Creators - DBIC class for the C<creators> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('creators'); 15 __PACKAGE__->add_columns(qw/ id userid name itemct /); 16 __PACKAGE__->set_primary_key('id'); 17 __PACKAGE__->add_unique_constraint(userid => ['userid']); 18 19 =head1 SEE ALSO 20 21 L<Vee::Schema>, L<DBIx::Class> 22 23 =head1 AUTHOR 24 25 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 26 27 See the included F<AUTHORS> file for a full list of contributers. 28 29 =head1 LICENSE 30 31 See the included F<LICENSE> file. 32 33 =cut 17 34 18 35 1; 19 -
veekun/trunk/lib/Vee/Schema/Edits.pm
r31 r350 1 1 package Vee::Schema::Edits; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("edits"); 12 __PACKAGE__->add_columns("id", "postid", "userid", "time", "oldmessage"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 15 8 16 #__PACKAGE__->belongs_to(post => 'Vee::Schema::Posts', 'postid'); 17 #__PACKAGE__->belongs_to(user => 'Vee::Schema::Users', 'userid'); 18 # have to use might_have because more often than not there is no edit row for a post and that fucks everything up 9 Vee::Schema::Edits - DBIC class for the C<edits> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('edits'); 15 __PACKAGE__->add_columns(qw/ id postid userid time oldmessage /); 16 __PACKAGE__->set_primary_key('id'); 19 17 20 18 __PACKAGE__->might_have(post => 'Vee::Schema::Posts', { 'foreign.id' => 'self.postid' }); 21 19 __PACKAGE__->might_have(user => 'Vee::Schema::Users', { 'foreign.id' => 'self.userid' }); 22 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 23 37 1; 24 -
veekun/trunk/lib/Vee/Schema/ErrorLog.pm
r31 r350 1 1 package Vee::Schema::ErrorLog; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("errorlog"); 12 __PACKAGE__->add_columns("id", "time", "userid", "ip", "path", "method", "query", "error"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::ErrorLog - DBIC class for the C<errorlog> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('errorlog'); 15 __PACKAGE__->add_columns(qw/ id time userid ip path method query error /); 16 __PACKAGE__->set_primary_key('id'); 17 18 =head1 SEE ALSO 19 20 L<Vee::Schema>, L<DBIx::Class> 21 22 =head1 AUTHOR 23 24 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 25 26 See the included F<AUTHORS> file for a full list of contributers. 27 28 =head1 LICENSE 29 30 See the included F<LICENSE> file. 31 32 =cut 15 33 16 34 1; -
veekun/trunk/lib/Vee/Schema/EvChains.pm
r313 r350 1 1 package Vee::Schema::EvChains; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 … … 15 12 # only because that's not a real chain anyway. 16 13 17 __PACKAGE__->load_components("PK::Auto", "Core"); 18 __PACKAGE__->table("evchains"); 19 __PACKAGE__->add_columns( 20 "id", 21 "base", 22 "growth", 23 "chain", 24 "steps", 25 "babygs", 26 "babyc", 27 "babyrusa", 28 "baby_item", 29 ); 30 __PACKAGE__->set_primary_key("id"); 31 __PACKAGE__->add_unique_constraint(["id"], undef); 14 =head1 NAME 15 16 Vee::Schema::EvChains - DBIC class for the C<evchains> table 17 18 =cut 19 20 __PACKAGE__->load_components('Core'); 21 __PACKAGE__->table('evchains'); 22 __PACKAGE__->add_columns(qw/ 23 id 24 base 25 growth 26 chain 27 steps 28 29 babygs 30 babyc 31 babyrusa 32 33 baby_item 34 /); 35 __PACKAGE__->set_primary_key('id'); 32 36 33 37 __PACKAGE__->has_many(pokemon => 'Vee::Schema::Pokemon', 'evid'); … … 35 39 __PACKAGE__->belongs_to(base_pokemon => 'Vee::Schema::Pokemon', 'base'); 36 40 41 =head1 SEE ALSO 42 43 L<Vee::Schema>, L<DBIx::Class> 44 45 =head1 AUTHOR 46 47 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 48 49 See the included F<AUTHORS> file for a full list of contributers. 50 51 =head1 LICENSE 52 53 See the included F<LICENSE> file. 54 55 =cut 56 37 57 1; -
veekun/trunk/lib/Vee/Schema/FlavorText.pm
r31 r350 3 3 use strict; 4 4 use warnings; 5 6 5 use base 'DBIx::Class'; 7 6 8 __PACKAGE__->load_components("PK::Auto", "Core"); 9 __PACKAGE__->table("flavortext"); 10 __PACKAGE__->add_columns("pokeid", "generation", "text"); 7 =head1 NAME 8 9 Vee::Schema::FlavorText - DBIC class for the C<flavortext> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('flavortext'); 15 __PACKAGE__->add_columns(qw/ pokeid generation text /); 11 16 12 17 __PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 13 18 19 =head1 SEE ALSO 20 21 L<Vee::Schema>, L<DBIx::Class> 22 23 =head1 AUTHOR 24 25 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 26 27 See the included F<AUTHORS> file for a full list of contributers. 28 29 =head1 LICENSE 30 31 See the included F<LICENSE> file. 32 33 =cut 34 14 35 1; -
veekun/trunk/lib/Vee/Schema/Forums.pm
r31 r350 1 1 package Vee::Schema::Forums; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("forums"); 12 __PACKAGE__->add_columns("id", "name", "lastpostid", "threadct", "postct", "flags", "accessibility", "blurb"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Forums - DBIC class for the C<forums> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('forums'); 15 __PACKAGE__->add_columns(qw/ 16 id name lastpostid threadct postct flags accessibility blurb 17 /); 18 __PACKAGE__->set_primary_key('id'); 15 19 16 20 __PACKAGE__->has_many(threads => 'Vee::Schema::Threads', 'forumid'); 17 21 __PACKAGE__->might_have(lastpost => 'Vee::Schema::Posts', { 'foreign.id' => 'self.lastpostid' }); 18 22 23 =head1 SEE ALSO 24 25 L<Vee::Schema>, L<DBIx::Class> 26 27 =head1 AUTHOR 28 29 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 30 31 See the included F<AUTHORS> file for a full list of contributers. 32 33 =head1 LICENSE 34 35 See the included F<LICENSE> file. 36 37 =cut 38 19 39 1; 20 -
veekun/trunk/lib/Vee/Schema/Gallery.pm
r31 r350 1 1 package Vee::Schema::Gallery; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("gallery"); 12 __PACKAGE__->add_columns( 13 "id", 14 "creatorid", 15 "filename", 16 "uploaderid", 17 "approverid", 18 "time", 19 "hash", 20 "title", 21 "description", 22 "height", 23 "width", 24 "seriesid", 25 "position", 26 "type", 27 ); 28 __PACKAGE__->set_primary_key("id"); 29 __PACKAGE__->add_unique_constraint("filename", ["filename"]); 30 __PACKAGE__->add_unique_constraint(["filename"], undef); 31 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Gallery - DBIC class for the C<gallery> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('gallery'); 15 __PACKAGE__->add_columns(qw/ 16 id 17 creatorid 18 filename 19 uploaderid 20 approverid 21 time 22 hash 23 title 24 description 25 height 26 width 27 seriesid 28 position 29 type 30 /); 31 __PACKAGE__->set_primary_key('id'); 32 __PACKAGE__->add_unique_constraint(filename => ['filename']); 33 34 =head1 SEE ALSO 35 36 L<Vee::Schema>, L<DBIx::Class> 37 38 =head1 AUTHOR 39 40 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 41 42 See the included F<AUTHORS> file for a full list of contributers. 43 44 =head1 LICENSE 45 46 See the included F<LICENSE> file. 47 48 =cut 32 49 33 50 1; 34 -
veekun/trunk/lib/Vee/Schema/GalleryKeywords.pm
r31 r350 1 1 package Vee::Schema::GalleryKeywords; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("gallerykeywords"); 12 __PACKAGE__->add_columns("id", "keyword", "category", "description"); 13 __PACKAGE__->set_primary_key("id"); 7 =head1 NAME 8 9 Vee::Schema::GalleryKeywords - DBIC class for the C<gallerykeywords> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('gallerykeywords'); 15 __PACKAGE__->add_columns(qw/ id keyword category description /); 16 __PACKAGE__->set_primary_key('id'); 14 17 __PACKAGE__->add_unique_constraint("keyword", ["keyword"]); 15 __PACKAGE__->add_unique_constraint(["keyword"], undef); 16 __PACKAGE__->add_unique_constraint(["id"], undef); 18 19 =head1 SEE ALSO 20 21 L<Vee::Schema>, L<DBIx::Class> 22 23 =head1 AUTHOR 24 25 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 26 27 See the included F<AUTHORS> file for a full list of contributers. 28 29 =head1 LICENSE 30 31 See the included F<LICENSE> file. 32 33 =cut 17 34 18 35 1; 19 -
veekun/trunk/lib/Vee/Schema/GroupPermissions.pm
r31 r350 1 1 package Vee::Schema::GroupPermissions; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("grouppermissions"); 12 __PACKAGE__->add_columns("groupid", "permission", "scope", "polarity"); 13 __PACKAGE__->set_primary_key("groupid", "permission", "scope"); 14 __PACKAGE__->add_unique_constraint(["groupid", "permission", "scope"], undef); 7 =head1 NAME 8 9 Vee::Schema::GroupPermissions - DBIC class for the C<grouppermissions> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('grouppermissions'); 15 __PACKAGE__->add_columns(qw/ groupid permission scope polarity /); 16 __PACKAGE__->set_primary_key(qw/ groupid permission scope /); 15 17 16 18 1; -
veekun/trunk/lib/Vee/Schema/Groups.pm
r31 r350 1 1 package Vee::Schema::Groups; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("groups"); 12 __PACKAGE__->add_columns("id", "icon", "name"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Groups - DBIC class for the C<groups> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('groups'); 15 __PACKAGE__->add_columns(qw/ id icon name /); 16 __PACKAGE__->set_primary_key('id'); 15 17 16 18 __PACKAGE__->has_many(user_groups => 'Vee::Schema::UserGroups', 'groupid'); -
veekun/trunk/lib/Vee/Schema/ItemKeywords.pm
r31 r350 1 1 package Vee::Schema::ItemKeywords; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("itemkeywords"); 12 __PACKAGE__->add_columns("itemid", "keywordid"); 13 __PACKAGE__->set_primary_key("itemid", "keywordid"); 14 __PACKAGE__->add_unique_constraint(["itemid", "keywordid"], undef); 7 =head1 NAME 8 9 Vee::Schema::ItemKeywords - DBIC class for the C<itemkeywords> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('itemkeywords'); 15 __PACKAGE__->add_columns(qw/ itemid keywordid /); 16 __PACKAGE__->set_primary_key(qw/ itemid keywordid /); 17 18 =head1 SEE ALSO 19 20 L<Vee::Schema>, L<DBIx::Class> 21 22 =head1 AUTHOR 23 24 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 25 26 See the included F<AUTHORS> file for a full list of contributers. 27 28 =head1 LICENSE 29 30 See the included F<LICENSE> file. 31 32 =cut 15 33 16 34 1; 17 -
veekun/trunk/lib/Vee/Schema/Items.pm
r315 r350 1 1 package Vee::Schema::Items; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("items"); 7 =head1 NAME 8 9 Vee::Schema::Items - DBIC class for the C<items> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('items'); 12 15 __PACKAGE__->add_columns(qw/ id game_id berry_id name category cost col5 hp_plus_maybe fling_power fling_effect natural_gift_power natural_gift_type col12 col13 col14 col15 col16 col17 col18 col19 col20 col21 col22 col23 effort_hp effort_at effort_de effort_sp effort_sa effort_sd hp_restored pp_restored happiness1 happiness2 happiness3 is_underground dpblurb description /); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 16 __PACKAGE__->set_primary_key('id'); 15 17 16 18 __PACKAGE__->has_many(pokemon_items => 'Vee::Schema::PokemonItems', 'item_id', { join_type => 'left' }); … … 18 20 19 21 __PACKAGE__->might_have(berry => 'Vee::Schema::Berries', { 'foreign.id' => 'self.berry_id' }); 22 23 =head1 METHODS 24 25 =head2 display_name 26 27 Returns this item's name, suitable for display. This method actually just 28 replaces 'Poke' with 'Poké', as the database is not currently designed 29 for Unicode. 30 31 =cut 20 32 21 33 sub display_name { … … 26 38 return $name; 27 39 } 40 41 =head2 display_name 42 43 Returns the filename (sans extension) for this item's sprite. 44 45 =cut 28 46 29 47 sub sprite_name { … … 39 57 } 40 58 59 =head2 fling_description 60 61 Returns the effect this item will cause when Fling is used with it. 62 63 =cut 64 41 65 sub fling_description { 42 66 my ($self) = @_; … … 51 75 } 52 76 77 =head1 SEE ALSO 78 79 L<Vee::Schema>, L<DBIx::Class> 80 81 =head1 AUTHOR 82 83 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 84 85 See the included F<AUTHORS> file for a full list of contributers. 86 87 =head1 LICENSE 88 89 See the included F<LICENSE> file. 90 91 =cut 92 53 93 1; 54 -
veekun/trunk/lib/Vee/Schema/LocationEncounters.pm
r109 r350 3 3 use strict; 4 4 use warnings; 5 6 5 use base 'DBIx::Class'; 7 6 8 __PACKAGE__->load_components(qw/ PK::Auto Core /); 7 =head1 NAME 8 9 Vee::Schema::LocationEncounters - DBIC class for the C<location_encounters> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 9 14 __PACKAGE__->table('location_encounters'); 10 15 __PACKAGE__->add_columns(qw/ location_id rarity version section pokemon_id method min_level max_level /); 11 __PACKAGE__->set_primary_key('location_id', 'rarity'); 12 __PACKAGE__->add_unique_constraint(['location_id', 'rarity'], undef); 16 __PACKAGE__->set_primary_key(qw/ location_id rarity /); 13 17 14 18 __PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokemon_id'); 15 19 __PACKAGE__->belongs_to(location => 'Vee::Schema::Locations', 'location_id'); 16 20 17 # what can I say? I'm lazy 21 =head1 METHODS 22 23 =head2 level 24 25 Returns this encounter's level range formatted in a human-readable way, i.e. 26 "A - B", or just "A" if the range is actually just one level. 27 28 =cut 29 18 30 sub level { 19 31 my ($self) = @_; … … 31 43 } 32 44 45 =head1 SEE ALSO 46 47 L<Vee::Schema>, L<DBIx::Class> 48 49 =head1 AUTHOR 50 51 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 52 53 See the included F<AUTHORS> file for a full list of contributers. 54 55 =head1 LICENSE 56 57 See the included F<LICENSE> file. 58 59 =cut 60 33 61 1; -
veekun/trunk/lib/Vee/Schema/Locations.pm
r62 r350 1 1 package Vee::Schema::Locations; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components(qw/ PK::Auto Core /); 7 =head1 NAME 8 9 Vee::Schema::Locations - DBIC class for the C<locations> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 11 14 __PACKAGE__->table('locations'); 12 15 __PACKAGE__->add_columns(qw/ id internal_id generation name coordinates /); 13 16 __PACKAGE__->set_primary_key('id'); 14 __PACKAGE__->add_unique_constraint(['id'], undef);15 17 16 18 __PACKAGE__->has_many(encounters => 'Vee::Schema::LocationEncounters', 'location_id'); 17 19 20 =head1 SEE ALSO 21 22 L<Vee::Schema>, L<DBIx::Class> 23 24 =head1 AUTHOR 25 26 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 27 28 See the included F<AUTHORS> file for a full list of contributers. 29 30 =head1 LICENSE 31 32 See the included F<LICENSE> file. 33 34 =cut 35 18 36 1; -
veekun/trunk/lib/Vee/Schema/Machines.pm
r31 r350 1 1 package Vee::Schema::Machines; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("machines"); 12 __PACKAGE__->add_columns("id", "generation", "cost", "moveid", "location"); 13 __PACKAGE__->set_primary_key("id", "generation"); 14 __PACKAGE__->add_unique_constraint(["id", "generation"], undef); 7 =head1 NAME 8 9 Vee::Schema::Machines - DBIC class for the C<machines> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('machines'); 15 __PACKAGE__->add_columns(qw/ id generation cost moveid location /); 16 __PACKAGE__->set_primary_key(qw/ id generation /); 17 18 =head1 SEE ALSO 19 20 L<Vee::Schema>, L<DBIx::Class> 21 22 =head1 AUTHOR 23 24 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 25 26 See the included F<AUTHORS> file for a full list of contributers. 27 28 =head1 LICENSE 29 30 See the included F<LICENSE> file. 31 32 =cut 15 33 16 34 1; 17 -
veekun/trunk/lib/Vee/Schema/Messages.pm
r31 r350 3 3 use strict; 4 4 use warnings; 5 6 5 use base 'DBIx::Class'; 7 6 8 __PACKAGE__->load_components("PK::Auto", "Core"); 9 __PACKAGE__->table("messages"); 10 __PACKAGE__->add_columns("id", "from_user_id", "to_user_id", "time", "subject", "message"); 11 __PACKAGE__->set_primary_key("id"); 12 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Messages - DBIC class for the C<messages> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('messages'); 15 __PACKAGE__->add_columns(qw/ id from_user_id to_user_id time subject message /); 16 __PACKAGE__->set_primary_key('id'); 13 17 14 18 __PACKAGE__->belongs_to(recipient => 'Vee::Schema::Users', 'to_user_id'); 15 19 __PACKAGE__->might_have(sender => 'Vee::Schema::Users', { 'foreign.id' => 'self.from_user_id' }); 16 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 17 37 1; 18 -
veekun/trunk/lib/Vee/Schema/MoveEffects.pm
r145 r350 1 1 package Vee::Schema::MoveEffects; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("move_effects"); 12 __PACKAGE__->add_columns( 13 "id", 14 "priority", 15 "blurb", 16 "description", 17 );18 __PACKAGE__-> set_primary_key("id");19 __PACKAGE__-> add_unique_constraint(["id"], undef);7 =head1 NAME 8 9 Vee::Schema::MoveEffects - DBIC class for the C<move_effects> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('move_effects'); 15 __PACKAGE__->add_columns(qw/ id priority blurb description /); 16 __PACKAGE__->set_primary_key('id'); 20 17 21 18 __PACKAGE__->has_many(moves => 'Vee::Schema::Moves', 'move_effect_id'); 22 19 20 =head1 SEE ALSO 21 22 L<Vee::Schema>, L<DBIx::Class> 23 24 =head1 AUTHOR 25 26 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 27 28 See the included F<AUTHORS> file for a full list of contributers. 29 30 =head1 LICENSE 31 32 See the included F<LICENSE> file. 33 34 =cut 35 23 36 1; -
veekun/trunk/lib/Vee/Schema/Moves.pm
r148 r350 1 1 package Vee::Schema::Moves; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("moves"); 12 __PACKAGE__->add_columns( 13 "id", 14 "name", 15 "name_jp", 16 "name_romaji", 17 "type", 18 "power", 19 "pp", 20 "acc", 21 "target", 22 "class", 23 "flags", 24 "combos", 25 "effect_chance", 26 "kind", 27 "status", 28 "move_effect_id", 29 "gameblurb", 30 "dpblurb", 31 "contype", 32 "coneffect", 33 "notes", 34 ); 35 __PACKAGE__->set_primary_key("id"); 36 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Moves - DBIC class for the C<moves> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('moves'); 15 __PACKAGE__->add_columns(qw/ 16 id 17 name 18 name_jp 19 name_romaji 20 type 21 power 22 pp 23 acc 24 target 25 class 26 flags 27 combos 28 effect_chance 29 kind 30 status 31 move_effect_id 32 gameblurb 33 dpblurb 34 contype 35 coneffect 36 notes 37 /); 38 __PACKAGE__->set_primary_key('id'); 37 39 38 40 __PACKAGE__->belongs_to(contest => 'Vee::Schema::ContestMoves', 'coneffect'); … … 40 42 __PACKAGE__->has_many(pokemoves => 'Vee::Schema::PokeMoves', 'moveid'); 41 43 42 # Laziness to make %MoveData easier to use 44 =head1 METHODS 45 46 =head2 priority 47 48 Returns the priority of the given move. Only exists for consistency, as this 49 is the only data commonly accessed via C<%MoveData> that is actually a column 50 of C<move_effects>. 51 52 =cut 53 43 54 sub priority { 44 55 my ($self) = @_; … … 46 57 } 47 58 48 # Shortcut to get a preformatted move description 59 =head2 description 60 61 Returns the full description for this move. Applies C<_format_description> 62 effects, and converts tab-delimited tables to HTML. 63 64 =cut 65 49 66 sub description { 50 67 my ($self) = @_; … … 71 88 } 72 89 73 # Shortcut to get a preformatted short move description, defaulting to the long 74 # one 90 =head2 blurb 91 92 Returns a short blurb for this move, suitable for putting in a move table. 93 Applies C<_format_description> effects. 94 95 If this move's move effect has no blurb, the full description will be used 96 instead. This should no longer happen, but was necessary for some degree of 97 completion when the blurbs were still being written. 98 99 =cut 100 75 101 sub blurb { 76 102 my ($self) = @_; … … 81 107 } 82 108 83 # PRIVATE 109 =head2 _format_description($text) 84 110 85 # Clean up a move description; currently just inserts effect chance. 111 Inserts this move's effect chance and priority into the provided string, if 112 applicable. Used by C<description> and C<blurb>. 113 114 =cut 115 86 116 sub _format_description { 87 117 my ($self, $text) = @_; … … 100 130 } 101 131 132 =head1 SEE ALSO 133 134 L<Vee::Schema>, L<DBIx::Class> 135 136 =head1 AUTHOR 137 138 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 139 140 See the included F<AUTHORS> file for a full list of contributers. 141 142 =head1 LICENSE 143 144 See the included F<LICENSE> file. 145 146 =cut 147 102 148 1; -
veekun/trunk/lib/Vee/Schema/Permissions.pm
r31 r350 1 1 package Vee::Schema::Permissions; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("permissions"); 12 __PACKAGE__->add_columns("groupid", "permission", "scope", "polarity"); 13 __PACKAGE__->set_primary_key("groupid", "permission", "scope", "polarity"); 14 __PACKAGE__->add_unique_constraint(["groupid", "permission", "scope", "polarity"], undef); 7 =head1 NAME 8 9 Vee::Schema::Permissions - DBIC class for the C<permissions> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('permissions'); 15 __PACKAGE__->add_columns(qw/ groupid permission scope polarity /); 16 __PACKAGE__->set_primary_key(qw/ groupid permission scope polarity /); 17 18 =head1 SEE ALSO 19 20 L<Vee::Schema>, L<DBIx::Class> 21 22 =head1 AUTHOR 23 24 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 25 26 See the included F<AUTHORS> file for a full list of contributers. 27 28 =head1 LICENSE 29 30 See the included F<LICENSE> file. 31 32 =cut 15 33 16 34 1; 17 -
veekun/trunk/lib/Vee/Schema/PokeMoves.pm
r329 r350 1 1 package Vee::Schema::PokeMoves; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("pokemoves"); 12 __PACKAGE__->add_columns("pokeid", "moveid", "level", "version", "method"); 7 =head1 NAME 8 9 Vee::Schema::PokeMoves - DBIC class for the C<pokemoves> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('pokemoves'); 15 __PACKAGE__->add_columns(qw/ pokeid moveid level version method /); 13 16 14 17 __PACKAGE__->set_primary_key(qw/ pokeid moveid level version method /); 15 __PACKAGE__->add_unique_constraint([qw[ pokeid moveid level version method ]], undef);16 18 17 19 __PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 18 20 __PACKAGE__->belongs_to(move => 'Vee::Schema::Moves', 'moveid'); 19 21 22 =head1 SEE ALSO 23 24 L<Vee::Schema>, L<DBIx::Class> 25 26 =head1 AUTHOR 27 28 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 29 30 See the included F<AUTHORS> file for a full list of contributers. 31 32 =head1 LICENSE 33 34 See the included F<LICENSE> file. 35 36 =cut 37 20 38 1; -
veekun/trunk/lib/Vee/Schema/Pokemon.pm
r329 r350 1 1 package Vee::Schema::Pokemon; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; … … 7 5 use base 'DBIx::Class'; 8 6 9 __PACKAGE__->load_components("PK::Auto", "Core"); 10 __PACKAGE__->table("pokemon"); 11 __PACKAGE__->add_columns( 12 "id", 13 "id_johto", 14 "id_hoenn", 15 "id_sinnoh", 16 "name", 17 "alt_form", 18 "name_jp", 19 "name_romaji", 20 "evid", 21 "evparent", 22 "evmethod", 23 "evparam", 24 "height", 25 "weight", 26 "type1", 27 "type2", 28 "species", 29 "color", 30 "habitat", 31 "stat_at", 32 "stat_de", 33 "stat_sa", 34 "stat_sd", 35 "stat_sp", 36 "stat_hp", 37 "effort", 38 "oldgs", 39 "caprate", 40 "baseexp", 41 "gender", 42 "happiness", 43 "root", 44 "eventred", 45 "eventblue", 46 "notes", 47 "flags", 48 "real_id", 49 ); 50 __PACKAGE__->set_primary_key("id"); 51 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Pokemon - DBIC class for the C<pokemon> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('pokemon'); 15 __PACKAGE__->add_columns(qw/ 16 id 17 id_johto 18 id_hoenn 19 id_sinnoh 20 21 name 22 alt_form 23 name_jp 24 name_romaji 25 26 evid 27 evparent 28 evmethod 29 evparam 30 31 height 32 weight 33 type1 34 type2 35 species 36 color 37 habitat 38 39 stat_at 40 stat_de 41 stat_sa 42 stat_sd 43 stat_sp 44 stat_hp 45 46 effort 47 oldgs 48 caprate 49 baseexp 50 gender 51 happiness 52 root 53 eventred 54 eventblue 55 notes 56 flags 57 real_id 58 /); 59 __PACKAGE__->set_primary_key('id'); 52 60 53 61 __PACKAGE__->belongs_to(evchain => 'Vee::Schema::EvChains', 'evid'); … … 66 74 __PACKAGE__->has_many(descendants => 'Vee::Schema::Pokemon', 'evparent'); 67 75 68 # I am really tired of how many different ways breeding groups are used, so 69 # here are some subs to clean it up. 70 # TODO: pod, for this and every other schema class. restyle them all really, or look into autoload 76 =head1 METHODS 71 77 72 # true if the Pokemon can breed at all (i.e. no F groups) 78 =head2 can_breed 79 80 Returns true if this Pokemon can breed, false otherwise. 81 82 =cut 83 73 84 sub can_breed { 74 85 my ($self) = @_; … … 77 88 } 78 89 79 # return just a flat list of breeding groups; TODO: rename this 'breeds' and rename the above join 90 =head2 can_breed 91 92 Returns a list of egg group codes. 93 94 =cut 95 96 # TODO: rename this 'breeds' and rename the above join 80 97 sub breeding_groups { 81 98 my ($self) = @_; … … 83 100 } 84 101 85 # recreate original breeding code; just hex listed in ascending order 102 =head2 can_breed 103 104 Returns the in-game breeding code for this Pokemon. 105 106 =cut 107 86 108 sub breeding_code { 87 109 my ($self) = @_; … … 92 114 } 93 115 94 # returns true iff this Pokemon has a breeding group in common with the given other Pokemon 116 =head2 can_breed_with($pokemon) 117 118 Returns true if this Pokemon can breed with the given Pokemon, false otherwise. 119 120 =cut 121 95 122 sub can_breed_with { 96 123 my ($poke1, $poke2) = @_; 97 124 my %breeds; 98 125 99 # breeds cannot appear twice due to keying, so this is guaranteed to work 126 # Egg groups cannot appear twice due to keying, so this is guaranteed to 127 # work 100 128 $breeds{$_}++ for $poke1->breeding_groups, $poke2->breeding_groups; 101 129 delete $breeds{15}; 102 130 103 # compatible if at least one breedappears twice131 # Compatible if at least one egg group appears twice 104 132 return grep { $_ > 1 } values %breeds; 105 133 } 106 134 135 =head1 SEE ALSO 136 137 L<Vee::Schema>, L<DBIx::Class> 138 139 =head1 AUTHOR 140 141 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 142 143 See the included F<AUTHORS> file for a full list of contributers. 144 145 =head1 LICENSE 146 147 See the included F<LICENSE> file. 148 149 =cut 150 107 151 1; -
veekun/trunk/lib/Vee/Schema/PokemonAbilities.pm
r306 r350 1 1 package Vee::Schema::PokemonAbilities; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("pokemon_abilities"); 7 =head1 NAME 8 9 Vee::Schema::PokemonAbilities - DBIC class for the C<pokemon_abilities> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('pokemon_abilities'); 12 15 __PACKAGE__->add_columns(qw/ pokeid abilityid slot /); 13 __PACKAGE__->set_primary_key('pokeid', 'abilityid'); 14 __PACKAGE__->add_unique_constraint(['pokeid', 'abilityid'], undef); 16 __PACKAGE__->set_primary_key(qw/ pokeid abilityid /); 15 17 16 18 __PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 17 19 __PACKAGE__->belongs_to(ability => 'Vee::Schema::Abilities', 'abilityid'); 18 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 19 37 1; 20 -
veekun/trunk/lib/Vee/Schema/PokemonBreeds.pm
r48 r350 1 1 package Vee::Schema::PokemonBreeds; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("pokemon_breeds"); 7 =head1 NAME 8 9 Vee::Schema::PokemonBreeds - DBIC class for the C<pokemon_breeds> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('pokemon_breeds'); 12 15 __PACKAGE__->add_columns(qw/ pokeid breed /); 13 __PACKAGE__->set_primary_key('pokeid', 'breed'); 14 __PACKAGE__->add_unique_constraint(['pokeid', 'breed'], undef); 16 __PACKAGE__->set_primary_key(qw/ pokeid breed /); 15 17 16 18 __PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokeid'); 17 19 20 =head1 SEE ALSO 21 22 L<Vee::Schema>, L<DBIx::Class> 23 24 =head1 AUTHOR 25 26 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 27 28 See the included F<AUTHORS> file for a full list of contributers. 29 30 =head1 LICENSE 31 32 See the included F<LICENSE> file. 33 34 =cut 35 18 36 1; 19 -
veekun/trunk/lib/Vee/Schema/PokemonItems.pm
r222 r350 1 1 package Vee::Schema::PokemonItems; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("pokemon_items"); 7 =head1 NAME 8 9 Vee::Schema::PokemonItems - DBIC class for the C<pokemon_items> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('pokemon_items'); 12 15 __PACKAGE__->add_columns(qw/ pokemon_id item_id rarity /); 13 __PACKAGE__->set_primary_key('pokemon_id', 'item_id'); 14 __PACKAGE__->add_unique_constraint(['pokemon_id', 'item_id'], undef); 16 __PACKAGE__->set_primary_key(qw/ pokemon_id item_id /); 15 17 16 18 __PACKAGE__->belongs_to(pokemon => 'Vee::Schema::Pokemon', 'pokemon_id', { join_type => 'LEFT' }); 17 19 __PACKAGE__->belongs_to(item => 'Vee::Schema::Items', 'item_id', { join_type => 'LEFT' }); 18 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 19 37 1; 20 -
veekun/trunk/lib/Vee/Schema/Posts.pm
r31 r350 1 1 package Vee::Schema::Posts; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("posts"); 12 __PACKAGE__->add_columns("id", "threadid", "userid", "flags", "time", "format", "message", "lasteditid"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Posts - DBIC class for the C<posts> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('posts'); 15 __PACKAGE__->add_columns(qw/ id threadid userid flags time format message lasteditid /); 16 __PACKAGE__->set_primary_key('id'); 15 17 16 18 __PACKAGE__->belongs_to(thread => 'Vee::Schema::Threads', 'threadid'); … … 19 21 __PACKAGE__->might_have(lastedit => 'Vee::Schema::Edits', { 'foreign.id' => 'self.lasteditid' }); 20 22 23 =head1 SEE ALSO 24 25 L<Vee::Schema>, L<DBIx::Class> 26 27 =head1 AUTHOR 28 29 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 30 31 See the included F<AUTHORS> file for a full list of contributers. 32 33 =head1 LICENSE 34 35 See the included F<LICENSE> file. 36 37 =cut 38 21 39 1; 22 -
veekun/trunk/lib/Vee/Schema/Sessions.pm
r31 r350 1 1 package Vee::Schema::Sessions; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("sessions"); 12 __PACKAGE__->add_columns("id", "userid", "expires", "data"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Sessions - DBIC class for the C<sessions> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('sessions'); 15 __PACKAGE__->add_columns(qw/ id userid expires data /); 16 __PACKAGE__->set_primary_key('id'); 17 18 =head1 SEE ALSO 19 20 L<Vee::Schema>, L<DBIx::Class> 21 22 =head1 AUTHOR 23 24 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 25 26 See the included F<AUTHORS> file for a full list of contributers. 27 28 =head1 LICENSE 29 30 See the included F<LICENSE> file. 31 32 =cut 15 33 16 34 1; 17 -
veekun/trunk/lib/Vee/Schema/Shoutbox.pm
r31 r350 1 1 package Vee::Schema::Shoutbox; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("shoutbox"); 12 __PACKAGE__->add_columns("id", "name", "userid", "ip", "time", "message"); 13 __PACKAGE__->set_primary_key("id"); 14 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Shoutbox - DBIC class for the C<shoutbox> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('shoutbox'); 15 __PACKAGE__->add_columns(qw/ id name userid ip time message /); 16 __PACKAGE__->set_primary_key('id'); 15 17 16 18 __PACKAGE__->might_have(user => 'Vee::Schema::Users', { 'foreign.id' => 'self.userid' }); 17 19 20 =head1 SEE ALSO 21 22 L<Vee::Schema>, L<DBIx::Class> 23 24 =head1 AUTHOR 25 26 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 27 28 See the included F<AUTHORS> file for a full list of contributers. 29 30 =head1 LICENSE 31 32 See the included F<LICENSE> file. 33 34 =cut 35 18 36 1; 19 -
veekun/trunk/lib/Vee/Schema/ThreadViews.pm
r287 r350 3 3 use strict; 4 4 use warnings; 5 6 5 use base 'DBIx::Class'; 7 6 8 __PACKAGE__->load_components("PK::Auto", "Core"); 9 __PACKAGE__->table("thread_views"); 7 =head1 NAME 8 9 Vee::Schema::ThreadViews - DBIC class for the C<thread_views> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('thread_views'); 10 15 __PACKAGE__->add_columns(qw/ thread_id user_id last_viewed /); 11 __PACKAGE__->set_primary_key('thread_id', 'user_id'); 12 __PACKAGE__->add_unique_constraint(['thread_id', 'user_id'], undef); 16 __PACKAGE__->set_primary_key(qw/ thread_id user_id /); 13 17 14 18 __PACKAGE__->belongs_to(thread => 'Vee::Schema::Threads', 'thread_id', { join_type => 'LEFT' }); … … 16 20 # TODO: thread and user need to join to me! 17 21 22 =head1 SEE ALSO 23 24 L<Vee::Schema>, L<DBIx::Class> 25 26 =head1 AUTHOR 27 28 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 29 30 See the included F<AUTHORS> file for a full list of contributers. 31 32 =head1 LICENSE 33 34 See the included F<LICENSE> file. 35 36 =cut 37 18 38 1; 19 -
veekun/trunk/lib/Vee/Schema/Threads.pm
r298 r350 1 1 package Vee::Schema::Threads; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "ResultSetManager", "Core"); 11 __PACKAGE__->table("threads"); 12 __PACKAGE__->add_columns( 13 "id", 14 "forumid", 15 "subject", 16 "blurb", 17 "firstpostid", 18 "lastpostid", 19 "lasttime", 20 "postct", 21 "hitct", 22 "flags", 23 ); 24 __PACKAGE__->set_primary_key("id"); 25 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Threads - DBIC class for the C<threads> table 10 11 =cut 12 13 __PACKAGE__->load_components(qw/ ResultSetManager Core /); 14 __PACKAGE__->table('threads'); 15 __PACKAGE__->add_columns(qw/ 16 id forumid subject blurb firstpostid lastpostid lasttime postct hitct flags 17 /); 18 __PACKAGE__->set_primary_key('id'); 26 19 27 20 __PACKAGE__->belongs_to(forum => 'Vee::Schema::Forums', 'forumid'); … … 30 23 __PACKAGE__->belongs_to(firstpost => 'Vee::Schema::Posts', 'firstpostid'); 31 24 __PACKAGE__->has_many(thread_views => 'Vee::Schema::ThreadViews', 'thread_id', { join_type => 'LEFT' }); 25 26 =head1 METHODS 27 28 =head2 search_announcements 29 30 Returns a resultset of all the threads flagged as announcements. 31 32 =cut 32 33 33 34 sub search_announcements : ResultSet { … … 39 40 ); 40 41 } 42 43 =head2 read_ids($user) 44 45 Returns a list of all thread ids the given user has read. 46 47 =cut 41 48 42 49 sub read_ids : ResultSet { … … 52 59 } 53 60 61 =head1 SEE ALSO 62 63 L<Vee::Schema>, L<DBIx::Class> 64 65 =head1 AUTHOR 66 67 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 68 69 See the included F<AUTHORS> file for a full list of contributers. 70 71 =head1 LICENSE 72 73 See the included F<LICENSE> file. 74 75 =cut 76 54 77 1; 55 -
veekun/trunk/lib/Vee/Schema/Types.pm
r31 r350 1 1 package Vee::Schema::Types; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("types"); 12 __PACKAGE__->add_columns( 13 "name", 14 "abbr", 15 "color", 16 "rank", 17 "id", 18 "internalid", 19 "new_effects", 20 "old_effects", 21 ); 22 __PACKAGE__->set_primary_key("name"); 23 __PACKAGE__->add_unique_constraint(["name"], undef); 7 =head1 NAME 8 9 Vee::Schema::Types - DBIC class for the C<types> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('types'); 15 __PACKAGE__->add_columns(qw/ 16 name abbr color rank id internalid new_effects old_effects 17 /); 18 __PACKAGE__->set_primary_key('name'); 19 20 =head1 SEE ALSO 21 22 L<Vee::Schema>, L<DBIx::Class> 23 24 =head1 AUTHOR 25 26 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 27 28 See the included F<AUTHORS> file for a full list of contributers. 29 30 =head1 LICENSE 31 32 See the included F<LICENSE> file. 33 34 =cut 24 35 25 36 1; 26 -
veekun/trunk/lib/Vee/Schema/UserGroups.pm
r31 r350 1 1 package Vee::Schema::UserGroups; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("usergroups"); 12 #CREATE TABLE usergroups (userid INT UNSIGNED NOT NULL, groupid TINYINT UNSIGNED NOT NULL, priority TINYINT UNSIGNED NOT NULL, PRIMARY KEY (userid, groupid, priority), INDEX (userid), INDEX (groupid)); 13 __PACKAGE__->add_columns("userid", "groupid", "priority"); 14 __PACKAGE__->set_primary_key("userid", "groupid", "priority"); 15 __PACKAGE__->add_unique_constraint(["userid", "groupid", "priority"], undef); 7 =head1 NAME 8 9 Vee::Schema::UserGroups - DBIC class for the C<usergroups> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('usergroups'); 15 __PACKAGE__->add_columns(qw/ userid groupid priority /); 16 __PACKAGE__->set_primary_key(qw/ userid groupid priority /); 16 17 17 18 __PACKAGE__->belongs_to(user => 'Vee::Schema::Users', 'userid'); 18 __PACKAGE__->belongs_to(group_hax => 'Vee::Schema::Groups', 'groupid'); # hack to get around problem with `` quoting :( 19 # Temporary hack to get around problem with `` quoting 20 __PACKAGE__->belongs_to(group_hax => 'Vee::Schema::Groups', 'groupid'); 21 22 =head1 SEE ALSO 23 24 L<Vee::Schema>, L<DBIx::Class> 25 26 =head1 AUTHOR 27 28 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 29 30 See the included F<AUTHORS> file for a full list of contributers. 31 32 =head1 LICENSE 33 34 See the included F<LICENSE> file. 35 36 =cut 19 37 20 38 1; 21 -
veekun/trunk/lib/Vee/Schema/UserPermissions.pm
r260 r350 1 1 package Vee::Schema::UserPermissions; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("userpermissions"); 12 __PACKAGE__->add_columns("userid", "permission", "scope", "polarity"); 13 __PACKAGE__->set_primary_key("userid", "permission", "scope"); 14 __PACKAGE__->add_unique_constraint(["userid", "permission", "scope"], undef); 7 =head1 NAME 8 9 Vee::Schema::UserPermissions - DBIC class for the C<userpermissions> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('userpermissions'); 15 __PACKAGE__->add_columns(qw/ userid permission scope polarity /); 16 __PACKAGE__->set_primary_key(qw/ userid permission scope /); 17 18 =head1 SEE ALSO 19 20 L<Vee::Schema>, L<DBIx::Class> 21 22 =head1 AUTHOR 23 24 Maintainer: Alex "Eevee" Munroe (C<veekun@veekun.com>) 25 26 See the included F<AUTHORS> file for a full list of contributers. 27 28 =head1 LICENSE 29 30 See the included F<LICENSE> file. 31 32 =cut 15 33 16 34 1; -
veekun/trunk/lib/Vee/Schema/Users.pm
r330 r350 1 1 package Vee::Schema::Users; 2 3 # Created by DBIx::Class::Schema::Loader v0.03003 @ 2006-07-11 01:54:104 2 5 3 use strict; 6 4 use warnings; 7 8 5 use base 'DBIx::Class'; 9 6 10 __PACKAGE__->load_components("PK::Auto", "Core"); 11 __PACKAGE__->table("users"); 12 __PACKAGE__->add_columns( 13 "id", 14 "name", 15 "password", 16 "joindate", 17 "lastactive", 18 "thread_view_cutoff", 19 "postct", 20 "flags", 21 "newspic", 22 "avatar", 23 "contact_aim", 24 "contact_icq", 25 "contact_msn", 26 "contact_yim", 27 "contact_lj", 28 "contact_homepage", 29 "contact_email", 30 "pmicon", 31 "customtitle", 32 "signature", 33 "is_dumb", 34 ); 35 __PACKAGE__->set_primary_key("id"); 36 __PACKAGE__->add_unique_constraint("NAME", ["name"]); 37 __PACKAGE__->add_unique_constraint(["name"], undef); 38 __PACKAGE__->add_unique_constraint(["id"], undef); 7 =head1 NAME 8 9 Vee::Schema::Users - DBIC class for the C<users> table 10 11 =cut 12 13 __PACKAGE__->load_components('Core'); 14 __PACKAGE__->table('users'); 15 __PACKAGE__->add_columns(qw/ 16 id 17 name 18 password 19 joindate 20 lastactive 21 thread_view_cutoff 22 postct 23 flags 24 newspic 25 avatar 26 contact_aim 27 contact_icq 28 contact_msn 29 contact_yim 30 contact_lj 31 contact_homepage 32 contact_email 33 pmicon 34 customtitle 35 signature 36 is_dumb 37 /); 38 __PACKAGE__->set_primary_key('id'); 39 __PACKAGE__->add_unique_constraint(name => ['name']); 39 40 40 41 __PACKAGE__->has_many(posts => 'Vee::Schema::Posts', 'userid'); … … 44 45 __PACKAGE__->has_many(received_messages => 'Vee::Schema::Messages', 'to_user_id'); 45 46 __PACKAGE__->has_many(thread_views => 'Vee::Schema::ThreadViews', 'thread_id'); 46 __PACKAGE__->many_to_many('groups' => 'user_groups', 'group_hax'); # hack to get around problem with `` quoting :( 47 # Temporary hack to get around problem with `` quoting 48 __PACKAGE__->many_to_many('groups' => 'user_groups', 'group_hax'); 47 49 48 50 1;
