add entities for future effects

This commit is contained in:
Владислав Чикалкин 2020-09-25 17:36:05 +03:00
parent fbf8a9f757
commit 3f6099dc1c
4 changed files with 112 additions and 2 deletions

View File

@ -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;

View File

@ -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;

View File

@ -16,4 +16,6 @@ export type EntityNames =
| 'evo_gps_brand'
| 'evo_gps_model'
| 'evo_region'
| 'evo_town';
| 'evo_town'
| 'connection'
| 'evo_connection_role';

View File

@ -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;