« Tapper/Schema/TestrunDB/Result/Notification.pm
↑ Summary
Tapper/Schema/TestrunDB/Result/PrePrecondition.pm »
| 1 | package Tapper::Schema::TestrunDB::Result::Owner; | ||
| 2 | 10 | our $AUTHORITY = 'cpan:TAPPER'; | |
| 3 | 10 | $Tapper::Schema::TestrunDB::Result::Owner::VERSION = '5.0.12'; | |
| 4 | # ABSTRACT: Tapper - Containg Tapper users | ||
| 5 | |||
| 6 | 10 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 10 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 10 | ▶ | use parent 'DBIx::Class'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 10 | __PACKAGE__->load_components(qw(Core)); | |
| 12 | 10 | __PACKAGE__->table("owner"); | |
| 13 | 10 | __PACKAGE__->add_columns | |
| 14 | ( | ||
| 15 | "id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_auto_increment => 1, }, | ||
| 16 | "name", { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 255, }, | ||
| 17 | "login", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, }, | ||
| 18 | "password", { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 255, }, | ||
| 19 | ); | ||
| 20 | |||
| 21 | 10 | (my $basepkg = __PACKAGE__) =~ s/::\w+$//; | |
| 22 | |||
| 23 | 10 | __PACKAGE__->set_primary_key("id"); | |
| 24 | 10 | __PACKAGE__->add_unique_constraint( unique_login => [ qw/login/ ], ); | |
| 25 | 10 | __PACKAGE__->has_many( contacts => "${basepkg}::Contact", { 'foreign.owner_id' => 'self.id' }); | |
| 26 | 10 | __PACKAGE__->has_many( notifications => "${basepkg}::Notification", { 'foreign.owner_id' => 'self.id' }); | |
| 27 | |||
| 28 | 10 | 1; | |
| 29 | |||
| 30 | __END__ | ||