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
Владислав Чикалкин 3d9d6c4abd second effect
2020-09-23 19:18:33 +03:00

258 lines
5.8 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 LEAD_1_ID = faker.random.uuid();
const LEAD_2_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 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Салона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,
},
],
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,
},
{
fullname: '150_ООО "Некромант',
leadid: LEAD_2_ID,
// evo_opportunityid: OPPORTUNITY_2_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,
},
],
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;