iworks-core-api
Version:
iwroks server api module
138 lines (126 loc) • 2.87 kB
text/typescript
import { IProjectStage } from './projectStage';
export enum ProjectPhaseStatus {
// The phase is new and no its stage is on the market
created = 'created',
// At least one stage is on the market
queue = 'queue',
// At least one stage is in progress
inprogress = 'inprogress',
// All stages are completed
completed = 'completed',
}
export enum ProjectStatus {
// The project is new and no its phase is on the market
created = 'created',
// At least one phase is on the market
queue = 'queue',
// At least one phase is in progress
inprogress = 'inprogress',
// All phases are completed
completed = 'completed',
}
export interface IStateProperty {
id: string;
layoutCode: string;
address: string;
propertyType: string;
props: {
roomNumber: number,
area: number,
};
residentialComplex: {
id: string;
name: string;
company: string;
};
}
export interface ICustomer {
id: string;
firstName: string;
middleName: string;
lastName: string;
name?: string;
individual: boolean;
phone: string;
email: string;
}
export interface IJob {
id: string;
vol: number;
providerLinked: boolean;
}
export interface IFees {
agentFee?: number;
pmFee?: number;
tnFee?: number;
workerFee?: number;
jobPriceMultiplicator?: number;
materialsDiscount?: number;
}
export interface ICreateProject {
renovationProjectTplId: string;
managerId?: string;
ownerId?: string;
stateProperty: Partial<IStateProperty>;
customer: Partial<ICustomer>;
customerId: string;
jobs: IJob[];
props: {
agreementNum?: string;
agreementDate?: string;
bimProjectRef?: string;
techDocRef?: string;
fees: Partial<IFees>;
};
}
export interface IUpdateProject {
id: string;
managerId?: string;
ownerId?: string;
stateProperty: Partial<IStateProperty>;
customer: Partial<ICustomer>;
props: {
agreementNum?: string;
agreementDate?: string;
bimProjectRef?: string;
techDocRef?: string;
fees: Partial<IFees>;
};
}
export interface IDeleteProject {
id: string;
}
export interface IProjectPhase {
id: number;
started?: string;
finished?: string;
phaseId: number;
renovationProjectId: string;
created: string;
updated: string;
status: ProjectPhaseStatus;
projectStages: Partial<IProjectStage>[];
}
export interface IProject {
id: string;
numProject: number;
status: ProjectStatus;
created: string;
updated: string;
totalPrice: number;
price: number;
managerId?: string;
ownerId?: string;
renovationProjectTplId: string;
props: {
agreementNum?: string;
agreementDate?: string;
bimProjectRef?: string;
techDocRef?: string;
fees: Partial<IFees>;
};
stateProperty: Partial<IStateProperty>;
customer: Partial<ICustomer>;
customerId: string;
projectPhases: Partial<IProjectPhase>[];
}