about summary refs log tree commit diff
path: root/lib/jitterbug/Schema/Result/Project.pm
blob: 245b54c1468009f2b32260b6b7932d590cb26610 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package jitterbug::Schema::Result::Project;
use base qw/DBIx::Class::Core/;

__PACKAGE__->table('project');
__PACKAGE__->add_columns(
    projectid => {
        data_type         => 'int',
        is_auto_increment => 1,
    },
    name        => { data_type => 'text', },
    url         => { data_type => 'text', },
    description => { data_type => 'text', },
    owner       => { data_type => 'text', }
);
__PACKAGE__->set_primary_key('projectid');
__PACKAGE__->add_unique_constraint( [qw/name/] );
__PACKAGE__->has_many(
    commits => 'jitterbug::Schema::Result::Commit',
    'sha256',
);
__PACKAGE__->has_many(
    tasks => 'jitterbug::Schema::Result::Task',
    'taskid',
);

1;