File: Person.pm

package info (click to toggle)
libhtml-formfu-perl 2.07000-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,396 kB
  • sloc: perl: 12,777; makefile: 9; sql: 5
file content (51 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download | duplicates (2)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
package MyApp::Schema::Person;

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components(qw/ PK::Auto Core /);

__PACKAGE__->table("person");

__PACKAGE__->add_columns(
    "person_id",
    {   data_type   => "INT",
        is_nullable => 0,
        size        => 10,
        extra       => { unsigned => 1, },
    },
    "title",
    {   data_type   => "ENUM",
        is_nullable => 0,
        extra       => { list => [qw/ Mr Mrs Miss /], },
    },
    "name",
    {   data_type   => "VARCHAR",
        is_nullable => 0,
        size        => 255,
    },
    "age",
    {   data_type   => "INT",
        is_nullable => 0,
        size        => 10,
        extra       => { unsigned => 1, }
    },
    "is_human",
    {   data_type   => "BOOLEAN",
        is_nullable => 0,
    },
    "income",
    {   data_type   => "DECIMAL",
        is_nullable => 0,
        size        => [ 8, 2 ],
    } );

__PACKAGE__->set_primary_key("person_id");

__PACKAGE__->might_have(
    dongle => 'Dongle',
    { 'foreign.person_id' => 'self.person_id' } );

1;