diff --git a/src/core/Data/propsMap.ts b/src/core/Data/propsMap.ts index 6f77565..9d967d7 100644 --- a/src/core/Data/propsMap.ts +++ b/src/core/Data/propsMap.ts @@ -75,6 +75,14 @@ const propsMap: { name: 'evo_name', value: 'evo_townid', }, + connection: { + name: 'evo_name', + value: 'connectionid', + }, + evo_connection_role: { + name: 'evo_name', + value: 'evo_connection_roleid', + }, }; export default propsMap; diff --git a/src/core/fakeData/entityFakes.ts b/src/core/fakeData/entityFakes.ts index dfc477b..17bfb02 100644 --- a/src/core/fakeData/entityFakes.ts +++ b/src/core/fakeData/entityFakes.ts @@ -16,6 +16,9 @@ const ACCOUNT_7_ID = faker.random.uuid(); const ACCOUNT_8_ID = faker.random.uuid(); const ACCOUNT_9_ID = faker.random.uuid(); const ACCOUNT_10_ID = faker.random.uuid(); +const ACCOUNT_11_ID = faker.random.uuid(); +const ACCOUNT_12_ID = faker.random.uuid(); +const ACCOUNT_13_ID = faker.random.uuid(); const LEAD_1_ID = faker.random.uuid(); const LEAD_2_ID = faker.random.uuid(); @@ -67,6 +70,17 @@ const REWARD_CONDITION_6_ID = faker.random.uuid(); const REWARD_CONDITION_7_ID = faker.random.uuid(); const REWARD_CONDITION_8_ID = faker.random.uuid(); +const EVO_CONNECTION_ROLE_1_ID = faker.random.uuid(); +const EVO_CONNECTION_ROLE_2_ID = faker.random.uuid(); +const EVO_CONNECTION_ROLE_3_ID = faker.random.uuid(); + +const CONNECTION_1_ID = faker.random.uuid(); +const CONNECTION_2_ID = faker.random.uuid(); +const CONNECTION_3_ID = faker.random.uuid(); +const CONNECTION_4_ID = faker.random.uuid(); +const CONNECTION_5_ID = faker.random.uuid(); +const CONNECTION_6_ID = faker.random.uuid(); + /** * Fake Consts */ @@ -148,6 +162,24 @@ const entityFakeData: { evo_client_riskid: EVO_CLIENT_RISK_2_ID, statecode: 0, }, + { + name: 'ЮЛ поставщика 1', + accountid: ACCOUNT_11_ID, + evo_supplier_type: 100000001, + statecode: 0, + }, + { + name: 'ЮЛ поставщика 2', + accountid: ACCOUNT_12_ID, + evo_supplier_type: 100000001, + statecode: 0, + }, + { + name: 'ЮЛ поставщика 3', + accountid: ACCOUNT_13_ID, + evo_supplier_type: 100000001, + statecode: 0, + }, ], transactioncurrency: [ { @@ -401,6 +433,58 @@ const entityFakeData: { evo_reduce_reward: true, }, ], + connection: [ + { + connectionid: CONNECTION_1_ID, + record1id: ACCOUNT_1_ID, + record2roleid: EVO_CONNECTION_ROLE_1_ID, + record2id: ACCOUNT_11_ID, + statecode: 0, + }, + { + connectionid: CONNECTION_2_ID, + record1id: ACCOUNT_12_ID, + record2roleid: EVO_CONNECTION_ROLE_2_ID, + record2id: ACCOUNT_1_ID, + statecode: 0, + }, + { + connectionid: CONNECTION_3_ID, + record1id: ACCOUNT_2_ID, + record2roleid: EVO_CONNECTION_ROLE_1_ID, + record2id: ACCOUNT_13_ID, + statecode: 0, + }, + // { + // connectionid: CONNECTION_4_ID, + // statecode: 0, + // }, + // { + // connectionid: CONNECTION_5_ID, + // statecode: 0, + // }, + // { + // connectionid: CONNECTION_6_ID, + // statecode: 0, + // }, + ], + evo_connection_role: [ + { + evo_name: `ЮЛ Поставщика`, + statecode: 0, + evo_connection_roleid: EVO_CONNECTION_ROLE_1_ID, + }, + { + evo_name: `Салон`, + statecode: 0, + evo_connection_roleid: EVO_CONNECTION_ROLE_2_ID, + }, + { + evo_name: `Агент`, + statecode: 0, + evo_connection_roleid: EVO_CONNECTION_ROLE_3_ID, + }, + ], }; export default entityFakeData; diff --git a/src/core/types/Entities/entityNames.ts b/src/core/types/Entities/entityNames.ts index cba0a4a..e225238 100644 --- a/src/core/types/Entities/entityNames.ts +++ b/src/core/types/Entities/entityNames.ts @@ -16,4 +16,6 @@ export type EntityNames = | 'evo_gps_brand' | 'evo_gps_model' | 'evo_region' - | 'evo_town'; + | 'evo_town' + | 'connection' + | 'evo_connection_role'; diff --git a/src/core/types/Entities/index.ts b/src/core/types/Entities/index.ts index 9422d34..4a77b1e 100644 --- a/src/core/types/Entities/index.ts +++ b/src/core/types/Entities/index.ts @@ -121,6 +121,20 @@ export interface IEvoContact extends IBaseOption { fullname?: string; } +export interface IConnection extends IBaseOption { + evo_name?: string; + connectionid?: string; + record1id?: string; + record2id?: string; + record2roleid?: string; + statecode?: number; +} + +export interface IEvoConnectionRole extends IBaseOption { + evo_name?: string; + evo_connection_roleid?: string; +} + export type TEntity = IAccount & ILead & IOpportunity & @@ -138,4 +152,6 @@ export type TEntity = IAccount & IEvoGPSModel & IEvoRegion & IEvoTown & - IEvoContact; + IEvoContact & + IConnection & + IEvoConnectionRole;