package Bulletinboard::Schema::Board; use strict; use warnings; use base qw/DBIx::Class/; __PACKAGE__->load_components(qw/ PK::Auto Core /); __PACKAGE__->table('boards'); __PACKAGE__->add_columns(qw/board_id topic_id title position description/); __PACKAGE__->set_primary_key('board_id'); __PACKAGE__->belongs_to(topic => 'Bulletinboard::Schema::Topic', 'topic_id'); __PACKAGE__->has_many(threads => 'Bulletinboard::Schema::Thread', 'thread_id'); 1;