@arkasuryawan/m2-interfaces
Version:
Squaremetre Data Interfaces
106 lines (105 loc) • 3.42 kB
TypeScript
import mongoose from "mongoose";
import { AuditInterface, WhiteLabelInterface, ContactInterface, TenantInterface, AgentInterface } from ".";
import { CurrencyId, ProjectInterface, ProjectLotInterface, ProjectLotVarianceInterface } from "./project.interface";
export declare type TransactionType = "EOI" | "HOLD" | "CONTRACT" | "DEPOSIT" | "FALL OVER" | "SOLD" | "BOOKED" | "ACTIVE";
export declare type TransactionCategory = "FRACTIONAL" | "NORMAL" | "PARTIAL";
export interface TransactionInterface extends AuditInterface {
id: string;
projectId: string;
project: ProjectInterface;
fractionalId?: string;
fractional?: ProjectLotInterface;
fractionalLabel?: string;
lotId?: string;
lot?: ProjectLotInterface;
lotVarianceId?: string;
lotVariance?: ProjectLotVarianceInterface;
lastStatus: TransactionType;
whiteLabelId?: string;
whiteLabel?: WhiteLabelInterface;
whiteLabelDomain: string;
tenantId?: string;
tenant?: TenantInterface;
description?: string;
clientId: string;
client: ContactInterface;
realPrice?: number;
promoCode?: string;
promoValue?: number;
pipedriveDealId?: number;
pipedriveDeal?: any;
promoType?: "Percentage" | "Fix Price";
price: number;
expiredDate?: string;
deposit: number;
currency: CurrencyId;
salesRefId?: string;
salesRef?: AgentInterface;
salesRefIds?: string[];
salesRefs?: AgentInterface[];
leadSource?: string;
ownership?: number;
transactionType: "FRACTIONAL" | "NORMAL" | "PARTIAL";
paymentStatus?: string;
paymentType?: string;
financing?: string;
note?: string;
transactionUrl?: string;
}
export interface TransactionInterfaceServer extends AuditInterface {
id: string;
projectId: string;
project: mongoose.Types.ObjectId;
fractionalId?: string;
fractional?: mongoose.Types.ObjectId;
fractionalLabel?: string;
lotId?: string;
lot?: mongoose.Types.ObjectId;
lotVarianceId?: string;
lotVariance?: mongoose.Types.ObjectId;
lastStatus: TransactionType;
whiteLabelId?: string;
whiteLabel?: mongoose.Types.ObjectId;
whiteLabelDomain: string;
tenantId?: string;
tenant: mongoose.Types.ObjectId;
description?: string;
clientId: string;
client: mongoose.Types.ObjectId | ContactInterface;
realPrice?: number;
promoCode?: string;
promoValue?: number;
promoType?: "Percentage" | "Fix Price";
price: number;
expiredDate?: string;
deposit: number;
currency: CurrencyId;
salesRefId?: string;
salesRef?: mongoose.Types.ObjectId | AgentInterface;
salesRefIds?: string[];
salesRefs?: AgentInterface[];
leadSource?: string;
ownership?: number;
transactionType: "FRACTIONAL" | "NORMAL" | "PARTIAL";
paymentStatus?: string;
paymentType?: string;
financing?: string;
note?: string;
transactionUrl?: string;
}
export interface TransactionDetailInterface extends AuditInterface {
id: string;
transactionID: string;
transaction: TransactionInterface;
type: TransactionType;
description?: string;
expiredDate?: string;
}
export interface TransactionDetailInterfaceServer extends AuditInterface {
id: string;
transactionID: string;
transaction: mongoose.Types.ObjectId;
type: TransactionType;
description?: string;
expiredDate?: string;
}