sub EXT_model ( $ext ) { return { proxy => { type => 'direct', batchActions => \0, api => { # create => $ext->{api}->{'Customer/Contract/create'}, read => $ext->{api}->{'Customer/Contract/read'}, update => $ext->{api}->{'Customer/Contract/update'}, destroy => $ext->{api}->{'Customer/Contract/destroy'}, }, }, fields => [ { name => 'customer_id', reference => { type => $ext->{class}->{'::Billing::Billing::Customer::model'}, association => 'customer_contracts', role => 'customer', inverse => 'contracts', }, type => 'string', }, { name => 'enabled', type => 'boolean', }, { name => 'created', type => 'date', persist => \0, }, { name => 'full_address', type => 'string', persist => \0, calculate => $ext->js_func( ['data'], <<"JS" return data.city + ', ' + data.street + ' ' + data.house + ', ' + data.apartment; JS ), }, { name => 'balance', type => 'number', persist => \0, }, ], }; }
To install Pcore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pcore
CPAN shell
perl -MCPAN -e shell install Pcore
For more information on module installation, please visit the detailed CPAN module installation guide.