This repository has been archived on 2025-05-09. You can view files and clone it, but cannot push or open issues or pull requests.
EvoCalculator/src/core/fakeData/entityFakes.ts
Владислав Чикалкин f1a2afe2f8 more reactions
2020-09-23 19:53:34 +03:00

313 lines
7.3 KiB
TypeScript
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.

import { IOption } from 'core/types/Calculation/options';
import { EntityNames } from 'core/types/Entities/entityNames';
import faker from 'faker';
/**
* Fake Consts
*/
const ACCOUNT_1_ID = faker.random.uuid();
const ACCOUNT_2_ID = faker.random.uuid();
const ACCOUNT_3_ID = faker.random.uuid();
const ACCOUNT_4_ID = faker.random.uuid();
const ACCOUNT_5_ID = faker.random.uuid();
const ACCOUNT_6_ID = faker.random.uuid();
const ACCOUNT_7_ID = faker.random.uuid();
const ACCOUNT_8_ID = faker.random.uuid();
const ACCOUNT_9_ID = faker.random.uuid();
const LEAD_1_ID = faker.random.uuid();
const LEAD_2_ID = faker.random.uuid();
const LEAD_3_ID = faker.random.uuid();
const OPPORTUNITY_1_ID = faker.random.uuid();
const OPPORTUNITY_2_ID = faker.random.uuid();
const QUOTE_1_ID = faker.random.uuid();
const QUOTE_2_ID = faker.random.uuid();
const QUOTE_3_ID = faker.random.uuid();
const QUOTE_4_ID = faker.random.uuid();
const TRANSACTION_CURRENTCY_1_ID = faker.random.uuid();
const TRANSACTION_CURRENTCY_2_ID = faker.random.uuid();
const EVO_CLIENT_1_ID = faker.random.uuid();
const EVO_CLIENT_2_ID = faker.random.uuid();
const EVO_CLIENT_RISK_1_ID = faker.random.uuid();
const EVO_CLIENT_RISK_2_ID = faker.random.uuid();
const GPS_BRAND_1_ID = faker.random.uuid();
const GPS_BRAND_2_ID = faker.random.uuid();
const GPS_BRAND_3_ID = faker.random.uuid();
const GPS_MODEL_1_ID = faker.random.uuid();
const GPS_MODEL_2_ID = faker.random.uuid();
const GPS_MODEL_3_ID = faker.random.uuid();
const GPS_MODEL_4_ID = faker.random.uuid();
const REGION_1_ID = faker.random.uuid();
const REGION_2_ID = faker.random.uuid();
const REGION_3_ID = faker.random.uuid();
const REGION_4_ID = faker.random.uuid();
const TOWN_1_ID = faker.random.uuid();
const TOWN_2_ID = faker.random.uuid();
const TOWN_3_ID = faker.random.uuid();
const TOWN_4_ID = faker.random.uuid();
/**
* Fake Consts
*/
const entityFakeData: {
[entity in EntityNames]?: IOption[];
} = {
account: [
{
accountid: ACCOUNT_1_ID,
name: 'Салон 1',
evo_account_type: 100000001,
evo_supplier_type: 100000000,
statecode: 0,
evo_fin_department_accountid: ACCOUNT_4_ID,
},
{
accountid: ACCOUNT_2_ID,
name: 'Салон 2',
evo_account_type: 100000001,
evo_supplier_type: 100000000,
statecode: 0,
evo_fin_department_accountid: ACCOUNT_5_ID,
},
{
accountid: ACCOUNT_3_ID,
name: 'Салон 3',
evo_account_type: 100000001,
evo_supplier_type: 100000000,
statecode: 0,
},
{
accountid: ACCOUNT_4_ID,
name: 'Финотдел1',
evo_account_type: 100000005,
evo_supplier_type: 100000000,
statecode: 0,
},
{
accountid: ACCOUNT_5_ID,
name: 'Финотдел2',
evo_account_type: 100000005,
evo_supplier_type: 100000000,
statecode: 0,
},
{
accountid: ACCOUNT_6_ID,
name: 'Агент1',
evo_account_type: 100000005,
evo_legal_form: 100000004,
statecode: 0,
},
{
accountid: ACCOUNT_7_ID,
name: 'Агент2',
evo_account_type: 100000005,
evo_legal_form: 100000004,
statecode: 0,
},
{
accountid: ACCOUNT_8_ID,
name: 'Агент3',
evo_account_type: 100000005,
evo_legal_form: 100000004,
statecode: 0,
},
{
accountid: ACCOUNT_9_ID,
name: 'Агент4',
evo_account_type: 100000005,
evo_legal_form: 100000004,
statecode: 0,
},
],
transactioncurrency: [
{
transactioncurrencyid: TRANSACTION_CURRENTCY_1_ID,
isocurrencycode: 'RUB',
statecode: 0,
},
{
transactioncurrencyid: TRANSACTION_CURRENTCY_2_ID,
isocurrencycode: 'USD',
statecode: 0,
},
],
evo_client_type: [
{
evo_client_typeid: EVO_CLIENT_1_ID,
evo_name: 'Новый',
statecode: 0,
},
{
evo_client_typeid: EVO_CLIENT_2_ID,
evo_name: 'Повторный',
statecode: 0,
},
],
evo_client_risk: [
{
evo_client_riskid: EVO_CLIENT_RISK_1_ID,
evo_name: 'Низкий',
statecode: 0,
},
{
evo_client_riskid: EVO_CLIENT_RISK_2_ID,
evo_name: 'Высокий',
statecode: 0,
},
],
lead: [
{
fullname: '100_ООО "с агентами ФЛ',
leadid: LEAD_1_ID,
evo_opportunityid: OPPORTUNITY_1_ID,
evo_agent_accountid: ACCOUNT_6_ID,
evo_double_agent_accountid: ACCOUNT_7_ID,
},
{
fullname: '150_ООО "с брокером',
leadid: LEAD_2_ID,
// evo_opportunityid: OPPORTUNITY_2_ID,
evo_broker_accountid: ACCOUNT_4_ID,
},
{
fullname: '176_ООО "С финотделом',
leadid: LEAD_3_ID,
// evo_opportunityid: OPPORTUNITY_2_ID,
evo_fin_department_accountid: ACCOUNT_5_ID,
},
],
opportunity: [
{
name: '112345_ООО "с агентами ФЛ',
opportunityid: OPPORTUNITY_1_ID,
},
{
name: '145678_ООО "с брокером',
opportunityid: OPPORTUNITY_2_ID,
},
],
quote: [
{
name: '2345_ООО "с агентами ФЛ"',
quoteid: QUOTE_1_ID,
evo_leadid: LEAD_1_ID,
},
{
name: '6789_ООО "с брокером"',
quoteid: QUOTE_2_ID,
evo_leadid: LEAD_2_ID,
},
{
name: '4567_ООО "с агентами ФЛ"',
quoteid: QUOTE_3_ID,
evo_leadid: LEAD_1_ID,
},
{
name: '5678_ООО "с агентами ФЛ"',
quoteid: QUOTE_4_ID,
evo_leadid: LEAD_1_ID,
evo_broker_accountid: ACCOUNT_5_ID,
},
],
evo_gps_brand: [
{
evo_name: 'Цезарь',
evo_gps_brandid: GPS_BRAND_1_ID,
statecode: 0,
},
{
evo_name: 'Аркан',
evo_gps_brandid: GPS_BRAND_2_ID,
statecode: 0,
},
{
evo_name: 'КОбраКоннекс',
evo_gps_brandid: GPS_BRAND_3_ID,
statecode: 0,
},
],
evo_gps_model: [
{
evo_name: 'OmegaX',
evo_gps_modelid: GPS_MODEL_1_ID,
statecode: 0,
evo_gps_brandid: GPS_BRAND_1_ID,
},
{
evo_name: 'Platinum',
evo_gps_modelid: GPS_MODEL_2_ID,
statecode: 0,
evo_gps_brandid: GPS_BRAND_1_ID,
},
{
evo_name: 'Premium',
evo_gps_modelid: GPS_MODEL_3_ID,
statecode: 0,
evo_gps_brandid: GPS_BRAND_2_ID,
},
{
evo_name: 'AutoConnex',
evo_gps_modelid: GPS_MODEL_4_ID,
statecode: 0,
evo_gps_brandid: GPS_BRAND_2_ID,
},
],
evo_region: [
{
evo_name: 'Москвоская',
evo_regionid: REGION_1_ID,
statecode: 0,
},
{
evo_name: 'Калининградская',
evo_regionid: REGION_2_ID,
statecode: 0,
},
{
evo_name: 'Красноярская',
evo_regionid: REGION_3_ID,
statecode: 0,
},
{
evo_name: 'Иркутская',
evo_regionid: REGION_4_ID,
statecode: 0,
},
],
evo_town: [
{
evo_name: 'Одинцово',
evo_townid: TOWN_1_ID,
statecode: 0,
},
{
evo_name: 'Калининград',
evo_townid: TOWN_2_ID,
statecode: 0,
},
{
evo_name: 'Липецк',
evo_townid: TOWN_3_ID,
statecode: 0,
},
{
evo_name: 'Серпухов',
evo_townid: TOWN_4_ID,
statecode: 0,
},
],
};
export default entityFakeData;