File: Tag.pm

package info (click to toggle)
libdbix-class-perl 0.082841-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 5,236 kB
  • sloc: perl: 26,763; sql: 322; makefile: 10
file content (38 lines) | stat: -rw-r--r-- 790 bytes parent folder | download | duplicates (5)
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
34
35
36
37
38
package # hide from PAUSE
    DBICTest::Schema::Tag;

use warnings;
use strict;

use base qw/DBICTest::BaseResult/;

__PACKAGE__->table('tags');
__PACKAGE__->add_columns(
  'tagid' => {
    data_type => 'integer',
    is_auto_increment => 1,
  },
  'cd' => {
    data_type => 'integer',
  },
  'tag' => {
    data_type => 'varchar',
    size      => 100,
  },
);
__PACKAGE__->set_primary_key('tagid');

__PACKAGE__->add_unique_constraints(  # do not remove, part of a test
  tagid_cd     => [qw/ tagid cd /],
  tagid_cd_tag => [qw/ tagid cd tag /],
);
__PACKAGE__->add_unique_constraints(  # do not remove, part of a test
  [qw/ tagid tag /],
  [qw/ tagid tag cd /],
);

__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', 'cd', {
  proxy => [ 'year', { cd_title => 'title' } ],
});

1;