Merge pull request 'fix: move company status fields in different types' (#3) from fix/add-company-states into master
Reviewed-on: #3
This commit is contained in:
commit
5520ff6390
@ -47,14 +47,38 @@ export type TPerson = TContactEnvelope<
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
type TCompanyInCreation = {
|
||||
status: "planned" | "founding";
|
||||
};
|
||||
|
||||
type TCompanyActive = {
|
||||
status: "active";
|
||||
foundedDate: general.IDate;
|
||||
};
|
||||
|
||||
type TCompanyInLiquidation = {
|
||||
status: "liquidation";
|
||||
foundedDate: general.IDate;
|
||||
liquidationDate: general.IDate;
|
||||
};
|
||||
|
||||
type TCompanyClosed = {
|
||||
status: "closed";
|
||||
foundedDate: general.IDate;
|
||||
liquidationDate: general.IDate;
|
||||
closedDate: general.IDate;
|
||||
};
|
||||
|
||||
type TCompanyStatus =
|
||||
| TCompanyInCreation
|
||||
| TCompanyActive
|
||||
| TCompanyInLiquidation
|
||||
| TCompanyClosed;
|
||||
|
||||
export type TCompany = TContactEnvelope<
|
||||
"company",
|
||||
{
|
||||
registrationDetails: TRegistrationDetails;
|
||||
foundedDate: general.IDate;
|
||||
closedDate: general.IDate;
|
||||
status: "planned" | "founding" | "active" | "liquidation" | "closed";
|
||||
}
|
||||
{ registrationDetails: TRegistrationDetails } & TCompanyStatus
|
||||
>;
|
||||
|
||||
export type TContact = TPerson | TCompany;
|
||||
|
Loading…
x
Reference in New Issue
Block a user