276 lines
6.7 KiB
TypeScript
Executable File
276 lines
6.7 KiB
TypeScript
Executable File
// ========================================
|
|
// TypeScript Interfaces for all pgTables
|
|
// ========================================
|
|
|
|
export interface User {
|
|
id: string;
|
|
name?: string | null;
|
|
email?: string | null;
|
|
phone?: string | null;
|
|
address_1?: string | null;
|
|
address_2?: string | null;
|
|
city?: string | null;
|
|
state?: string | null;
|
|
zip?: string | null;
|
|
country?: string | null;
|
|
user_type?: string | null;
|
|
onboarded_landlord?: boolean | null;
|
|
onboarded_tenant?: boolean | null;
|
|
email_verified?: boolean | null;
|
|
banking_setup_complete?: boolean | null;
|
|
onboarding_step?: number | null;
|
|
notification_preferences_json?: string | null;
|
|
payment_preferences_json?: string | null;
|
|
encrypted_data?: string | null;
|
|
started_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface Role {
|
|
id: string;
|
|
description?: string | null;
|
|
}
|
|
|
|
export interface UserRole {
|
|
id: string;
|
|
userId?: string | null;
|
|
roleId?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface StateKey {
|
|
seal_key: string;
|
|
state_id: string;
|
|
cookie_hash: string;
|
|
created_on: number;
|
|
}
|
|
|
|
export interface WebToken {
|
|
token_id: string;
|
|
state_id: string;
|
|
user_id: string;
|
|
token_type: string;
|
|
token_value: string;
|
|
expires_on: number;
|
|
created_on: number;
|
|
updated_on: number;
|
|
last_used_on?: number | null;
|
|
is_active?: boolean | null;
|
|
metadata?: any | null;
|
|
}
|
|
|
|
export interface Obligation {
|
|
id: string;
|
|
user_id?: string | null;
|
|
description?: string | null;
|
|
amount?: number | null;
|
|
frequency?: string | null;
|
|
due_date?: number | null;
|
|
encrypted_data?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface Income {
|
|
id: string;
|
|
user_id?: string | null;
|
|
source?: string | null;
|
|
amount?: number | null;
|
|
frequency?: string | null;
|
|
received_date?: number | null;
|
|
encrypted_data?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface FinancialBalance {
|
|
id: string;
|
|
user_id?: string | null;
|
|
balance?: number | null;
|
|
balance_date?: number | null;
|
|
encrypted_data?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface Property {
|
|
id: string;
|
|
title?: string | null;
|
|
description?: string | null;
|
|
address_1?: string | null;
|
|
address_2?: string | null;
|
|
city?: string | null;
|
|
state?: string | null;
|
|
zip?: string | null;
|
|
country?: string | null;
|
|
bedrooms?: number | null;
|
|
bathrooms?: number | null;
|
|
square_footage?: number | null;
|
|
lot_size?: number | null;
|
|
year_built?: number | null;
|
|
price?: number | null;
|
|
property_type?: string | null;
|
|
listing_status?: string | null;
|
|
rental_status?: string | null;
|
|
monthly_rent?: number | null;
|
|
security_deposit?: number | null;
|
|
default_payment_method_id?: string | null;
|
|
lease_duration_months?: number | null;
|
|
amenities?: string | null;
|
|
property_photos_count?: number | null;
|
|
image_url?: string | null;
|
|
encrypted_data?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
owner_id?: string | null;
|
|
}
|
|
|
|
export interface RentSchedule {
|
|
id: string;
|
|
property_id?: string | null;
|
|
rent_amount?: number | null;
|
|
due_day?: number | null;
|
|
late_fee_amount?: number | null;
|
|
grace_period_days?: number | null;
|
|
payment_methods_allowed?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface Lease {
|
|
id: string;
|
|
title?: string | null;
|
|
property_id?: string | null;
|
|
property_address?: string | null;
|
|
tenant_id?: string | null;
|
|
owner_id?: string | null;
|
|
start_date?: number | null;
|
|
end_date?: number | null;
|
|
rent?: number | null;
|
|
security_deposit?: number | null;
|
|
default_payment_method_id?: string | null;
|
|
lease_status?: string | null;
|
|
lease_document_url?: string | null;
|
|
payment_schedule_id?: string | null;
|
|
late_fee_rules?: string | null;
|
|
auto_renewal?: boolean | null;
|
|
encrypted_data?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface PaymentMethod {
|
|
id: string;
|
|
user_id?: string | null;
|
|
method_type?: string | null;
|
|
bank_name?: string | null;
|
|
account_type?: string | null;
|
|
routing_number_encrypted?: string | null;
|
|
account_number_encrypted?: string | null;
|
|
is_default?: boolean | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface PropertyMedia {
|
|
id: string;
|
|
property_id?: string | null;
|
|
media_type?: string | null;
|
|
file_url?: string | null;
|
|
file_name?: string | null;
|
|
display_order?: number | null;
|
|
created_on?: number | null;
|
|
}
|
|
|
|
export interface LeaseDocument {
|
|
id: string;
|
|
lease_id?: string | null;
|
|
document_type?: string | null;
|
|
file_url?: string | null;
|
|
file_name?: string | null;
|
|
signed_by_landlord?: boolean | null;
|
|
signed_by_tenant?: boolean | null;
|
|
signature_date?: number | null;
|
|
created_on?: number | null;
|
|
}
|
|
|
|
export interface TenantApplication {
|
|
id: string;
|
|
property_id?: string | null;
|
|
applicant_id?: string | null;
|
|
application_status?: string | null;
|
|
application_data_encrypted?: string | null;
|
|
document_urls_json?: any | null;
|
|
submitted_on?: number | null;
|
|
reviewed_on?: number | null;
|
|
}
|
|
|
|
export interface TenantInvite {
|
|
id: string;
|
|
landlord_id?: string | null;
|
|
property_id?: string | null;
|
|
available_on?: number | null;
|
|
invited_emails?: string | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface PaymentTransaction {
|
|
id: string;
|
|
lease_id?: string | null;
|
|
amount?: number | null;
|
|
payment_date?: number | null;
|
|
payment_method?: string | null;
|
|
transaction_status?: string | null;
|
|
stripe_payment_id?: string | null;
|
|
created_on?: number | null;
|
|
}
|
|
|
|
export interface Reminder {
|
|
id: string;
|
|
user_id: string;
|
|
lease_id?: string | null;
|
|
reminder_type: string;
|
|
title: string;
|
|
description?: string | null;
|
|
due_date: number;
|
|
is_completed?: boolean | null;
|
|
created_on?: number | null;
|
|
updated_on?: number | null;
|
|
}
|
|
|
|
export interface Message {
|
|
id: string;
|
|
lease_id?: string | null;
|
|
sender_id?: string | null;
|
|
recipient_id?: string | null;
|
|
message_type?: string | null;
|
|
subject?: string | null;
|
|
parent_message_id?: string | null;
|
|
attachments_json?: any | null;
|
|
content?: string | null;
|
|
content_encrypted?: string | null;
|
|
is_read?: boolean | null;
|
|
created_on?: number | null;
|
|
}
|
|
|
|
export interface MaintenanceRequest {
|
|
id: string;
|
|
property_id?: string | null;
|
|
tenant_id?: string | null;
|
|
request_type?: string | null;
|
|
description?: string | null;
|
|
status?: string | null;
|
|
priority?: string | null;
|
|
created_on?: number | null;
|
|
resolved_on?: number | null;
|
|
}
|
|
|
|
export interface UserPin {
|
|
user_id: string;
|
|
pin: string;
|
|
created_on: number;
|
|
modified_on: number;
|
|
}
|