32 lines
719 B
Perl
32 lines
719 B
Perl
package CharmBoard::Schema::Source::Threads;
|
|
|
|
use utf8;
|
|
use strict;
|
|
use warnings;
|
|
use experimental qw(try smartmatch);
|
|
|
|
use base qw(DBIx::Class::Core);
|
|
|
|
__PACKAGE__->table('threads');
|
|
__PACKAGE__->add_columns(
|
|
thread_id => {
|
|
data_type => 'integer',
|
|
is_auto_increment => 1,
|
|
is_nullable => 0, },
|
|
thread_title => {
|
|
data_type => 'text',
|
|
is_nullable => 0, },
|
|
thread_subf => {
|
|
data_type => 'integer',
|
|
is_foreign_key => 1,
|
|
is_nullable => 0, });
|
|
|
|
__PACKAGE__->set_primary_key('thread_id');
|
|
|
|
__PACKAGE__->belongs_to(
|
|
thread_subf =>
|
|
'CharmBoard::Schema::Source::Subforums',
|
|
{'foreign.subf_id' => 'self.thread_subf'});
|
|
|
|
1;
|
|
__END__ |