Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.64 KB | None | 0 0
  1. json_build_object('business',
  2.                              json_build_object(
  3.                              'business_id', business_id,
  4.                              'legal_entity', legal_entity,
  5.                              'count_org', crn,
  6.                              'count_client', count_client,
  7.                              'count_vendor', count_vendor,
  8.                              'count_dealer', count_dealer
  9.                              ),
  10.                              'organization',
  11.                          json_agg(
  12.                                  json_build_object('orn', orn,
  13.                                                    'id', organization_id,
  14.                                                    'legal_entity', ts_name,
  15.                                                    'address', address,
  16.                                                    'email', email,
  17.                                                    'phone', phone,
  18.                                                    'contact_name', contact_name,
  19.                                                    'inn', inn,
  20.                                                    'kpp', kpp,
  21.                                                    'ogrn', ogrn,
  22.                                                    'type_id', type_id,
  23.                                                    'owner', json_build_object(
  24.                                                            'id', owner_id,
  25.                                                            'name', owner_name
  26.                                                        ),
  27.                                                    'license', json_build_object(
  28.                                                            'license_id', license_id,
  29.                                                            'name_license', name_license,
  30.                                                            'is_active_license', is_active_license,
  31.                                                            'create_date_license', create_date_license,
  32.                                                            'update_date_license', update_date_license,
  33.                                                            'to_date', to_date,
  34.                                                            'lic_service_id', lic_service_id,
  35.                                                            'lo_org_id', lo_org_id
  36.                                                        ),
  37.                                                    'user_role', user_role,
  38.                                                    'role_id', role_id)
  39.                              )
  40.                         ) as item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement