Guest User

controller config

a guest
Mar 28th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.45 KB | None | 0 0
  1.  
  2.  
  3.  
  4. __PACKAGE__->config(
  5.     # Define parent chain action and partpath
  6.     action                  =>  { setup => { PathPart => 'general/members', Chained => '/api/rest/rest_base' } },
  7.     # DBIC result class
  8.     class                   =>  'DB::Member',
  9.  
  10.     # Columns required to create
  11.     create_requires         =>  [qw/flat_no society_id/],
  12.     # Additional non-required columns that create allows
  13.     create_allows           =>  [qw/dob1 dob2 email group_id holder1 holder2 if_freehold if_member membership_no mobile1 mobile2 nominee pa_city pa_country pa_state pa_zip pan pan1 pan2 password phones present_address/],
  14.     # Columns that update allows
  15.     update_allows           =>  [qw/flat_no society_id dob1 dob2 email group_id holder1 holder2 if_freehold if_member membership_no mobile1 mobile2 nominee pa_city pa_country pa_state pa_zip pan pan1 pan2 password phones present_address/],
  16.     # Columns that list returns
  17.     select                  =>  [qw/flat_no membership_no email pan present_address pa_city pa_state pa_country pa_zip holder1 holder2 nominee dob1 dob2 pan1 pan2 mobile1 mobile2 phones if_member if_freehold password society_id member_id group_id/],
  18.  
  19.  
  20.     # Every possible prefetch param allowed
  21.     prefetch_allows    =>  [
  22.         [qw/member_ledgers/], {  'member_ledgers' => [qw//] },
  23.     [qw/member_meter_readings/], {  'member_meter_readings' => [qw//] },
  24.     [qw/payment_collections/], {  'payment_collections' => [qw/member_ledgers/] },
  25.     [qw/saved_bills/], {  'saved_bills' => [qw//] },
  26.  
  27.     ],
  28.  
  29.     # Order of generated list
  30.     ordered_by         => [qw/member_id/],
  31.     # columns that can be searched on via list
  32.     search_exposes     => [
  33.         qw/member_balance(member_id) flat_no membership_no email pan present_address pa_city pa_state pa_country pa_zip holder1 holder2 nominee dob1 dob2 pan1 pan2 mobile1 mobile2 phones if_member if_freehold password society_id member_id group_id/,
  34.         { 'member_ledgers' => [qw/transaction_id head transaction_type amount payment_id comments generated due_on society_id member_id/] },
  35.     { 'member_meter_readings' => [qw/uniq_id flat_no dated reading reading_avg society_id member_id/] },
  36.     { 'payment_collections' => [qw/payment_id payment_mode instrument_no payment_status instrument_bank instrument_date payment_amount payment_time book_no receipt_no society_id member_id/] },
  37.     { 'saved_bills' => [qw/uniq_id month year bill_html society_id member_id/] },
  38.  
  39.     ],);
Add Comment
Please, Sign In to add comment