Created
December 1, 2011 20:05
-
-
Save anonymous/1419435 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package SuiteSetup::Schema::Result::Contact; | |
use Moose; | |
use MooseX::NonMoose; | |
use SuiteSetup::Schema::Candy -components => [ | |
qw( | |
InflateColumn::DateTime | |
TimeStamp | |
Helper::Row::ToJSON | |
) | |
]; | |
with 'SuiteSetup::HasContainer'; | |
use sugar; | |
primary_column contactid => { | |
data_type => 'int', | |
is_nullable => 0, | |
is_auto_increment => 1, | |
extra => { unsigned => 1 }, | |
}; | |
column type => { | |
data_type => 'varchar', | |
size => 200, | |
is_nullable => 0, | |
}; | |
column account => { | |
data_type => 'int', | |
is_nullable => 0, | |
extra => { unsigned => 1 }, | |
}; | |
column name => { | |
data_type => 'varchar', | |
size => 200, | |
is_nullable => 0, | |
}; | |
column email => { | |
data_type => 'int', | |
is_nullable => 1, | |
extra => { unsigned => 1 } | |
}; | |
column tags => { | |
data_type => 'int', | |
is_nullable => 1, | |
extra => { unsigned => 1 }, | |
}; | |
belongs_to 'account' => 'SuiteSetup::Schema::Result::Account', 'account'; | |
has_many 'tags' => 'SuiteSetup::Schema::Result::ContactProperty', 'contact'; | |
has_many 'email_addresses' => 'SuiteSetup::Schema::Result::EmailAddress', 'contact'; | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment