package Game::Schema::NationResource; use base qw/DBIx::Class/; # Load required DBIC stuff __PACKAGE__->load_components(qw/PK::Auto Core/); # Set the table name __PACKAGE__->table('nation_resources'); # Set columns in table __PACKAGE__->add_columns(qw/nation_id resource_id/); # Set the primary key for the table __PACKAGE__->set_primary_key(qw/nation_id resource_id/); __PACKAGE__->belongs_to(nation => 'Game::Schema::Nation', 'nation_id'); __PACKAGE__->belongs_to(resource => 'Game::Schema::Resource', 'resource_id'); =head1 NAME Game::Schema::NationResource - A model object representing the JOIN between Nations and Resources. =cut 1;