Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- json_build_object('business',
- json_build_object(
- 'business_id', business_id,
- 'legal_entity', legal_entity,
- 'count_org', crn,
- 'count_client', count_client,
- 'count_vendor', count_vendor,
- 'count_dealer', count_dealer
- ),
- 'organization',
- json_agg(
- json_build_object('orn', orn,
- 'id', organization_id,
- 'legal_entity', ts_name,
- 'address', address,
- 'email', email,
- 'phone', phone,
- 'contact_name', contact_name,
- 'inn', inn,
- 'kpp', kpp,
- 'ogrn', ogrn,
- 'type_id', type_id,
- 'owner', json_build_object(
- 'id', owner_id,
- 'name', owner_name
- ),
- 'license', json_build_object(
- 'license_id', license_id,
- 'name_license', name_license,
- 'is_active_license', is_active_license,
- 'create_date_license', create_date_license,
- 'update_date_license', update_date_license,
- 'to_date', to_date,
- 'lic_service_id', lic_service_id,
- 'lo_org_id', lo_org_id
- ),
- 'user_role', user_role,
- 'role_id', role_id)
- )
- ) as item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement