File: UserBand.pm

package info (click to toggle)
libhtml-formfu-model-dbic-perl 0.06000-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,252 kB
  • ctags: 147
  • sloc: perl: 2,112; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (7)
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
27
28
29
30
31
32
33
package MySchema::UserBand;
use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components(qw/ Core /);

__PACKAGE__->table("user_band");

__PACKAGE__->add_columns(
    user => {
        data_type   => "INTEGER",
        is_nullable => 0,
    },
    band => {
        data_type   => "INTEGER",
        is_nullable => 0,
    },
    rating => {
        data_type => "INTEGER",
        is_nullable => 1,
    }
);

__PACKAGE__->set_primary_key( "user", "band" );

__PACKAGE__->belongs_to( "user", "MySchema::User" );

__PACKAGE__->belongs_to( "band", "MySchema::Band" );

1;