Files
Bridge-and-Join-s/migrations/fansy-store/004__seed_participants.sql
T
fontvielle 93bcbca12c feat(fansy-store): DDL принимающей БД + контракт данных для команды Fansy
- docs/fansy-contract/v1/ddl/000__roles.sql: роли fansy_etl, bj_reader, bj_migrator
- docs/fansy-contract/v1/ddl/001__schemas.sql: схемы fansy_staging и fansy с грантами
- docs/fansy-contract/v1/ddl/002__working.sql: рабочая схема (participants, securities, clients, client_documents, iia_contracts, settlement_requisites, depo_accounts, portfolios, etl_errors)
- docs/fansy-contract/v1/ddl/003__staging.sql: staging-зеркало с loaded_at и сниженными ограничениями
- docs/fansy-contract/v1/ddl/004__seed_participants.sql: предзаполнение справочника (НРД, БКС 5406121446, Ренессанс 7709258228, Альфа-Банк 7728168971)
- docs/fansy-contract/v1/data-dictionary.md: семантика каждого поля
- docs/fansy-contract/v1/etl-requirements.md: требования к ETL (UPSERT в staging, SLA свежести по таблицам, обработка ошибок)
- docs/fansy-contract/v1/examples/example-claim.md: SQL-запросы для формирования M2MTransferRequest
- docs/fansy-contract/v1/examples/seed-data.sql: 5 тестовых клиентов + портфели + договоры
- migrations/fansy-store/: рабочие копии миграций

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:45:37 +03:00

57 lines
2.7 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 004__seed_participants.sql
-- Предзаполнение справочника участников по DOC/Справочник пользователей.pdf
-- НРД и тестовые контрагенты Регламента M2M.
SET search_path TO fansy, public;
INSERT INTO participants (
inn, ogrn, full_name_rus, short_name_rus, display_name_rus,
full_name_eng, short_name_eng, display_name_eng,
depository_participant_code, broker_participant_code,
is_available_for_m2m, comment
) VALUES
(
'7702165310', '1027739132563',
'Небанковская кредитная организация акционерное общество "Национальный расчётный депозитарий"',
'НКО АО НРД', 'НРД',
'National Settlement Depository', 'NSD', 'NSD',
'MC0010300000', NULL, true,
'Центральный депозитарий, держатель реестра M2M-сделок.'
),
(
'5406121446', '1025402459334',
'Общество с ограниченной ответственностью "Компания БКС"',
'ООО "Компания БКС"', 'БКС',
'BCS Company Ltd', 'BCS', 'BCS',
NULL, 'MC0079200001', true,
'Брокер БКС, контрагент M2M.'
),
(
'7709258228', '1027739675260',
'Общество с ограниченной ответственностью "Ренессанс Брокер"',
'ООО "Ренессанс Брокер"', 'Ренессанс Брокер',
'Renaissance Broker Ltd', 'Renaissance', 'Renaissance',
NULL, 'MC0010300032', true,
'Брокер Ренессанс, контрагент M2M.'
),
(
'7728168971', '1027700067328',
'Акционерное общество "Альфа-Банк"',
'АО "Альфа-Банк"', 'Альфа-Банк',
'Alfa-Bank JSC', 'Alfa-Bank', 'Alfa-Bank',
NULL, 'MC0079200033', true,
'Брокер Альфа-Банк, контрагент M2M.'
)
ON CONFLICT (inn) DO UPDATE SET
full_name_rus = EXCLUDED.full_name_rus,
short_name_rus = EXCLUDED.short_name_rus,
display_name_rus = EXCLUDED.display_name_rus,
full_name_eng = EXCLUDED.full_name_eng,
short_name_eng = EXCLUDED.short_name_eng,
display_name_eng = EXCLUDED.display_name_eng,
depository_participant_code = EXCLUDED.depository_participant_code,
broker_participant_code = EXCLUDED.broker_participant_code,
is_available_for_m2m = EXCLUDED.is_available_for_m2m,
comment = EXCLUDED.comment,
updated_at = now();