Added Entity to customer
This commit is contained in:
parent
736ffb89cf
commit
6a720b0a46
1 changed files with 9 additions and 5 deletions
|
@ -13,6 +13,11 @@ __PACKAGE__->add_columns(
|
||||||
is_auto_increment => 1,
|
is_auto_increment => 1,
|
||||||
is_nullable => 0,
|
is_nullable => 0,
|
||||||
},
|
},
|
||||||
|
"entity_id" => {
|
||||||
|
data_type => "integer",
|
||||||
|
is_nullable => 0,
|
||||||
|
is_foreign_key => 1,
|
||||||
|
},
|
||||||
"display_name" => {
|
"display_name" => {
|
||||||
data_type => "varchar",
|
data_type => "varchar",
|
||||||
size => 255,
|
size => 255,
|
||||||
|
@ -36,11 +41,10 @@ __PACKAGE__->add_columns(
|
||||||
|
|
||||||
__PACKAGE__->set_primary_key("id");
|
__PACKAGE__->set_primary_key("id");
|
||||||
|
|
||||||
__PACKAGE__->might_have(
|
__PACKAGE__->belongs_to(
|
||||||
"user",
|
"entity",
|
||||||
"Pear::LocalLoop::Schema::Result::User",
|
"Pear::LocalLoop::Schema::Result::Entity",
|
||||||
{ "foreign.customer_id" => "self.id" },
|
"entity_id",
|
||||||
{ cascade_copy => 0, cascade_delete => 0 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Reference in a new issue