Database Schema Export — 219 tables, 3215 columns Schema: public ================================================================================ TABLE: account_information (9 columns) ------------------------------------------------------------ bank_name text NULL account_number text NULL ifsc_code text NULL branch_name text NULL if_salaried_account text NULL name_as_bank_account text NULL user_id text NULL account_type text NULL if_verified boolean NULL DEFAULT false TABLE: address_detail (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('address_detail_id_seq'::regclass) doctor_id text NULL user_id text NULL address_type text NULL address text NULL building text NULL locality text NULL pin_code text NULL city text NULL state text NULL residence_value text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: agent_audit_log (9 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('agent_audit_log_id_seq'::regclass) agent_id bigint NULL action character varying(100) NOT NULL entity_type character varying(100) NOT NULL entity_id character varying(100) NOT NULL request_id character varying(100) NULL ip character varying(64) NULL metadata_json text NULL created_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: agent_audit_log_pkey: CREATE UNIQUE INDEX agent_audit_log_pkey ON public.agent_audit_log USING btree (id) ix_agent_audit_log_agent_created: CREATE INDEX ix_agent_audit_log_agent_created ON public.agent_audit_log USING btree (agent_id, created_at DESC) ix_agent_audit_log_entity: CREATE INDEX ix_agent_audit_log_entity ON public.agent_audit_log USING btree (entity_type, entity_id, created_at DESC) TABLE: agent_role_assignment (8 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('agent_role_assignment_id_seq'::regclass) agent_id bigint NOT NULL role_code character varying(100) NOT NULL scope_type character varying(30) NOT NULL scope_ref_id character varying(100) NOT NULL status character varying(50) NOT NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: agent_role_assignment_pkey: CREATE UNIQUE INDEX agent_role_assignment_pkey ON public.agent_role_assignment USING btree (id) ux_agent_role_assignment_unique_scope: CREATE UNIQUE INDEX ux_agent_role_assignment_unique_scope ON public.agent_role_assignment USING btree (agent_id, role_code, scope_type, scope_ref_id) ix_agent_role_assignment_agent_status_created: CREATE INDEX ix_agent_role_assignment_agent_status_created ON public.agent_role_assignment USING btree (agent_id, status, created_at DESC) TABLE: app_update_config (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('app_update_config_id_seq'::regclass) app_update_id character varying(255) NULL min_required_version character varying(50) NULL force_update boolean NOT NULL DEFAULT false added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: app_update_config_pkey: CREATE UNIQUE INDEX app_update_config_pkey ON public.app_update_config USING btree (id) TABLE: application_id_day_seq (2 columns) ------------------------------------------------------------ business_date date NOT NULL last_seq integer NOT NULL INDEXES: application_id_day_seq_pkey: CREATE UNIQUE INDEX application_id_day_seq_pkey ON public.application_id_day_seq USING btree (business_date) TABLE: application_state (31 columns) ------------------------------------------------------------ loan_id character varying(50) NOT NULL doctor_id character varying(50) NOT NULL user_id character varying(50) NULL application_id character varying(50) NULL borrower_name_received boolean NULL DEFAULT false mobile_received boolean NULL DEFAULT false treatment_amount_received boolean NULL DEFAULT false income_received boolean NULL DEFAULT false current_pincode_received boolean NULL DEFAULT false permanent_pincode_received boolean NULL DEFAULT false pan_received boolean NULL DEFAULT false dob_received boolean NULL DEFAULT false gender_received boolean NULL DEFAULT false employment_type_received boolean NULL DEFAULT false email_received boolean NULL DEFAULT false company_name_received boolean NULL DEFAULT false borrower_name character varying(255) NULL mobile character varying(20) NULL treatment_amount numeric NULL monthly_income numeric NULL current_pincode character varying(20) NULL permanent_pincode character varying(20) NULL pan character varying(20) NULL dob date NULL gender character varying(20) NULL employment_type character varying(50) NULL email character varying(255) NULL company_name character varying(255) NULL overall_state character varying(50) NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: application_state_pkey: CREATE UNIQUE INDEX application_state_pkey ON public.application_state USING btree (loan_id) idx_application_state_doctor: CREATE INDEX idx_application_state_doctor ON public.application_state USING btree (doctor_id) TABLE: appointment_details (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('appointment_details_id_seq'::regclass) doctor_id text NULL appointment_id text NULL treatment text NULL patient_name text NULL mobile_number text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL user_id text NULL invoice_no text NULL invoice_code text NULL visit_date timestamp without time zone NULL appointment_status character varying(255) NULL TABLE: arthmate_loan_document (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('arthmate_loan_document_id_seq'::regclass) user_id text NULL document_id text NULL document_name text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: attendance (10 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('attendance_id_seq'::regclass) user_id character varying(255) NULL user_type character varying(100) NULL attendance_date character varying(50) NULL attendance_id character varying(255) NULL check_in timestamp without time zone NULL check_out timestamp without time zone NULL status character varying(50) NULL check_in_location character varying(255) NULL check_out_location character varying(255) NULL INDEXES: attendance_pkey: CREATE UNIQUE INDEX attendance_pkey ON public.attendance USING btree (id) TABLE: auto_disbursal_audit (9 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('auto_disbursal_audit_id_seq'::regclass) job_id character varying(64) NOT NULL loan_id character varying(64) NOT NULL application_id character varying(64) NULL stage character varying(64) NOT NULL status character varying(32) NOT NULL message text NULL payload text NULL created_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: auto_disbursal_audit_pkey: CREATE UNIQUE INDEX auto_disbursal_audit_pkey ON public.auto_disbursal_audit USING btree (id) idx_auto_disbursal_audit_job_id: CREATE INDEX idx_auto_disbursal_audit_job_id ON public.auto_disbursal_audit USING btree (job_id) idx_auto_disbursal_audit_loan_id: CREATE INDEX idx_auto_disbursal_audit_loan_id ON public.auto_disbursal_audit USING btree (loan_id) TABLE: auto_disbursal_job (12 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('auto_disbursal_job_id_seq'::regclass) job_id character varying(64) NOT NULL loan_id character varying(64) NOT NULL trigger_source character varying(32) NOT NULL status character varying(32) NOT NULL do_shared_at timestamp without time zone NULL cooling_ends_at timestamp without time zone NULL attempt_count integer NOT NULL DEFAULT 0 last_error text NULL initiated_at timestamp without time zone NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: auto_disbursal_job_pkey: CREATE UNIQUE INDEX auto_disbursal_job_pkey ON public.auto_disbursal_job USING btree (id) auto_disbursal_job_job_id_key: CREATE UNIQUE INDEX auto_disbursal_job_job_id_key ON public.auto_disbursal_job USING btree (job_id) idx_auto_disbursal_job_loan_id: CREATE INDEX idx_auto_disbursal_job_loan_id ON public.auto_disbursal_job USING btree (loan_id) idx_auto_disbursal_job_status_cooling: CREATE INDEX idx_auto_disbursal_job_status_cooling ON public.auto_disbursal_job USING btree (status, cooling_ends_at) uq_auto_disbursal_job_active_loan: CREATE UNIQUE INDEX uq_auto_disbursal_job_active_loan ON public.auto_disbursal_job USING btree (loan_id) WHERE ((status)::text = ANY ((ARRAY['PENDING_COOLING'::character varying, 'READY'::character varying, 'INITIATED'::character varying])::text[])) TABLE: auto_settlement_audit (16 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('auto_settlement_audit_id_seq'::regclass) run_id character varying(64) NOT NULL lender_name character varying(64) NOT NULL started_at timestamp without time zone NOT NULL ended_at timestamp without time zone NULL status character varying(32) NOT NULL total_fetched integer NULL DEFAULT 0 eligible_count integer NULL DEFAULT 0 attempted_count integer NULL DEFAULT 0 success_count integer NULL DEFAULT 0 skipped_count integer NULL DEFAULT 0 failed_count integer NULL DEFAULT 0 skip_reason_summary text NULL error_message text NULL host_name character varying(128) NULL created_on timestamp without time zone NULL DEFAULT now() INDEXES: auto_settlement_audit_pkey: CREATE UNIQUE INDEX auto_settlement_audit_pkey ON public.auto_settlement_audit USING btree (id) idx_auto_settlement_audit_run_id: CREATE INDEX idx_auto_settlement_audit_run_id ON public.auto_settlement_audit USING btree (run_id) idx_auto_settlement_audit_started_at: CREATE INDEX idx_auto_settlement_audit_started_at ON public.auto_settlement_audit USING btree (started_at) TABLE: axis_transfer_payment (46 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('axis_transfer_payment_id_seq'::regclass) loan_id text NULL doctor_id text NULL doctor_name text NULL transaction_type text NULL txn_paymode text NULL cust_uniq_ref text NULL corp_acc_num text NULL value_date text NULL txn_amount text NULL bene_lei text NULL bene_name text NULL bene_code text NULL bene_acc_num text NULL bene_ac_type text NULL bene_addr1 text NULL bene_addr2 text NULL bene_addr3 text NULL bene_city text NULL bene_state text NULL bene_pincode text NULL bene_ifsc_code text NULL bene_bank_name text NULL bene_email_addr1 text NULL bene_mobile_no text NULL txn_type text NULL sender_to_receiver_info text NULL response_status text NULL response_message text NULL status text NULL status_description text NULL batch_no text NULL utr_no text NULL processing_date text NULL response_code text NULL axis_response text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL gross_txn_amount character varying(50) NULL recovery_offset_amount character varying(50) NULL settlement_recovery_id integer NULL lender_id character varying(100) NULL lender_name character varying(255) NULL remarks character varying(500) NULL transfer_purpose character varying(50) NULL application_id character varying(100) NULL INDEXES: axis_transfer_payment_pkey: CREATE UNIQUE INDEX axis_transfer_payment_pkey ON public.axis_transfer_payment USING btree (id) idx_axis_transfer_payment_cust_uniq_ref: CREATE INDEX idx_axis_transfer_payment_cust_uniq_ref ON public.axis_transfer_payment USING btree (cust_uniq_ref) idx_axis_transfer_payment_doctor_id: CREATE INDEX idx_axis_transfer_payment_doctor_id ON public.axis_transfer_payment USING btree (doctor_id) idx_axis_transfer_payment_loan_id: CREATE INDEX idx_axis_transfer_payment_loan_id ON public.axis_transfer_payment USING btree (loan_id) ux_axis_transfer_payment_inflight_loan: CREATE UNIQUE INDEX ux_axis_transfer_payment_inflight_loan ON public.axis_transfer_payment USING btree (loan_id) WHERE (status = ANY (ARRAY['INITIATING'::text, 'PENDING'::text])) idx_axis_transfer_payment_lender_purpose: CREATE INDEX idx_axis_transfer_payment_lender_purpose ON public.axis_transfer_payment USING btree (lender_id, transfer_purpose) idx_axis_transfer_payment_application_id: CREATE INDEX idx_axis_transfer_payment_application_id ON public.axis_transfer_payment USING btree (application_id) TABLE: bank_details_cp (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('bank_details_cp_id_seq'::regclass) doctor_id text NULL account_number text NULL account_type text NULL bank_address text NULL bank_name text NULL branch_name text NULL ifsc_code text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL account_holder_name text NULL if_verified boolean NULL DEFAULT false bene_name character varying(255) NULL TABLE: bre_api_logs (7 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('bre_api_logs_id_seq'::regclass) loan_id character varying(100) NULL user_id character varying(100) NULL request_body text NULL response_body text NULL status_code integer NULL added_on timestamp without time zone NULL INDEXES: bre_api_logs_pkey: CREATE UNIQUE INDEX bre_api_logs_pkey ON public.bre_api_logs USING btree (id) TABLE: bureau_decision (12 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('bureau_decision_id_seq'::regclass) loan_id text NULL bureau_decision text NULL decision_reason text NULL bureau_based_max_eligible_emi double precision NULL added_on date NULL updated_on date NULL type text NULL bureau_score character varying(255) NULL bureau_type character varying(255) NULL is_bureau_fetched boolean NULL max_gross_treatment_amount double precision NULL DEFAULT 0.0 TABLE: bureau_mannual_intervention (7 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('bureau_mannual_intervention_id_seq'::regclass) loan_id text NULL status boolean NULL DEFAULT false flag text NULL added_on date NULL updated_on date NULL type text NULL TABLE: care_pay_webhook_event (16 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('care_pay_webhook_event_id_seq'::regclass) order_id character varying(255) NOT NULL loan_id character varying(255) NULL doctor_id character varying(255) NULL event_type character varying(100) NOT NULL loan_status character varying(100) NULL loan_sub_status character varying(100) NULL webhook_url character varying(500) NOT NULL payload text NULL response_status_code integer NULL response_body text NULL status character varying(50) NOT NULL DEFAULT 'PENDING'::character varying retry_count integer NOT NULL DEFAULT 0 error_message text NULL created_on timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP sent_on timestamp without time zone NULL INDEXES: care_pay_webhook_event_pkey: CREATE UNIQUE INDEX care_pay_webhook_event_pkey ON public.care_pay_webhook_event USING btree (id) idx_webhook_event_created_on: CREATE INDEX idx_webhook_event_created_on ON public.care_pay_webhook_event USING btree (created_on) idx_webhook_event_doctor_id: CREATE INDEX idx_webhook_event_doctor_id ON public.care_pay_webhook_event USING btree (doctor_id) idx_webhook_event_failed_retry: CREATE INDEX idx_webhook_event_failed_retry ON public.care_pay_webhook_event USING btree (status, retry_count) WHERE ((status)::text = 'FAILED'::text) idx_webhook_event_loan_id: CREATE INDEX idx_webhook_event_loan_id ON public.care_pay_webhook_event USING btree (loan_id) idx_webhook_event_order_id: CREATE INDEX idx_webhook_event_order_id ON public.care_pay_webhook_event USING btree (order_id) idx_webhook_event_status: CREATE INDEX idx_webhook_event_status ON public.care_pay_webhook_event USING btree (status) TABLE: carepay_loan_emi (14 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('carepay_loan_emi_id_seq'::regclass) loan_id text NULL date timestamp without time zone NULL emi_no integer NULL emi_amount double precision NULL emi_paid_amount numeric NULL status boolean NULL paid_date timestamp without time zone NULL overdue_amount numeric NULL loan_status text NULL emi_id text NULL principal double precision NULL interest double precision NULL balance double precision NULL INDEXES: carepay_loan_emi_pkey: CREATE UNIQUE INDEX carepay_loan_emi_pkey ON public.carepay_loan_emi USING btree (id) TABLE: cash_free_details (4 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('cash_free_details_id_seq'::regclass) user_id character varying(255) NULL ref_id character varying(255) NULL added_on timestamp without time zone NULL TABLE: cashfree_order_audit_log (14 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('cashfree_order_audit_log_id_seq'::regclass) loan_id character varying(255) NOT NULL order_id character varying(255) NULL order_type character varying(50) NULL event_type character varying(80) NOT NULL status_from character varying(50) NULL status_to character varying(50) NULL payment_status character varying(50) NULL source character varying(50) NULL message character varying(2000) NULL request_payload text NULL response_payload text NULL actor character varying(100) NULL added_on timestamp without time zone NULL INDEXES: cashfree_order_audit_log_pkey: CREATE UNIQUE INDEX cashfree_order_audit_log_pkey ON public.cashfree_order_audit_log USING btree (id) idx_cashfree_order_audit_loan: CREATE INDEX idx_cashfree_order_audit_loan ON public.cashfree_order_audit_log USING btree (loan_id) idx_cashfree_order_audit_order: CREATE INDEX idx_cashfree_order_audit_order ON public.cashfree_order_audit_log USING btree (order_id) TABLE: center_hospital_mapping (7 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('center_hospital_mapping_id_seq'::regclass) center_id bigint NOT NULL hospital_id character varying(100) NOT NULL status character varying(50) NOT NULL effective_from timestamp without time zone NULL effective_to timestamp without time zone NULL created_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: center_hospital_mapping_pkey: CREATE UNIQUE INDEX center_hospital_mapping_pkey ON public.center_hospital_mapping USING btree (id) ux_center_hospital_mapping_center_hospital: CREATE UNIQUE INDEX ux_center_hospital_mapping_center_hospital ON public.center_hospital_mapping USING btree (center_id, hospital_id) ix_center_hospital_mapping_center_status: CREATE INDEX ix_center_hospital_mapping_center_status ON public.center_hospital_mapping USING btree (center_id, status) TABLE: checkout_emi_attempt (11 columns) ------------------------------------------------------------ payment_attempt_fk bigint NOT NULL nbfc_partner character varying(64) NULL emi_plan_code character varying(64) NULL tenure_months integer NULL roi numeric NULL loan_id character varying(64) NULL application_id character varying(32) NULL mandate_provider character varying(20) NULL mandate_ref character varying(128) NULL created_at timestamp without time zone NOT NULL updated_at timestamp without time zone NOT NULL INDEXES: checkout_emi_attempt_pkey: CREATE UNIQUE INDEX checkout_emi_attempt_pkey ON public.checkout_emi_attempt USING btree (payment_attempt_fk) idx_checkout_emi_loan: CREATE INDEX idx_checkout_emi_loan ON public.checkout_emi_attempt USING btree (loan_id) idx_checkout_emi_app: CREATE INDEX idx_checkout_emi_app ON public.checkout_emi_attempt USING btree (application_id) TABLE: checkout_event_audit (9 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('checkout_event_audit_id_seq'::regclass) order_fk bigint NOT NULL event_type character varying(64) NOT NULL from_status character varying(30) NULL to_status character varying(30) NULL event_source character varying(20) NOT NULL event_ref character varying(128) NULL payload_json text NULL created_at timestamp without time zone NOT NULL INDEXES: checkout_event_audit_pkey: CREATE UNIQUE INDEX checkout_event_audit_pkey ON public.checkout_event_audit USING btree (id) idx_checkout_event_order_created: CREATE INDEX idx_checkout_event_order_created ON public.checkout_event_audit USING btree (order_fk, created_at DESC) idx_checkout_event_type_created: CREATE INDEX idx_checkout_event_type_created ON public.checkout_event_audit USING btree (event_type, created_at DESC) TABLE: checkout_offer_redemption (11 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('checkout_offer_redemption_id_seq'::regclass) order_fk bigint NOT NULL offer_type character varying(20) NOT NULL offer_code character varying(64) NULL offer_source_id bigint NULL discount_mode character varying(10) NOT NULL discount_value numeric NOT NULL applied_amount numeric NOT NULL validation_snapshot_json text NOT NULL is_final boolean NOT NULL DEFAULT false created_at timestamp without time zone NOT NULL INDEXES: checkout_offer_redemption_pkey: CREATE UNIQUE INDEX checkout_offer_redemption_pkey ON public.checkout_offer_redemption USING btree (id) idx_checkout_offer_order: CREATE INDEX idx_checkout_offer_order ON public.checkout_offer_redemption USING btree (order_fk) idx_checkout_offer_code: CREATE INDEX idx_checkout_offer_code ON public.checkout_offer_redemption USING btree (offer_code) TABLE: checkout_order (15 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('checkout_order_id_seq'::regclass) order_id character varying(40) NOT NULL user_id character varying(64) NOT NULL merchant_id character varying(64) NOT NULL journey_source character varying(20) NOT NULL payment_mode character varying(20) NULL status character varying(30) NOT NULL currency character varying(8) NOT NULL DEFAULT 'INR'::character varying loan_id character varying(64) NULL application_id character varying(32) NULL idempotency_key character varying(64) NOT NULL expires_at timestamp without time zone NULL created_at timestamp without time zone NOT NULL updated_at timestamp without time zone NOT NULL version integer NOT NULL DEFAULT 0 INDEXES: checkout_order_pkey: CREATE UNIQUE INDEX checkout_order_pkey ON public.checkout_order USING btree (id) checkout_order_order_id_key: CREATE UNIQUE INDEX checkout_order_order_id_key ON public.checkout_order USING btree (order_id) uk_checkout_order_idempotency: CREATE UNIQUE INDEX uk_checkout_order_idempotency ON public.checkout_order USING btree (user_id, idempotency_key) idx_checkout_order_status_created: CREATE INDEX idx_checkout_order_status_created ON public.checkout_order USING btree (status, created_at DESC) idx_checkout_order_loan: CREATE INDEX idx_checkout_order_loan ON public.checkout_order USING btree (loan_id) idx_checkout_order_merchant_created: CREATE INDEX idx_checkout_order_merchant_created ON public.checkout_order USING btree (merchant_id, created_at DESC) TABLE: checkout_order_amount (8 columns) ------------------------------------------------------------ order_fk bigint NOT NULL gross_amount numeric NOT NULL discount_amount numeric NOT NULL DEFAULT 0 fee_amount numeric NOT NULL DEFAULT 0 tax_amount numeric NOT NULL DEFAULT 0 net_payable_amount numeric NOT NULL refunded_amount numeric NOT NULL DEFAULT 0 last_recalculated_at timestamp without time zone NOT NULL INDEXES: checkout_order_amount_pkey: CREATE UNIQUE INDEX checkout_order_amount_pkey ON public.checkout_order_amount USING btree (order_fk) TABLE: checkout_order_item (10 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('checkout_order_item_id_seq'::regclass) order_fk bigint NOT NULL item_type character varying(20) NOT NULL item_ref_id character varying(64) NULL item_name character varying(255) NOT NULL quantity integer NOT NULL DEFAULT 1 unit_amount numeric NOT NULL gross_amount numeric NOT NULL metadata_json text NULL created_at timestamp without time zone NOT NULL INDEXES: checkout_order_item_pkey: CREATE UNIQUE INDEX checkout_order_item_pkey ON public.checkout_order_item USING btree (id) idx_checkout_order_item_order: CREATE INDEX idx_checkout_order_item_order ON public.checkout_order_item USING btree (order_fk) TABLE: checkout_payment_attempt (15 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('checkout_payment_attempt_id_seq'::regclass) order_fk bigint NOT NULL attempt_no integer NOT NULL payment_mode character varying(20) NOT NULL provider character varying(20) NOT NULL provider_order_ref character varying(128) NULL provider_payment_ref character varying(128) NULL status character varying(25) NOT NULL amount numeric NOT NULL request_json text NULL response_json text NULL error_code character varying(64) NULL error_message character varying(255) NULL created_at timestamp without time zone NOT NULL updated_at timestamp without time zone NOT NULL INDEXES: checkout_payment_attempt_pkey: CREATE UNIQUE INDEX checkout_payment_attempt_pkey ON public.checkout_payment_attempt USING btree (id) uk_checkout_payment_attempt: CREATE UNIQUE INDEX uk_checkout_payment_attempt ON public.checkout_payment_attempt USING btree (order_fk, attempt_no) idx_checkout_payment_provider_ref: CREATE INDEX idx_checkout_payment_provider_ref ON public.checkout_payment_attempt USING btree (provider, provider_payment_ref) TABLE: checkout_refund (13 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('checkout_refund_id_seq'::regclass) refund_id character varying(64) NOT NULL order_fk bigint NOT NULL refund_type character varying(10) NOT NULL refund_scope character varying(20) NOT NULL status character varying(20) NOT NULL requested_amount numeric NOT NULL approved_amount numeric NULL reason_code character varying(64) NULL reason_text character varying(255) NULL initiated_by character varying(64) NULL created_at timestamp without time zone NOT NULL updated_at timestamp without time zone NOT NULL INDEXES: checkout_refund_pkey: CREATE UNIQUE INDEX checkout_refund_pkey ON public.checkout_refund USING btree (id) checkout_refund_refund_id_key: CREATE UNIQUE INDEX checkout_refund_refund_id_key ON public.checkout_refund USING btree (refund_id) idx_checkout_refund_order_created: CREATE INDEX idx_checkout_refund_order_created ON public.checkout_refund USING btree (order_fk, created_at DESC) idx_checkout_refund_status_created: CREATE INDEX idx_checkout_refund_status_created ON public.checkout_refund USING btree (status, created_at DESC) TABLE: checkout_refund_attempt (12 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('checkout_refund_attempt_id_seq'::regclass) refund_fk bigint NOT NULL attempt_no integer NOT NULL provider character varying(20) NOT NULL provider_refund_ref character varying(128) NULL status character varying(20) NOT NULL request_json text NULL response_json text NULL error_code character varying(64) NULL error_message character varying(255) NULL created_at timestamp without time zone NOT NULL updated_at timestamp without time zone NOT NULL INDEXES: checkout_refund_attempt_pkey: CREATE UNIQUE INDEX checkout_refund_attempt_pkey ON public.checkout_refund_attempt USING btree (id) uk_checkout_refund_attempt: CREATE UNIQUE INDEX uk_checkout_refund_attempt ON public.checkout_refund_attempt USING btree (refund_fk, attempt_no) TABLE: click_wrap_signature (29 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('click_wrap_signature_id_seq'::regclass) loan_id character varying(255) NULL agreement_version character varying(255) NULL agreement_title character varying(255) NULL agreement_text text NULL signing_date timestamp without time zone NULL otp_sent_time timestamp without time zone NULL otp_verified_time timestamp without time zone NULL otp_code integer NULL ip_address character varying(255) NULL user_agent character varying(500) NULL verification_status character varying(50) NULL acceptance_time timestamp without time zone NULL verification_attempts integer NULL DEFAULT 0 has_consented boolean NULL DEFAULT false consent_type character varying(255) NULL language character varying(255) NULL location character varying(255) NULL city character varying(255) NULL longitude character varying(255) NULL latitude character varying(255) NULL comments text NULL signed_agreement_url character varying(255) NULL agreement_url character varying(255) NULL kfs_agreement_url character varying(255) NULL is_deleted boolean NULL DEFAULT false deleted_at timestamp without time zone NULL deleted_by character varying(255) NULL send_to_user_time timestamp without time zone NULL INDEXES: click_wrap_signature_pkey: CREATE UNIQUE INDEX click_wrap_signature_pkey ON public.click_wrap_signature USING btree (id) idx_click_wrap_loan_id_active: CREATE INDEX idx_click_wrap_loan_id_active ON public.click_wrap_signature USING btree (loan_id) WHERE (is_deleted = false) TABLE: collection_activity (11 columns) ------------------------------------------------------------ activity_id character varying(64) NOT NULL loan_id character varying(64) NOT NULL executive_id character varying(64) NOT NULL activity_type character varying(40) NOT NULL disposition character varying(60) NULL notes text NULL next_action_at timestamp without time zone NULL promise_amount numeric NULL promise_date timestamp without time zone NULL created_by character varying(100) NULL created_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: collection_activity_pkey: CREATE UNIQUE INDEX collection_activity_pkey ON public.collection_activity USING btree (activity_id) idx_collection_activity_loan_created: CREATE INDEX idx_collection_activity_loan_created ON public.collection_activity USING btree (loan_id, created_at DESC) TABLE: collection_assignment (9 columns) ------------------------------------------------------------ assignment_id character varying(64) NOT NULL loan_id character varying(64) NOT NULL executive_id character varying(64) NOT NULL status character varying(40) NOT NULL priority integer NULL DEFAULT 0 source character varying(40) NULL DEFAULT 'MANUAL'::character varying assigned_by character varying(100) NULL assigned_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: collection_assignment_pkey: CREATE UNIQUE INDEX collection_assignment_pkey ON public.collection_assignment USING btree (assignment_id) idx_collection_assignment_loan_id: CREATE INDEX idx_collection_assignment_loan_id ON public.collection_assignment USING btree (loan_id) idx_collection_assignment_exec_status: CREATE INDEX idx_collection_assignment_exec_status ON public.collection_assignment USING btree (executive_id, status) idx_collection_assignment_updated_at: CREATE INDEX idx_collection_assignment_updated_at ON public.collection_assignment USING btree (updated_at DESC) TABLE: collection_assignment_config (3 columns) ------------------------------------------------------------ config_key character varying(80) NOT NULL config_value character varying(255) NOT NULL updated_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: collection_assignment_config_pkey: CREATE UNIQUE INDEX collection_assignment_config_pkey ON public.collection_assignment_config USING btree (config_key) TABLE: collection_assignment_history (9 columns) ------------------------------------------------------------ history_id character varying(64) NOT NULL assignment_id character varying(64) NULL loan_id character varying(64) NOT NULL old_executive_id character varying(64) NULL new_executive_id character varying(64) NULL action_type character varying(40) NOT NULL reason text NULL acted_by character varying(100) NULL acted_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: collection_assignment_history_pkey: CREATE UNIQUE INDEX collection_assignment_history_pkey ON public.collection_assignment_history USING btree (history_id) idx_collection_assignment_history_loan_id: CREATE INDEX idx_collection_assignment_history_loan_id ON public.collection_assignment_history USING btree (loan_id) TABLE: collection_case (10 columns) ------------------------------------------------------------ case_id character varying(64) NOT NULL loan_id character varying(64) NOT NULL stage character varying(60) NOT NULL DEFAULT 'OPEN'::character varying status character varying(40) NOT NULL DEFAULT 'ACTIVE'::character varying latest_disposition character varying(60) NULL next_action_at timestamp without time zone NULL broken_ptp_count integer NULL DEFAULT 0 created_by character varying(100) NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: collection_case_pkey: CREATE UNIQUE INDEX collection_case_pkey ON public.collection_case USING btree (case_id) collection_case_loan_id_key: CREATE UNIQUE INDEX collection_case_loan_id_key ON public.collection_case USING btree (loan_id) TABLE: collection_executive (10 columns) ------------------------------------------------------------ executive_id character varying(64) NOT NULL name character varying(150) NOT NULL email character varying(150) NULL phone character varying(50) NULL manager_id character varying(64) NULL capacity_per_day integer NULL DEFAULT 0 is_active boolean NULL DEFAULT true created_by character varying(100) NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: collection_executive_pkey: CREATE UNIQUE INDEX collection_executive_pkey ON public.collection_executive USING btree (executive_id) TABLE: collection_followup_task (12 columns) ------------------------------------------------------------ task_id character varying(64) NOT NULL loan_id character varying(64) NOT NULL assigned_to character varying(64) NULL task_type character varying(40) NOT NULL status character varying(40) NOT NULL DEFAULT 'PENDING'::character varying priority integer NULL DEFAULT 0 due_at timestamp without time zone NOT NULL remarks text NULL created_by character varying(100) NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() activity_id character varying(64) NULL INDEXES: collection_followup_task_pkey: CREATE UNIQUE INDEX collection_followup_task_pkey ON public.collection_followup_task USING btree (task_id) idx_collection_followup_assignee_due_status: CREATE INDEX idx_collection_followup_assignee_due_status ON public.collection_followup_task USING btree (assigned_to, due_at, status) idx_collection_followup_loan_status: CREATE INDEX idx_collection_followup_loan_status ON public.collection_followup_task USING btree (loan_id, status) TABLE: comment_activity_log (10 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('comment_activity_log_id_seq'::regclass) comment_id integer NOT NULL activity_type character varying(50) NOT NULL activity_description text NULL performed_by_type character varying(50) NOT NULL performed_by_id character varying(255) NOT NULL old_value text NULL new_value text NULL metadata text NULL created_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: comment_activity_log_pkey: CREATE UNIQUE INDEX comment_activity_log_pkey ON public.comment_activity_log USING btree (id) idx_comment_activity_comment_id: CREATE INDEX idx_comment_activity_comment_id ON public.comment_activity_log USING btree (comment_id) idx_comment_activity_created_on: CREATE INDEX idx_comment_activity_created_on ON public.comment_activity_log USING btree (created_on DESC) idx_comment_activity_type: CREATE INDEX idx_comment_activity_type ON public.comment_activity_log USING btree (activity_type) TABLE: comment_type (7 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('comment_type_id_seq'::regclass) comment_type character varying(100) NOT NULL comment text NOT NULL DEFAULT ''::text is_important boolean NULL DEFAULT false created_on timestamp without time zone NULL updated_on timestamp without time zone NULL deleted_on timestamp without time zone NULL INDEXES: comment_type_pkey: CREATE UNIQUE INDEX comment_type_pkey ON public.comment_type USING btree (id) TABLE: communication_tracker (11 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('communication_tracker_id_seq'::regclass) user_id text NULL doctor_id text NULL lender_id text NULL communication_code text NULL text boolean NULL DEFAULT false whatsapp boolean NULL DEFAULT false email boolean NULL DEFAULT false notification boolean NULL DEFAULT false communication_date timestamp without time zone NULL emp_id text NULL TABLE: consent_record_detail (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('consent_record_detail_id_seq'::regclass) consent_id text NULL user_identifier text NULL external_lead_id text NULL consent_type text NULL consent_purpose text NULL source text NULL timestamp timestamp without time zone NULL ip_address text NULL user_agent text NULL location text NULL created_at timestamp without time zone NULL updated_at timestamp without time zone NULL INDEXES: consent_record_detail_consent_id_key: CREATE UNIQUE INDEX consent_record_detail_consent_id_key ON public.consent_record_detail USING btree (consent_id) consent_record_detail_pkey: CREATE UNIQUE INDEX consent_record_detail_pkey ON public.consent_record_detail USING btree (id) TABLE: credit_decision (21 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('credit_decision_id_seq'::regclass) loan_id character varying(255) NULL decision text NULL decision_type character varying(50) NULL added_on timestamp without time zone NULL environment character varying(50) NULL bureau_obligations double precision NULL DEFAULT 0 bureau_response text NULL bs_response text NULL bureau_max_eligible_emi double precision NULL DEFAULT 0 bs_max_eligible_emi double precision NULL DEFAULT 0 max_credit_limit_calculated numeric NULL product_max_credit_limit_calculated text NULL manual_override_decision character varying(255) NULL manual_override_by character varying(255) NULL manual_override_at timestamp without time zone NULL manual_override_remarks text NULL total_no_of_salary_credits_bs double precision NULL DEFAULT 0.0 total_amount_of_salary_credits_bs double precision NULL DEFAULT 0.0 bs_detected_income double precision NULL bs_income_type character varying(20) NULL TABLE: credit_limit_estimator (10 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('credit_limit_estimator_id_seq'::regclass) loan_id character varying(255) NOT NULL user_id character varying(255) NOT NULL credit_card_name character varying(255) NOT NULL nudge boolean NOT NULL estimated_limit bigint NOT NULL added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL treatment_amount bigint NULL limit_to_treatment_ratio double precision NULL DEFAULT 0.0 INDEXES: credit_limit_estimator_pkey: CREATE UNIQUE INDEX credit_limit_estimator_pkey ON public.credit_limit_estimator USING btree (id) TABLE: debit_detail (15 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('debit_detail_id_seq'::regclass) loan_id character varying(255) NULL emi_no integer NULL plan_id character varying(255) NULL status character varying(50) NULL create_debit_data text NULL debit_request_data text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL npci_txn_id character varying(255) NULL bounce_reasons text NULL npt_id text NULL cp_status text NULL status_updated_at text NULL transaction_status character varying(50) NULL INDEXES: debit_detail_pkey: CREATE UNIQUE INDEX debit_detail_pkey ON public.debit_detail USING btree (id) TABLE: decentro_credit_report (41 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('decentro_credit_report_id_seq'::regclass) reference_id character varying(100) NULL mobile_number character varying(20) NULL request_body text NULL response_body text NULL added_on timestamp without time zone NOT NULL DEFAULT now() decentro_txn_id character varying(64) NULL status character varying(20) NULL response_code character varying(20) NULL response_key character varying(50) NULL report_order_number character varying(50) NULL credit_score integer NULL score_type character varying(20) NULL score_version character varying(10) NULL full_name character varying(200) NULL date_of_birth date NULL pan character varying(20) NULL primary_mobile character varying(20) NULL primary_email character varying(150) NULL primary_pincode character varying(10) NULL primary_state character varying(10) NULL no_of_accounts integer NULL no_of_active_accounts integer NULL no_of_write_offs integer NULL total_past_due double precision NULL no_of_past_due_accounts integer NULL most_severe_status_24m character varying(20) NULL total_balance_amount double precision NULL total_sanction_amount double precision NULL single_highest_sanction double precision NULL single_highest_balance double precision NULL total_monthly_payment double precision NULL age_of_oldest_trade integer NULL enquiry_total integer NULL enquiry_past_30_days integer NULL enquiry_past_12_months integer NULL enquiry_past_24_months integer NULL max_dpd_bucket character varying(20) NULL has_severe_dpd boolean NULL has_writeoff boolean NULL has_past_due boolean NULL INDEXES: decentro_credit_report_pkey: CREATE UNIQUE INDEX decentro_credit_report_pkey ON public.decentro_credit_report USING btree (id) idx_dcr_txn: CREATE INDEX idx_dcr_txn ON public.decentro_credit_report USING btree (decentro_txn_id) idx_dcr_pan: CREATE INDEX idx_dcr_pan ON public.decentro_credit_report USING btree (pan) idx_dcr_score: CREATE INDEX idx_dcr_score ON public.decentro_credit_report USING btree (credit_score) idx_dcr_status_null: CREATE INDEX idx_dcr_status_null ON public.decentro_credit_report USING btree (id) WHERE (status IS NULL) TABLE: digio_agreement_order (11 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('digio_agreement_order_id_seq'::regclass) loan_id character varying(255) NULL DEFAULT NULL::character varying doc_id character varying(255) NULL DEFAULT NULL::character varying agreement_status character varying(255) NULL DEFAULT NULL::character varying file_name character varying(255) NULL DEFAULT NULL::character varying signing_parties_name character varying(255) NULL DEFAULT NULL::character varying signing_parties_identifier character varying(255) NULL DEFAULT NULL::character varying access_token_id character varying(255) NULL DEFAULT NULL::character varying signed_document_url text NULL created_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: digio_lender_config (12 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('digio_lender_config_id_seq'::regclass) nbfc_id character varying(255) NOT NULL lender_name character varying(100) NULL base_url text NOT NULL client_id text NOT NULL secret_key text NOT NULL corporate_config_id text NULL corporate_config_id_upi text NULL corporate_account_no text NULL active boolean NULL DEFAULT true added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: digio_lender_config_pkey: CREATE UNIQUE INDEX digio_lender_config_pkey ON public.digio_lender_config USING btree (id) digio_lender_config_nbfc_id_key: CREATE UNIQUE INDEX digio_lender_config_nbfc_id_key ON public.digio_lender_config USING btree (nbfc_id) TABLE: digio_mandate_bank_details (12 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('digio_mandate_bank_details_id_seq'::regclass) bank_id text NULL name text NULL ifsc_prefix text NULL active boolean NULL primary_bank boolean NULL routing_code text NULL esign_mandate boolean NULL api_mandate boolean NULL physical_mandate boolean NULL allowed_auth_sub_type bytea NULL penny_less boolean NULL INDEXES: digio_mandate_bank_details_pkey: CREATE UNIQUE INDEX digio_mandate_bank_details_pkey ON public.digio_mandate_bank_details USING btree (id) TABLE: disbursal_order_details (48 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('disbursal_order_details_id_seq'::regclass) user_id character varying(255) NULL first_name character varying(255) NULL mobile_number character varying(20) NULL loan_id character varying(255) NULL application_id character varying(255) NULL treatment_amount bigint NULL loan_amount bigint NULL loan_reason character varying(500) NULL loan_apply_date timestamp without time zone NULL disburse_date timestamp without time zone NULL patient_name character varying(255) NULL patient_phone_number character varying(20) NULL doctor_id character varying(255) NULL doctor_name character varying(255) NULL doctor_code character varying(255) NULL clinic_name character varying(255) NULL utr character varying(255) NULL business_entity_name character varying(255) NULL product_id character varying(255) NULL product_name character varying(255) NULL total_emi integer NULL advance_emi integer NULL subvention_rate double precision NULL advance_emi_amount double precision NULL total_tenure integer NULL effective_tenure integer NULL net_loan_amount double precision NULL subvention_excluding_gst double precision NULL subvention_including_gst double precision NULL gst_on_subvention double precision NULL processing_fee double precision NULL disburse_amount double precision NULL interest_amount double precision NULL interest_rate double precision NULL nbfc_name character varying(255) NULL internal_product_id character varying(255) NULL report_generation_date timestamp without time zone NULL do_shared_timestamp timestamp without time zone NULL employment_type character varying(255) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL share_sequence integer NULL shared_by character varying(255) NULL share_source character varying(100) NULL calculation_mode character varying(50) NULL do_pdf_url text NULL tcs_amount double precision NULL INDEXES: disbursal_order_details_pkey: CREATE UNIQUE INDEX disbursal_order_details_pkey ON public.disbursal_order_details USING btree (id) idx_disbursal_order_details_loan_id_id_desc: CREATE INDEX idx_disbursal_order_details_loan_id_id_desc ON public.disbursal_order_details USING btree (loan_id, id DESC) TABLE: doctor_daily_performance (16 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('doctor_daily_performance_id_seq'::regclass) doctor_id character varying(255) NULL calculation_date date NULL month_year character varying(20) NULL monthly_potential integer NULL period integer NULL day_of_month integer NULL expected_amount_till_date numeric NULL actual_business_till_date numeric NULL performance_ratio numeric NULL calculated_at timestamp without time zone NULL potential_category character varying(10) NULL performance_number integer NULL final_rating character varying(10) NULL actual_disbursed_business_till_date character varying(255) NULL expected_disbursed_amount_till_date character varying(255) NULL INDEXES: doctor_daily_performance_pkey: CREATE UNIQUE INDEX doctor_daily_performance_pkey ON public.doctor_daily_performance USING btree (id) TABLE: doctor_details (47 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_details_id_seq'::regclass) doctor_id text NULL name text NULL email_id text NULL password text NULL phone_number text NULL dob timestamp without time zone NULL qr_code_url text NULL form_status text NULL app_download_status boolean NULL DEFAULT false important boolean NULL DEFAULT false added_on timestamp without time zone NULL updated_on timestamp without time zone NULL creator_id text NULL pan_number text NULL doctor_code text NULL verified boolean NULL DEFAULT false joining_date timestamp without time zone NULL scout_code text NULL bene_id text NULL qr_installation_status boolean NULL DEFAULT false virtual_account_created boolean NULL DEFAULT false cf_bene_id text NULL doctor_status text NULL fibe_mid text NULL parent_doctor_id text NULL cf_anchor_mid text NULL agreement_signed boolean NULL DEFAULT false flex_money_mid text NULL rp_account_id text NULL mv_merchant_id text NULL archived boolean NULL DEFAULT false finzy_merchant_id text NULL jus_pay_merchant_id text NULL fin_doc_mid text NULL fin_bank_id text NULL category character varying(20) NULL active boolean NULL DEFAULT true interest_enabled boolean NULL DEFAULT false auto_disbersed boolean NULL DEFAULT false oculon_score double precision NULL DEFAULT 0.0 zype_mid character varying(100) NULL cloud_banking_mid character varying(255) NULL source character varying(255) NULL fintree_mid character varying(255) NULL incentive_eligible boolean NULL DEFAULT true poonawalla_mid character varying(225) NULL INDEXES: idx_doctor_details_active: CREATE INDEX idx_doctor_details_active ON public.doctor_details USING btree (active) WHERE (active = true) idx_doctor_details_doctor_code: CREATE INDEX idx_doctor_details_doctor_code ON public.doctor_details USING btree (doctor_code) WHERE (doctor_code IS NOT NULL) idx_doctor_details_doctor_id: CREATE INDEX idx_doctor_details_doctor_id ON public.doctor_details USING btree (doctor_id) idx_doctor_details_joining_date: CREATE INDEX idx_doctor_details_joining_date ON public.doctor_details USING btree (joining_date) WHERE (joining_date IS NOT NULL) idx_doctor_details_parent_doctor_id: CREATE INDEX idx_doctor_details_parent_doctor_id ON public.doctor_details USING btree (parent_doctor_id) WHERE (parent_doctor_id IS NOT NULL) idx_doctor_details_scout_code: CREATE INDEX idx_doctor_details_scout_code ON public.doctor_details USING btree (scout_code) WHERE (scout_code IS NOT NULL) idx_doctor_details_scout_code_id: CREATE INDEX idx_doctor_details_scout_code_id ON public.doctor_details USING btree (scout_code, doctor_id) WHERE (scout_code IS NOT NULL) TABLE: doctor_invoice_detail (11 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_invoice_detail_id_seq'::regclass) doctor_id text NULL month text NULL year text NULL invoice_no integer NULL sent_mail boolean NULL DEFAULT false created_at timestamp without time zone NULL updated_at timestamp without time zone NULL last_download_at timestamp without time zone NULL last_sent_email_at timestamp without time zone NULL sent_email_count integer NULL DEFAULT 0 INDEXES: doctor_invoice_detail_pkey: CREATE UNIQUE INDEX doctor_invoice_detail_pkey ON public.doctor_invoice_detail USING btree (id) TABLE: doctor_nbfc_mapping (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_nbfc_mapping_id_seq'::regclass) doctor_id text NULL nbfc_id text NULL cf_merchant boolean NULL DEFAULT false enabled boolean NULL DEFAULT false mapped_on timestamp without time zone NULL TABLE: doctor_nbfc_mapping_logs (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_nbfc_mapping_logs_id_seq'::regclass) doctor_id character varying(255) NULL nbfc_id character varying(255) NULL action character varying(100) NULL action_by character varying(255) NULL reason text NULL added_on timestamp without time zone NULL latest boolean NULL DEFAULT true INDEXES: doctor_nbfc_mapping_logs_pkey: CREATE UNIQUE INDEX doctor_nbfc_mapping_logs_pkey ON public.doctor_nbfc_mapping_logs USING btree (id) TABLE: doctor_opportunities_detail (18 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_opportunities_detail_id_seq'::regclass) doctor_name text NULL clinic_name text NULL email_id text NULL contact_number text NULL area text NULL scout_code text NULL pin_code text NULL rating integer NULL visiting_date timestamp without time zone NULL comment text NULL merchant_category text NULL spoc_designation text NULL doctor_opportunity_id character varying(255) NULL is_converted boolean NULL DEFAULT false onboarding_stage character varying(255) NULL DEFAULT 'LOGIN_PENDING'::character varying onboarded_by character varying(255) NULL consent_login character varying(10) NULL DEFAULT 'NO'::character varying TABLE: doctor_potential (7 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('doctor_potential_id_seq'::regclass) doctor_id character varying(255) NULL monthly_potential integer NULL is_active boolean NULL updated_by character varying(255) NULL updated_at timestamp without time zone NULL comment text NULL INDEXES: doctor_potential_pkey: CREATE UNIQUE INDEX doctor_potential_pkey ON public.doctor_potential USING btree (id) TABLE: doctor_professional_detail (36 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_professional_detail_id_seq'::regclass) doctor_id text NULL pan text NULL name_on_pan text NULL licence_number text NULL clinic_name text NULL business_entity_name text NULL business_entity_type text NULL cin_llpin text NULL gst_in text NULL aadhaar_no text NULL verified boolean NULL DEFAULT false added_on timestamp without time zone NULL updated_on timestamp without time zone NULL speciality text NULL google_review_link text NULL justdial_review_link text NULL incorporation_date timestamp without time zone NULL google_link_hits integer NULL DEFAULT 0 just_dial_link_hits integer NULL DEFAULT 0 monthly_potential integer NULL DEFAULT 0 comment text NULL experience integer NULL qualification character varying(255) NULL just_dial_link character varying(255) NULL practo_link character varying(255) NULL insta_handle character varying(255) NULL agreement_url text NULL is_axis_beneficiary boolean NULL DEFAULT false axis_beneficiary_code character varying(100) NULL logo_url text NULL invoice_required boolean NOT NULL DEFAULT true vc_required boolean NOT NULL DEFAULT true ivr_enable boolean NULL DEFAULT false tag character varying(50) NULL settlement_initiation_status boolean NULL DEFAULT true INDEXES: idx_doctor_professional_detail_doctor_id: CREATE INDEX idx_doctor_professional_detail_doctor_id ON public.doctor_professional_detail USING btree (doctor_id) TABLE: doctor_speciality_mapping (5 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_speciality_mapping_id_seq'::regclass) doctor_id character varying(50) NOT NULL speciality_id character varying(50) NOT NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: doctor_speciality_mapping_pkey: CREATE UNIQUE INDEX doctor_speciality_mapping_pkey ON public.doctor_speciality_mapping USING btree (id) TABLE: doctor_staff (16 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_staff_id_seq'::regclass) doctor_staff_id character varying(255) NULL name character varying(255) NULL phone_number character varying(20) NULL email_id character varying(255) NULL doctor_id character varying(255) NULL designation character varying(100) NULL otp_code integer NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL status character varying(50) NULL DEFAULT 'active'::character varying otp_sent_at timestamp without time zone NULL otp_verification_attempts integer NULL DEFAULT 0 otp_locked_until timestamp without time zone NULL first_logged_in_on timestamp without time zone NULL latest_login_on timestamp without time zone NULL INDEXES: doctor_staff_pkey: CREATE UNIQUE INDEX doctor_staff_pkey ON public.doctor_staff USING btree (id) TABLE: doctor_to_product (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doctor_to_product_id_seq'::regclass) doctor_id text NULL product_id text NULL added_on timestamp without time zone NULL updated_on text NULL status boolean NULL DEFAULT false TABLE: doqfy_orders (11 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('doqfy_orders_id_seq'::regclass) loan_id text NULL doqfy_order_id bigint NULL signatory_name text NULL signatory_email text NULL signatory_status text NULL signatory_id text NULL esign_otp boolean NULL esign_id text NULL doqfy_sign_url text NULL order_document_url text NULL INDEXES: doqfy_orders_pkey: CREATE UNIQUE INDEX doqfy_orders_pkey ON public.doqfy_orders USING btree (id) TABLE: eligibility_details (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('eligibility_details_id_seq'::regclass) user_id text NULL user_identifier text NOT NULL external_lead_id text NOT NULL income numeric NULL data text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL max_credit_limit double precision NULL DEFAULT 0 INDEXES: eligibility_details_pkey: CREATE UNIQUE INDEX eligibility_details_pkey ON public.eligibility_details USING btree (id) TABLE: eligibility_limit (16 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('eligibility_limit_id_seq'::regclass) loan_id character varying(255) NOT NULL policy_type character varying(10) NULL bureau_fetch_date timestamp without time zone NULL bureau_source character varying(255) NULL max_eligible_emi double precision NULL DEFAULT 0.0 final_decision character varying(255) NULL epfo boolean NULL DEFAULT false income integer NULL pincode character varying(6) NULL bureau_response text NULL added_on timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL expired boolean NULL DEFAULT false expired_on timestamp without time zone NULL lender_id character varying(64) NULL TABLE: emi_attempt_fix_backup_20260706 (19 columns) ------------------------------------------------------------ id bigint NULL loan_id character varying(100) NULL emi_no integer NULL due_date timestamp without time zone NULL attempt_no integer NULL trigger_type character varying(50) NULL channel character varying(50) NULL amount_rupees double precision NULL status character varying(50) NULL digio_plan_id character varying(200) NULL digio_npt_id character varying(200) NULL digio_transaction_state character varying(50) NULL failure_reason character varying(1000) NULL presentation_status character varying(100) NULL mandate_type character varying(50) NULL settlement_date_sent character varying(50) NULL created_by character varying(100) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: emi_collection_attempt (19 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('emi_collection_attempt_id_seq'::regclass) loan_id character varying(100) NOT NULL emi_no integer NOT NULL due_date timestamp without time zone NOT NULL attempt_no integer NOT NULL trigger_type character varying(50) NOT NULL channel character varying(50) NOT NULL amount_rupees double precision NOT NULL status character varying(50) NOT NULL digio_plan_id character varying(200) NULL digio_npt_id character varying(200) NULL digio_transaction_state character varying(50) NULL failure_reason character varying(1000) NULL presentation_status character varying(100) NULL mandate_type character varying(50) NULL settlement_date_sent character varying(50) NULL created_by character varying(100) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: emi_collection_attempt_pkey: CREATE UNIQUE INDEX emi_collection_attempt_pkey ON public.emi_collection_attempt USING btree (id) uq_emi_collection_attempt: CREATE UNIQUE INDEX uq_emi_collection_attempt ON public.emi_collection_attempt USING btree (loan_id, emi_no, due_date, attempt_no) idx_emi_collection_attempt_status: CREATE INDEX idx_emi_collection_attempt_status ON public.emi_collection_attempt USING btree (status) idx_emi_collection_attempt_loan: CREATE INDEX idx_emi_collection_attempt_loan ON public.emi_collection_attempt USING btree (loan_id, emi_no, due_date) TABLE: emi_collection_audit_log (14 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('emi_collection_audit_log_id_seq'::regclass) attempt_id bigint NULL loan_id character varying(100) NOT NULL emi_no integer NOT NULL event_type character varying(80) NOT NULL status_from character varying(50) NULL status_to character varying(50) NULL http_status character varying(20) NULL success boolean NULL message character varying(2000) NULL request_payload text NULL response_payload text NULL actor character varying(100) NULL added_on timestamp without time zone NULL INDEXES: emi_collection_audit_log_pkey: CREATE UNIQUE INDEX emi_collection_audit_log_pkey ON public.emi_collection_audit_log USING btree (id) idx_emi_collection_audit_attempt: CREATE INDEX idx_emi_collection_audit_attempt ON public.emi_collection_audit_log USING btree (attempt_id) idx_emi_collection_audit_loan: CREATE INDEX idx_emi_collection_audit_loan ON public.emi_collection_audit_log USING btree (loan_id, emi_no) TABLE: emi_collection_bulk_debit_job (17 columns) ------------------------------------------------------------ job_id character varying(64) NOT NULL status character varying(30) NOT NULL file_name character varying(255) NULL file_size_bytes bigint NULL due_date timestamp without time zone NULL started_at timestamp without time zone NULL finished_at timestamp without time zone NULL total_rows integer NOT NULL DEFAULT 0 processed_rows integer NOT NULL DEFAULT 0 success_count integer NOT NULL DEFAULT 0 failed_count integer NOT NULL DEFAULT 0 skipped_count integer NOT NULL DEFAULT 0 error text NULL uploaded_by character varying(100) NULL created_by character varying(100) NULL added_on timestamp without time zone NOT NULL DEFAULT now() updated_on timestamp without time zone NOT NULL DEFAULT now() INDEXES: emi_collection_bulk_debit_job_pkey: CREATE UNIQUE INDEX emi_collection_bulk_debit_job_pkey ON public.emi_collection_bulk_debit_job USING btree (job_id) idx_emi_bulk_debit_job_status_updated: CREATE INDEX idx_emi_bulk_debit_job_status_updated ON public.emi_collection_bulk_debit_job USING btree (status, updated_on DESC) TABLE: emi_collection_bulk_debit_row_result (12 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('emi_collection_bulk_debit_row_result_id_seq'::regclass) job_id character varying(64) NOT NULL row_no integer NOT NULL application_id character varying(100) NULL loan_id character varying(100) NULL emi_no integer NULL due_date timestamp without time zone NULL amount numeric NULL status character varying(30) NOT NULL message text NULL attempt_id bigint NULL added_on timestamp without time zone NOT NULL DEFAULT now() INDEXES: emi_collection_bulk_debit_row_result_pkey: CREATE UNIQUE INDEX emi_collection_bulk_debit_row_result_pkey ON public.emi_collection_bulk_debit_row_result USING btree (id) idx_emi_bulk_debit_row_job_row: CREATE INDEX idx_emi_bulk_debit_row_job_row ON public.emi_collection_bulk_debit_row_result USING btree (job_id, row_no) idx_emi_bulk_debit_row_job_status: CREATE INDEX idx_emi_bulk_debit_row_job_status ON public.emi_collection_bulk_debit_row_result USING btree (job_id, status) TABLE: employment_details (32 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('employment_details_id_seq'::regclass) user_id text NULL employment_type text NULL monthly_family_income integer NULL DEFAULT 0 current_company_name text NULL current_company_pincode text NULL current_company_address1 text NULL current_company_address2 text NULL in_hand_salary text NULL industry text NULL office_address text NULL salary_date timestamp without time zone NULL total_years_of_experience integer NULL DEFAULT 0 total_month_of_experience integer NULL DEFAULT 0 total_years_in_job integer NULL DEFAULT 0 total_month_in_job integer NULL DEFAULT 0 added_on timestamp without time zone NULL updated_on timestamp without time zone NULL type_of_business text NULL name_of_business text NULL organisation_verified boolean NULL DEFAULT false business_pan text NULL verified_establishment_name text NULL employed_tenure integer NULL DEFAULT 0 organisation_strength integer NULL DEFAULT 0 gst_in character varying(50) NULL udyam_number character varying(50) NULL business_email character varying(255) NULL otp_code integer NULL email_verification_status character varying(50) NULL email_percentage_match double precision NULL verified_employment_type character varying(255) NULL INDEXES: ux_employment_details_user_id: CREATE UNIQUE INDEX ux_employment_details_user_id ON public.employment_details USING btree (user_id) uq_employment_details_user_id: CREATE UNIQUE INDEX uq_employment_details_user_id ON public.employment_details USING btree (user_id) TABLE: entity_tag (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('entity_tag_id_seq'::regclass) entity_type character varying(50) NOT NULL entity_id character varying(255) NOT NULL tag character varying(100) NOT NULL created_by character varying(255) NULL created_on timestamp without time zone NULL DEFAULT now() INDEXES: entity_tag_pkey: CREATE UNIQUE INDEX entity_tag_pkey ON public.entity_tag USING btree (id) uq_entity_tag: CREATE UNIQUE INDEX uq_entity_tag ON public.entity_tag USING btree (entity_type, entity_id, tag) idx_entity_tag_entity: CREATE INDEX idx_entity_tag_entity ON public.entity_tag USING btree (entity_type, entity_id) idx_entity_tag_tag: CREATE INDEX idx_entity_tag_tag ON public.entity_tag USING btree (tag) TABLE: exotel_call_log (20 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('exotel_call_log_id_seq'::regclass) created_by_id character varying(255) NOT NULL from_number character varying(32) NULL to_number character varying(32) NULL caller_id character varying(32) NULL exotel_call_sid character varying(128) NULL status character varying(64) NOT NULL DEFAULT 'INITIATED'::character varying event_type character varying(64) NULL start_time timestamp without time zone NULL end_time timestamp without time zone NULL conversation_duration integer NULL direction character varying(64) NULL recording_url text NULL custom_field character varying(255) NULL connect_response text NULL callback_payload text NULL created_on timestamp without time zone NOT NULL DEFAULT now() updated_on timestamp without time zone NOT NULL DEFAULT now() entity_type character varying(32) NULL entity_id character varying(64) NULL INDEXES: exotel_call_log_pkey: CREATE UNIQUE INDEX exotel_call_log_pkey ON public.exotel_call_log USING btree (id) TABLE: farmer_audit_log (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('farmer_audit_log_id_seq'::regclass) table_name text NULL record_id text NULL action text NULL old_values text NULL new_values text NULL user_id text NULL timestamp timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: idx_farmer_audit_log_record: CREATE INDEX idx_farmer_audit_log_record ON public.farmer_audit_log USING btree (record_id) idx_farmer_audit_log_table: CREATE INDEX idx_farmer_audit_log_table ON public.farmer_audit_log USING btree (table_name) idx_farmer_audit_log_timestamp: CREATE INDEX idx_farmer_audit_log_timestamp ON public.farmer_audit_log USING btree ("timestamp") TABLE: farmer_details (14 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('farmer_details_id_seq'::regclass) farmer_id text NOT NULL name text NULL email_id text NULL phone_number text NULL password text NULL parent_farmer_id text NULL level integer NULL DEFAULT 1 created_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_date timestamp without time zone NULL created_by text NULL status text NULL DEFAULT 'ACTIVE'::text farmer_login_otp integer NULL type character varying(255) NULL INDEXES: farmer_details_email_id_key: CREATE UNIQUE INDEX farmer_details_email_id_key ON public.farmer_details USING btree (email_id) farmer_details_farmer_id_key: CREATE UNIQUE INDEX farmer_details_farmer_id_key ON public.farmer_details USING btree (farmer_id) farmer_details_phone_number_key: CREATE UNIQUE INDEX farmer_details_phone_number_key ON public.farmer_details USING btree (phone_number) idx_farmer_details_email: CREATE INDEX idx_farmer_details_email ON public.farmer_details USING btree (email_id) idx_farmer_details_farmer_id: CREATE INDEX idx_farmer_details_farmer_id ON public.farmer_details USING btree (farmer_id) idx_farmer_details_parent: CREATE INDEX idx_farmer_details_parent ON public.farmer_details USING btree (parent_farmer_id) idx_farmer_details_parent_level_status: CREATE INDEX idx_farmer_details_parent_level_status ON public.farmer_details USING btree (parent_farmer_id, level, status) WHERE (status = 'ACTIVE'::text) idx_farmer_details_parent_status: CREATE INDEX idx_farmer_details_parent_status ON public.farmer_details USING btree (parent_farmer_id, status) WHERE (status = 'ACTIVE'::text) idx_farmer_details_phone: CREATE INDEX idx_farmer_details_phone ON public.farmer_details USING btree (phone_number) idx_farmer_details_status: CREATE INDEX idx_farmer_details_status ON public.farmer_details USING btree (status) TABLE: farmer_doctor_mapping (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('farmer_doctor_mapping_id_seq'::regclass) farmer_id text NOT NULL doctor_id text NOT NULL assigned_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP assigned_by text NULL status text NULL DEFAULT 'ACTIVE'::text INDEXES: idx_farmer_doctor_mapping_assigned_date: CREATE INDEX idx_farmer_doctor_mapping_assigned_date ON public.farmer_doctor_mapping USING btree (assigned_date DESC) idx_farmer_doctor_mapping_doctor: CREATE INDEX idx_farmer_doctor_mapping_doctor ON public.farmer_doctor_mapping USING btree (doctor_id) idx_farmer_doctor_mapping_doctor_id: CREATE INDEX idx_farmer_doctor_mapping_doctor_id ON public.farmer_doctor_mapping USING btree (doctor_id) idx_farmer_doctor_mapping_doctor_status: CREATE INDEX idx_farmer_doctor_mapping_doctor_status ON public.farmer_doctor_mapping USING btree (doctor_id, status) WHERE (status = 'ACTIVE'::text) idx_farmer_doctor_mapping_farmer: CREATE INDEX idx_farmer_doctor_mapping_farmer ON public.farmer_doctor_mapping USING btree (farmer_id) idx_farmer_doctor_mapping_farmer_doctor_status: CREATE INDEX idx_farmer_doctor_mapping_farmer_doctor_status ON public.farmer_doctor_mapping USING btree (farmer_id, doctor_id, status) WHERE (status = 'ACTIVE'::text) idx_farmer_doctor_mapping_farmer_status: CREATE INDEX idx_farmer_doctor_mapping_farmer_status ON public.farmer_doctor_mapping USING btree (farmer_id, status) WHERE (status = 'ACTIVE'::text) idx_farmer_doctor_mapping_status: CREATE INDEX idx_farmer_doctor_mapping_status ON public.farmer_doctor_mapping USING btree (status) TABLE: farmer_performance (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('farmer_performance_id_seq'::regclass) farmer_id character varying(255) NOT NULL target_id integer NULL period_start_date date NOT NULL period_end_date date NOT NULL target_type character varying(50) NOT NULL target_value numeric NOT NULL actual_value numeric NOT NULL achievement_percentage numeric NULL status character varying(20) NULL calculated_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP notification_sent boolean NULL DEFAULT false notification_sent_at timestamp without time zone NULL INDEXES: farmer_performance_pkey: CREATE UNIQUE INDEX farmer_performance_pkey ON public.farmer_performance USING btree (id) idx_farmer_performance_calculated_at: CREATE INDEX idx_farmer_performance_calculated_at ON public.farmer_performance USING btree (calculated_at) idx_farmer_performance_farmer_id: CREATE INDEX idx_farmer_performance_farmer_id ON public.farmer_performance USING btree (farmer_id) idx_farmer_performance_period: CREATE INDEX idx_farmer_performance_period ON public.farmer_performance USING btree (period_start_date, period_end_date) idx_farmer_performance_status: CREATE INDEX idx_farmer_performance_status ON public.farmer_performance USING btree (status) idx_farmer_performance_target_id: CREATE INDEX idx_farmer_performance_target_id ON public.farmer_performance USING btree (target_id) TABLE: farmer_target (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('farmer_target_id_seq'::regclass) farmer_id character varying(255) NOT NULL target_type character varying(50) NOT NULL target_value numeric NOT NULL period_type character varying(20) NOT NULL period_start_date date NOT NULL period_end_date date NOT NULL assigned_by character varying(255) NULL assigned_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP status character varying(20) NULL DEFAULT 'ACTIVE'::character varying notes text NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_at timestamp without time zone NULL INDEXES: farmer_target_pkey: CREATE UNIQUE INDEX farmer_target_pkey ON public.farmer_target USING btree (id) idx_farmer_target_farmer_id: CREATE INDEX idx_farmer_target_farmer_id ON public.farmer_target USING btree (farmer_id) idx_farmer_target_farmer_status: CREATE INDEX idx_farmer_target_farmer_status ON public.farmer_target USING btree (farmer_id, status) WHERE ((status)::text = 'ACTIVE'::text) idx_farmer_target_farmer_type_status: CREATE INDEX idx_farmer_target_farmer_type_status ON public.farmer_target USING btree (farmer_id, period_type, status) WHERE ((status)::text = 'ACTIVE'::text) idx_farmer_target_period: CREATE INDEX idx_farmer_target_period ON public.farmer_target USING btree (period_start_date, period_end_date) idx_farmer_target_period_dates: CREATE INDEX idx_farmer_target_period_dates ON public.farmer_target USING btree (period_start_date, period_end_date) idx_farmer_target_status: CREATE INDEX idx_farmer_target_status ON public.farmer_target USING btree (status) idx_farmer_target_type: CREATE INDEX idx_farmer_target_type ON public.farmer_target USING btree (target_type) TABLE: fibe_response_detail (28 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('fibe_response_detail_id_seq'::regclass) user_id text NULL loan_id text NULL customer_ref_id text NULL order_id text NULL treatment_proof_logs text NULL redirection_url text NULL bitly_url character varying(255) NULL transaction_id character varying(255) NULL lead_status character varying(255) NULL offer_data text NULL sanction_max_limit double precision NULL DEFAULT 0 sanction_min_limit double precision NULL DEFAULT 0 bre_status character varying(255) NULL merchant_package_id character varying(255) NULL settlement_status character varying(255) NULL order_status character varying(255) NULL customer_status character varying(255) NULL final_amount_to_merchant double precision NULL DEFAULT 0.0 subvention_amount double precision NULL DEFAULT 0.0 disbursed_amount double precision NULL DEFAULT 0.0 settlement_date date NULL disbursal_date date NULL utr_no character varying(255) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL short_approval boolean NULL DEFAULT false order_amount double precision NULL DEFAULT 0.0 TABLE: fifty_fin_details (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('fifty_fin_details_id_seq'::regclass) loan_id character varying(255) NULL cams_request_no character varying(255) NULL karvy_request_no character varying(255) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: fifty_fin_details_pkey: CREATE UNIQUE INDEX fifty_fin_details_pkey ON public.fifty_fin_details USING btree (id) TABLE: findoc_api_execution_log (15 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('findoc_api_execution_log_id_seq'::regclass) loan_id character varying(255) NOT NULL api_type character varying(50) NOT NULL loan_type character varying(10) NULL step_name character varying(100) NOT NULL step_index integer NOT NULL status character varying(20) NOT NULL response_message text NULL response_status_code character varying(20) NULL execution_time_ms bigint NULL started_at timestamp without time zone NOT NULL completed_at timestamp without time zone NULL error_message text NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP response_data text NULL INDEXES: findoc_api_execution_log_pkey: CREATE UNIQUE INDEX findoc_api_execution_log_pkey ON public.findoc_api_execution_log USING btree (id) idx_findoc_log_api_type: CREATE INDEX idx_findoc_log_api_type ON public.findoc_api_execution_log USING btree (api_type) idx_findoc_log_loan_id: CREATE INDEX idx_findoc_log_loan_id ON public.findoc_api_execution_log USING btree (loan_id) idx_findoc_log_started_at: CREATE INDEX idx_findoc_log_started_at ON public.findoc_api_execution_log USING btree (started_at) TABLE: findoc_details (58 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('findoc_details_id_seq'::regclass) loan_id character varying(255) NULL client_id character varying(255) NULL resource_id character varying(255) NULL resource_identifier character varying(255) NULL last_step text NULL fin_loan_id text NULL loan_account_no text NULL aadhaar_resource_id text NULL pan_resource_id text NULL mandate_resource_id text NULL subvention_excluding_gst double precision NULL DEFAULT 0 subvention_including_gst double precision NULL DEFAULT 0 disburse_amount double precision NULL DEFAULT 0 summary text NULL processing_fee double precision NULL DEFAULT 0 utr_no text NULL final_disburse_amount double precision NULL DEFAULT 0 disburse_date timestamp without time zone NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL complete_step_date timestamp without time zone NULL bank_resource_id character varying(255) NULL excess_amount_paid double precision NULL DEFAULT 0.0 total_outstanding double precision NULL DEFAULT 0.0 total_overdue double precision NULL DEFAULT 0.0 total_waived double precision NULL DEFAULT 0.0 penalty_charges_outstanding double precision NULL DEFAULT 0.0 principal_disbursed double precision NULL DEFAULT 0.0 pan_identifier character varying(225) NULL aadhaar_identifier character varying(225) NULL order_amount double precision NULL DEFAULT 0.0 cloudbankin_lead boolean NULL DEFAULT true dedupe_flow boolean NULL DEFAULT false principal_overdue double precision NULL DEFAULT 0.0 fee_charges_overdue double precision NULL DEFAULT 0.0 penalty_charges_overdue double precision NULL DEFAULT 0.0 client_id_m2p character varying(100) NULL loan_id_m2p character varying(100) NULL closed boolean NULL DEFAULT false total_excess_paid double precision NULL DEFAULT 0.0 term_frequency double precision NULL DEFAULT 0.0 principal_amount double precision NULL DEFAULT 0.0 expected_first_repayment_on_date timestamp without time zone NULL overdue_since_date timestamp without time zone NULL principal_paid double precision NULL DEFAULT 0.0 principal_outstanding double precision NULL DEFAULT 0.0 interest_paid double precision NULL DEFAULT 0.0 interest_outstanding double precision NULL DEFAULT 0.0 interest_overdue double precision NULL DEFAULT 0.0 penalty_charges_paid double precision NULL DEFAULT 0.0 total_repayment double precision NULL DEFAULT 0.0 total_expected_repayment double precision NULL DEFAULT 0.0 actual_loan_balance double precision NULL DEFAULT 0.0 fee_charges_outstanding double precision NULL DEFAULT 0.0 fee_charges_paid double precision NULL DEFAULT 0.0 fee_charges_due_at_disbursement_charged double precision NULL DEFAULT 0.0 cohort text NULL INDEXES: uq_findoc_details_loan_id: CREATE UNIQUE INDEX uq_findoc_details_loan_id ON public.findoc_details USING btree (loan_id) TABLE: findoc_repayment_schedule (67 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('findoc_repayment_schedule_id_seq'::regclass) loan_id character varying(255) NULL emi_no integer NULL from_date timestamp without time zone NULL due_date timestamp without time zone NULL complete boolean NULL days_in_period integer NULL principal_original_due double precision NULL DEFAULT 0 principal_due double precision NULL DEFAULT 0 principal_paid double precision NULL DEFAULT 0 principal_written_off double precision NULL DEFAULT 0 principal_outstanding double precision NULL DEFAULT 0 principal_loan_balance_outstanding double precision NULL DEFAULT 0 interest_original_due double precision NULL DEFAULT 0 interest_due double precision NULL DEFAULT 0 interest_paid double precision NULL DEFAULT 0 interest_waived double precision NULL DEFAULT 0 interest_written_off double precision NULL DEFAULT 0 interest_outstanding double precision NULL DEFAULT 0 fee_charges_due double precision NULL DEFAULT 0 fee_charges_paid double precision NULL DEFAULT 0 fee_charges_waived double precision NULL DEFAULT 0 fee_charges_written_off double precision NULL DEFAULT 0 fee_charges_outstanding double precision NULL DEFAULT 0 penalty_charges_due double precision NULL DEFAULT 0 penalty_charges_paid double precision NULL DEFAULT 0 penalty_charges_waived double precision NULL DEFAULT 0 penalty_charges_written_off double precision NULL DEFAULT 0 penalty_charges_outstanding double precision NULL DEFAULT 0 total_original_due_for_period double precision NULL DEFAULT 0 total_due_for_period double precision NULL DEFAULT 0 total_paid_for_period double precision NULL DEFAULT 0 total_paid_in_advance_for_period double precision NULL DEFAULT 0 total_paid_late_for_period double precision NULL DEFAULT 0 total_waived_for_period double precision NULL DEFAULT 0 total_written_off_for_period double precision NULL DEFAULT 0 total_outstanding_for_period double precision NULL DEFAULT 0 total_actual_cost_of_loan_for_period double precision NULL DEFAULT 0 total_installment_amount_for_period double precision NULL DEFAULT 0 recalculated_interest_component boolean NULL advance_payment_amount double precision NULL DEFAULT 0 interest_adjusted_due_to_grace double precision NULL DEFAULT 0 interest_accruable double precision NULL DEFAULT 0 added_on timestamp without time zone NULL updated_on timestamp without time zone NULL debit_status text NULL update_rps_txn_id text NULL razor_pay_payment_link_id text NULL bounce_status character varying(50) NULL presentation_status character varying(50) NULL payment_link character varying(255) NULL payment_link_id character varying(255) NULL foreclosed boolean NULL DEFAULT false obligations_met_on_date timestamp without time zone NULL upcoming boolean NULL DEFAULT false fee_charges_tax_due double precision NULL DEFAULT 0 fee_charges_tax_paid double precision NULL DEFAULT 0 fee_charges_tax_waived double precision NULL DEFAULT 0 fee_charges_tax_written_off double precision NULL DEFAULT 0 fee_charges_tax_outstanding double precision NULL DEFAULT 0 penalty_charges_tax_due double precision NULL DEFAULT 0 penalty_charges_tax_paid double precision NULL DEFAULT 0 penalty_charges_tax_waived double precision NULL DEFAULT 0 penalty_charges_tax_written_off double precision NULL DEFAULT 0 penalty_charges_tax_outstanding double precision NULL DEFAULT 0 prepaid boolean NULL DEFAULT false total_overdue double precision NULL DEFAULT 0 TABLE: fintree (23 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('fintree_id_seq'::regclass) user_id character varying(255) NULL loan_id character varying(255) NULL lan character varying(255) NULL hospital_id character varying(255) NULL hospital_name character varying(255) NULL booking_status character varying(64) NULL subvention_percentage_sent double precision NULL request_amount bigint NULL disburse_amount double precision NULL disburse_date timestamp without time zone NULL utr character varying(255) NULL uploaded_documents text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL case_status character varying(64) NULL credit_limit double precision NULL limit_available boolean NULL agreement_url character varying(1024) NULL mandate_umrn_updated boolean NOT NULL DEFAULT false mandate_umrn_updated_on timestamp without time zone NULL esign_status_updated boolean NOT NULL DEFAULT false esign_status_updated_on timestamp without time zone NULL INDEXES: fintree_pkey: CREATE UNIQUE INDEX fintree_pkey ON public.fintree USING btree (id) TABLE: fintree_logs (12 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('fintree_logs_id_seq'::regclass) loan_id character varying(255) NULL user_id character varying(255) NULL lan character varying(255) NULL api_name character varying(255) NULL log_type character varying(64) NULL remarks character varying(512) NULL request_body text NULL response_body text NULL http_status character varying(32) NULL data text NULL added_on timestamp without time zone NULL INDEXES: fintree_logs_pkey: CREATE UNIQUE INDEX fintree_logs_pkey ON public.fintree_logs USING btree (id) TABLE: fintree_repayment_schedule (15 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('fintree_repayment_schedule_id_seq'::regclass) loan_id character varying(255) NOT NULL lan character varying(255) NULL partner_loan_id character varying(255) NULL customer_name character varying(255) NULL case_status character varying(64) NULL loan_amount double precision NULL regular_emi_amount double precision NULL installment_count integer NULL total_expected_repayment double precision NULL total_principal double precision NULL total_interest double precision NULL raw_response text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: fintree_repayment_schedule_pkey: CREATE UNIQUE INDEX fintree_repayment_schedule_pkey ON public.fintree_repayment_schedule USING btree (id) ux_fintree_rps_loan_id: CREATE UNIQUE INDEX ux_fintree_rps_loan_id ON public.fintree_repayment_schedule USING btree (loan_id) TABLE: fintree_repayment_schedule_installment (17 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('fintree_repayment_schedule_installment_id_seq'::regclass) loan_id character varying(255) NOT NULL lan character varying(255) NULL installment_number integer NOT NULL due_date timestamp without time zone NULL emi double precision NULL principal double precision NULL interest double precision NULL opening_principal double precision NULL closing_principal double precision NULL remaining_principal double precision NULL remaining_interest double precision NULL remaining_emi double precision NULL status character varying(64) NULL raw_installment text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: fintree_repayment_schedule_installment_pkey: CREATE UNIQUE INDEX fintree_repayment_schedule_installment_pkey ON public.fintree_repayment_schedule_installment USING btree (id) ux_fintree_rps_installment_loan_emi: CREATE UNIQUE INDEX ux_fintree_rps_installment_loan_emi ON public.fintree_repayment_schedule_installment USING btree (loan_id, installment_number) idx_fintree_rps_installment_due_status: CREATE INDEX idx_fintree_rps_installment_due_status ON public.fintree_repayment_schedule_installment USING btree (due_date, status) TABLE: heath_analysis (8 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('heath_analysis_id_seq'::regclass) user_id character varying(255) NULL doctor_code character varying(255) NULL analysis_for character varying(255) NULL analysis_from character varying(255) NULL remark text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: heath_analysis_pkey: CREATE UNIQUE INDEX heath_analysis_pkey ON public.heath_analysis USING btree (id) TABLE: help_desk_tickets (14 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('help_desk_tickets_id_seq'::regclass) identifier_id character varying(255) NULL lead_contact_number character varying(255) NULL description character varying(2000) NULL image_url_1 character varying(255) NULL image_url_2 character varying(255) NULL image_url_3 character varying(255) NULL status character varying(50) NULL comments character varying(2000) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL identifier_type character varying(255) NULL priority text NULL assign_to text NULL INDEXES: help_desk_tickets_pkey: CREATE UNIQUE INDEX help_desk_tickets_pkey ON public.help_desk_tickets USING btree (id) TABLE: incentive_eligible_poc (14 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('incentive_eligible_poc_id_seq'::regclass) doctor_code character varying(255) NULL clinic_name character varying(255) NULL spoc_name character varying(255) NULL spoc_phone_number character varying(255) NULL incentive_amount character varying(255) NULL voucher_link character varying(255) NULL is_eligible boolean NOT NULL DEFAULT false incentive_month character varying(255) NULL incentive_status character varying(255) NULL DEFAULT 'Not Redeemed'::character varying expiry_date timestamp without time zone NULL added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP voucher_id character varying(255) NULL INDEXES: incentive_eligible_poc_pkey: CREATE UNIQUE INDEX incentive_eligible_poc_pkey ON public.incentive_eligible_poc USING btree (id) idx_incentive_eligible_poc_voucher_link: CREATE UNIQUE INDEX idx_incentive_eligible_poc_voucher_link ON public.incentive_eligible_poc USING btree (voucher_link) WHERE ((voucher_link IS NOT NULL) AND ((voucher_link)::text <> ''::text)) idx_incentive_eligible_poc_voucher_id: CREATE UNIQUE INDEX idx_incentive_eligible_poc_voucher_id ON public.incentive_eligible_poc USING btree (voucher_id) WHERE ((voucher_id IS NOT NULL) AND ((voucher_id)::text <> ''::text)) TABLE: incentive_redemption_request (21 columns) ------------------------------------------------------------ request_id character varying(64) NOT NULL identifier_type character varying(32) NULL identifier_id character varying(64) NULL payout_id character varying(64) NULL amount integer NOT NULL status character varying(32) NULL voucher_id character varying(128) NULL user_remarks text NULL admin_remarks text NULL created_on timestamp without time zone NULL updated_on timestamp without time zone NULL processed_on timestamp without time zone NULL admin_mail_sent boolean NULL DEFAULT false admin_mail_sent_on timestamp without time zone NULL user_mail_sent boolean NULL DEFAULT false user_mail_sent_on timestamp without time zone NULL user_whatsapp_sent boolean NULL DEFAULT false user_whatsapp_sent_on timestamp without time zone NULL notification_error text NULL client_request_id character varying(128) NULL reserved_amount integer NOT NULL DEFAULT 0 INDEXES: incentive_redemption_request_pkey: CREATE UNIQUE INDEX incentive_redemption_request_pkey ON public.incentive_redemption_request USING btree (request_id) uq_redemption_client_request_id: CREATE UNIQUE INDEX uq_redemption_client_request_id ON public.incentive_redemption_request USING btree (client_request_id) uq_redemption_pending_identifier: CREATE UNIQUE INDEX uq_redemption_pending_identifier ON public.incentive_redemption_request USING btree (identifier_type, identifier_id) WHERE ((status)::text = 'PENDING_VOUCHER'::text) uq_redemption_voucher_id: CREATE UNIQUE INDEX uq_redemption_voucher_id ON public.incentive_redemption_request USING btree (voucher_id) WHERE (voucher_id IS NOT NULL) TABLE: incentive_rewards (7 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('incentive_rewards_id_seq'::regclass) reward_id character varying(255) NULL coins character varying(255) NULL rewards character varying(255) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL is_active boolean NULL DEFAULT true INDEXES: incentive_rewards_pkey: CREATE UNIQUE INDEX incentive_rewards_pkey ON public.incentive_rewards USING btree (id) TABLE: incentive_wallet (9 columns) ------------------------------------------------------------ id character varying(32) NULL identifier_type text NOT NULL identifier_id text NOT NULL total_earned_points integer NOT NULL DEFAULT 0 total_redeemed_points integer NOT NULL DEFAULT 0 total_expired_amount integer NOT NULL DEFAULT 0 current_balance_points integer NOT NULL DEFAULT 0 created_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: incentive_wallet_transaction (14 columns) ------------------------------------------------------------ id character varying(32) NULL wallet_id character varying(32) NOT NULL identifier_type text NOT NULL identifier_id text NOT NULL payout_id text NULL transaction_type text NOT NULL transaction_source text NOT NULL amount integer NOT NULL opening_balance integer NOT NULL closing_balance integer NOT NULL reference_type text NULL reference_id text NULL remarks text NULL created_on timestamp without time zone NULL TABLE: ivr_call_details (35 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('ivr_call_details_id_seq'::regclass) loan_id character varying(255) NULL user_id character varying(255) NULL mobile_number character varying(50) NULL call_sid character varying(255) NULL parent_call_sid character varying(255) NULL date_created timestamp without time zone NULL date_updated timestamp without time zone NULL account_sid character varying(255) NULL to_number character varying(50) NULL from_number character varying(50) NULL phone_number_sid character varying(255) NULL status character varying(50) NULL start_time timestamp without time zone NULL end_time timestamp without time zone NULL duration character varying(50) NULL price character varying(50) NULL direction character varying(50) NULL answered_by character varying(50) NULL forwarded_from character varying(50) NULL caller_name character varying(255) NULL uri text NULL recording_url text NULL digit character varying(10) NULL call_from character varying(50) NULL call_to character varying(50) NULL dial_call_duration character varying(50) NULL call_type character varying(50) NULL dial_whom_number character varying(50) NULL flow_id character varying(50) NULL tenant_id character varying(50) NULL exotel_current_time timestamp without time zone NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP initiated_by character varying(100) NULL INDEXES: ivr_call_details_call_sid_key: CREATE UNIQUE INDEX ivr_call_details_call_sid_key ON public.ivr_call_details USING btree (call_sid) ivr_call_details_pkey: CREATE UNIQUE INDEX ivr_call_details_pkey ON public.ivr_call_details USING btree (id) idx_ivr_call_details_call_sid: CREATE INDEX idx_ivr_call_details_call_sid ON public.ivr_call_details USING btree (call_sid) idx_ivr_call_details_flow_id: CREATE INDEX idx_ivr_call_details_flow_id ON public.ivr_call_details USING btree (flow_id) idx_ivr_call_details_loan_id: CREATE INDEX idx_ivr_call_details_loan_id ON public.ivr_call_details USING btree (loan_id) idx_ivr_call_details_mobile_number: CREATE INDEX idx_ivr_call_details_mobile_number ON public.ivr_call_details USING btree (mobile_number) idx_ivr_call_details_tenant_id: CREATE INDEX idx_ivr_call_details_tenant_id ON public.ivr_call_details USING btree (tenant_id) idx_ivr_call_details_user_id: CREATE INDEX idx_ivr_call_details_user_id ON public.ivr_call_details USING btree (user_id) TABLE: juspay_session_details (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('juspay_session_details_id_seq'::regclass) loan_id character varying(255) NULL session_type character varying(255) NULL order_id character varying(255) NULL order_status character varying(255) NULL status character varying(255) NULL sub_status character varying(255) NULL request_id character varying(255) NULL web_payment_link character varying(1000) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL order_amount double precision NULL ready_to_settle boolean NULL DEFAULT false TABLE: kyc_request (34 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('kyc_request_id_seq'::regclass) loan_id text NULL user_id text NULL customer_identifier text NULL customer_name text NULL template_name text NULL notify_customer boolean NULL expire_in_days integer NULL generate_access_token boolean NULL reference_id text NULL transaction_id text NULL generate_deeplink_info boolean NULL digio_id text NULL status text NULL reminder_registered boolean NULL access_token_entity_id text NULL access_token_id text NULL access_token_valid_till timestamp without time zone NULL workflow_name text NULL auto_approved boolean NULL template_id text NULL updated_at timestamp without time zone NULL created_at timestamp without time zone NULL actions text NULL deep_intent_url text NULL deep_qr_url text NULL aadhaar_url text NULL pan_url text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL kyc_report_url text NULL image_url text NULL name_on_aadhaar_card text NULL name_on_pancard text NULL INDEXES: kyc_request_pkey: CREATE UNIQUE INDEX kyc_request_pkey ON public.kyc_request USING btree (id) idx_kyc_request_digio_id: CREATE INDEX idx_kyc_request_digio_id ON public.kyc_request USING btree (digio_id) idx_kyc_request_loan_id: CREATE INDEX idx_kyc_request_loan_id ON public.kyc_request USING btree (loan_id) idx_kyc_request_user_id: CREATE INDEX idx_kyc_request_user_id ON public.kyc_request USING btree (user_id) TABLE: lazypay_customer_status (12 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lazypay_customer_status_id_seq'::regclass) loan_id text NOT NULL mobile text NULL customer_info_required boolean NULL pre_approval_status boolean NULL onboarding_required boolean NULL available_limit double precision NULL ntb_eligible boolean NULL sub_merchant_id text NULL customer_status_response text NULL created_date timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP updated_date timestamp without time zone NULL INDEXES: lazypay_customer_status_pkey: CREATE UNIQUE INDEX lazypay_customer_status_pkey ON public.lazypay_customer_status USING btree (id) TABLE: lazypay_details (24 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lazypay_details_id_seq'::regclass) loan_id text NOT NULL bnpl_txn_eligibility boolean NULL bnpl_reason text NULL bnpl_user_eligibility boolean NULL cof_txn_eligibility boolean NULL cof_reason text NULL cof_available_limit double precision NULL offered_emi_plans text NULL merchant_txn_id text NULL order_id text NULL redirect_url text NULL order_amount double precision NULL order_status text NULL existing_user boolean NULL sub_merchant_id text NULL eligibility_response text NULL order_response text NULL webhook_events text NULL created_date timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP updated_date timestamp without time zone NULL selected_emi_plan text NULL eligibility_check boolean NULL DEFAULT false short_approved boolean NULL DEFAULT false INDEXES: lazypay_details_pkey: CREATE UNIQUE INDEX lazypay_details_pkey ON public.lazypay_details USING btree (id) TABLE: lazypay_eligibility (15 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lazypay_eligibility_id_seq'::regclass) loan_id text NOT NULL bnpl_txn_eligibility boolean NULL bnpl_reason text NULL bnpl_user_eligibility boolean NULL cof_txn_eligibility boolean NULL cof_reason text NULL cof_available_limit double precision NULL offered_emi_plans text NULL existing_user boolean NULL sub_merchant_id text NULL eligibility_response text NULL short_approved boolean NULL DEFAULT false created_date timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP updated_date timestamp without time zone NULL INDEXES: lazypay_eligibility_pkey: CREATE UNIQUE INDEX lazypay_eligibility_pkey ON public.lazypay_eligibility USING btree (id) TABLE: lazypay_orders (14 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lazypay_orders_id_seq'::regclass) loan_id text NOT NULL merchant_txn_id text NULL order_id text NULL redirect_url text NULL order_amount double precision NULL order_status text NULL selected_emi_plan text NULL sub_merchant_id text NULL order_response text NULL webhook_events text NULL created_date timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP updated_date timestamp without time zone NULL ready_to_settle boolean NULL DEFAULT false INDEXES: lazypay_orders_pkey: CREATE UNIQUE INDEX lazypay_orders_pkey ON public.lazypay_orders USING btree (id) TABLE: lead_tracking (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lead_tracking_id_seq'::regclass) user_id character varying(100) NULL loan_id character varying(100) NULL identifier_type character varying(50) NULL identifier character varying(100) NULL added_on date NULL INDEXES: lead_tracking_pkey: CREATE UNIQUE INDEX lead_tracking_pkey ON public.lead_tracking USING btree (id) TABLE: lender_api_audit (12 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('lender_api_audit_id_seq'::regclass) loan_id character varying(50) NOT NULL doctor_id character varying(50) NULL lender_name character varying(50) NOT NULL request_payload text NULL response_payload text NULL response_code character varying(20) NULL api_status character varying(50) NULL latency_ms bigint NULL retry_attempt integer NULL DEFAULT 0 failure_reason character varying(255) NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: lender_api_audit_pkey: CREATE UNIQUE INDEX lender_api_audit_pkey ON public.lender_api_audit USING btree (id) idx_lender_api_audit_loan: CREATE INDEX idx_lender_api_audit_loan ON public.lender_api_audit USING btree (loan_id, lender_name) TABLE: lender_data_requirement (9 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('lender_data_requirement_id_seq'::regclass) lender_name character varying(50) NOT NULL nbfc_id character varying(50) NOT NULL data_point character varying(50) NOT NULL is_required boolean NULL DEFAULT true display_order integer NULL DEFAULT 0 is_active boolean NULL DEFAULT true created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: lender_data_requirement_pkey: CREATE UNIQUE INDEX lender_data_requirement_pkey ON public.lender_data_requirement USING btree (id) lender_data_requirement_lender_name_data_point_key: CREATE UNIQUE INDEX lender_data_requirement_lender_name_data_point_key ON public.lender_data_requirement USING btree (lender_name, data_point) idx_lender_data_req_lender: CREATE INDEX idx_lender_data_req_lender ON public.lender_data_requirement USING btree (lender_name) WHERE (is_active = true) idx_lender_data_req_nbfc: CREATE INDEX idx_lender_data_req_nbfc ON public.lender_data_requirement USING btree (nbfc_id) WHERE (is_active = true) TABLE: lender_decision_detail (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lender_decision_detail_id_seq'::regclass) loan_id text NULL lender_name character varying(255) NULL decision character varying(50) NULL limit integer NULL DEFAULT 0 enhanced_limit integer NULL DEFAULT 0 added_on timestamp without time zone NULL rejection_reason character varying(500) NULL decision_type character varying(255) NULL INDEXES: lender_decision_detail_pkey: CREATE UNIQUE INDEX lender_decision_detail_pkey ON public.lender_decision_detail USING btree (id) TABLE: lender_eligibility_pincode_blacklist (6 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('lender_eligibility_pincode_blacklist_id_seq'::regclass) lender_config_id bigint NOT NULL pincode character varying(10) NOT NULL is_active boolean NULL DEFAULT true added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP added_by text NULL INDEXES: lender_eligibility_pincode_blacklist_pkey: CREATE UNIQUE INDEX lender_eligibility_pincode_blacklist_pkey ON public.lender_eligibility_pincode_blacklist USING btree (id) idx_is_active: CREATE INDEX idx_is_active ON public.lender_eligibility_pincode_blacklist USING btree (is_active) idx_lender_config_id: CREATE INDEX idx_lender_config_id ON public.lender_eligibility_pincode_blacklist USING btree (lender_config_id) idx_lender_pincode: CREATE INDEX idx_lender_pincode ON public.lender_eligibility_pincode_blacklist USING btree (lender_config_id, pincode) idx_pincode: CREATE INDEX idx_pincode ON public.lender_eligibility_pincode_blacklist USING btree (pincode) idx_unique_lender_pincode: CREATE UNIQUE INDEX idx_unique_lender_pincode ON public.lender_eligibility_pincode_blacklist USING btree (lender_config_id, pincode) WHERE (is_active = true) TABLE: lender_loan_status (5 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lender_loan_status_id_seq'::regclass) lender_id character varying(255) NOT NULL loan_id character varying(255) NOT NULL external_status character varying(255) NOT NULL added_on timestamp without time zone NULL INDEXES: lender_loan_status_pkey: CREATE UNIQUE INDEX lender_loan_status_pkey ON public.lender_loan_status USING btree (id) TABLE: lender_source_beneficiary (16 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lender_source_beneficiary_id_seq'::regclass) lender_id character varying(100) NOT NULL lender_name character varying(255) NULL bene_code character varying(100) NOT NULL bene_name character varying(255) NOT NULL account_number character varying(50) NOT NULL ifsc_code character varying(20) NOT NULL account_type character varying(20) NULL bank_name character varying(255) NULL bank_address character varying(500) NULL email character varying(255) NULL mobile character varying(20) NULL status character varying(50) NULL axis_response text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: lender_source_beneficiary_pkey: CREATE UNIQUE INDEX lender_source_beneficiary_pkey ON public.lender_source_beneficiary USING btree (id) uk_lender_source_beneficiary_lender_id: CREATE UNIQUE INDEX uk_lender_source_beneficiary_lender_id ON public.lender_source_beneficiary USING btree (lender_id) uk_lender_source_beneficiary_bene_code: CREATE UNIQUE INDEX uk_lender_source_beneficiary_bene_code ON public.lender_source_beneficiary USING btree (bene_code) TABLE: lender_state (16 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('lender_state_id_seq'::regclass) loan_id character varying(50) NOT NULL doctor_id character varying(50) NOT NULL lender_name character varying(50) NOT NULL lender_status character varying(50) NULL missing_fields text NULL retry_count integer NULL DEFAULT 0 failure_reason character varying(255) NULL decision character varying(50) NULL approved_amount numeric NULL lender_reference_id character varying(100) NULL api_latency_ms bigint NULL invoked_at timestamp without time zone NULL decision_received_at timestamp without time zone NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: lender_state_pkey: CREATE UNIQUE INDEX lender_state_pkey ON public.lender_state USING btree (id) lender_state_loan_id_lender_name_key: CREATE UNIQUE INDEX lender_state_loan_id_lender_name_key ON public.lender_state USING btree (loan_id, lender_name) idx_lender_state_loan: CREATE INDEX idx_lender_state_loan ON public.lender_state USING btree (loan_id) idx_lender_state_status: CREATE INDEX idx_lender_state_status ON public.lender_state USING btree (lender_status) TABLE: lender_to_cp_status_mapping (4 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('lender_to_cp_status_mapping_id_seq'::regclass) external_status character varying(255) NULL status_code integer NOT NULL lender_id character varying(255) NULL INDEXES: lender_to_cp_status_mapping_pkey: CREATE UNIQUE INDEX lender_to_cp_status_mapping_pkey ON public.lender_to_cp_status_mapping USING btree (id) TABLE: loan_calculation (19 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('loan_calculation_id_seq'::regclass) loan_id character varying(255) NULL treatment_amount double precision NULL DEFAULT 0.0 loan_amount double precision NULL DEFAULT 0.0 total_tenure integer NULL DEFAULT 0 effective_tenure integer NULL DEFAULT 0 subvention_excl_gst_amount double precision NULL DEFAULT 0.0 subvention_excl_gst_rate double precision NULL DEFAULT 0.0 subvention_incl_gst_amount double precision NULL DEFAULT 0.0 subvention_incl_gst_rate double precision NULL DEFAULT 0.0 processing_fee double precision NULL DEFAULT 0.0 adjusted_subvention_incl_gst_rate double precision NULL DEFAULT 0.0 adjusted_processing_fee_rate double precision NULL DEFAULT 0.0 disburse_amount double precision NULL DEFAULT 0.0 apr double precision NULL DEFAULT 0.0 agreement_date timestamp without time zone NULL product_id character varying(255) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: loan_comment (24 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('loan_comment_id_seq'::regclass) entity_type character varying(50) NOT NULL entity_id character varying(255) NOT NULL comment_text text NOT NULL comment_type character varying(50) NULL DEFAULT 'GENERAL'::character varying priority character varying(20) NULL DEFAULT 'NORMAL'::character varying created_by_type character varying(50) NOT NULL created_by_id character varying(255) NOT NULL created_by_name character varying(255) NULL is_internal boolean NULL DEFAULT false is_important boolean NULL DEFAULT false status character varying(20) NULL DEFAULT 'ACTIVE'::character varying has_reminder boolean NULL DEFAULT false reminder_date timestamp without time zone NULL reminder_status character varying(20) NULL reminder_completion_date timestamp without time zone NULL reminder_completion_notes text NULL reminder_priority character varying(20) NULL metadata text NULL tags character varying(500) NULL created_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL deleted_on timestamp without time zone NULL deleted_by character varying(255) NULL INDEXES: loan_comment_pkey: CREATE UNIQUE INDEX loan_comment_pkey ON public.loan_comment USING btree (id) idx_loan_comment_created_by: CREATE INDEX idx_loan_comment_created_by ON public.loan_comment USING btree (created_by_type, created_by_id) idx_loan_comment_created_on: CREATE INDEX idx_loan_comment_created_on ON public.loan_comment USING btree (created_on DESC) idx_loan_comment_entity: CREATE INDEX idx_loan_comment_entity ON public.loan_comment USING btree (entity_type, entity_id) idx_loan_comment_priority: CREATE INDEX idx_loan_comment_priority ON public.loan_comment USING btree (priority) idx_loan_comment_reminder: CREATE INDEX idx_loan_comment_reminder ON public.loan_comment USING btree (reminder_status, reminder_date) WHERE (has_reminder = true) idx_loan_comment_status: CREATE INDEX idx_loan_comment_status ON public.loan_comment USING btree (status) idx_loan_comment_type: CREATE INDEX idx_loan_comment_type ON public.loan_comment USING btree (comment_type) TABLE: loan_communication_log (4 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('loan_communication_log_id_seq'::regclass) loan_id character varying(255) NULL added_on timestamp without time zone NULL merchant_utr_notification_1 boolean NULL INDEXES: loan_communication_log_pkey: CREATE UNIQUE INDEX loan_communication_log_pkey ON public.loan_communication_log USING btree (id) TABLE: loan_decision_detail (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('loan_decision_detail_id_seq'::regclass) loan_id text NULL type text NULL loan_status text NULL comment text NULL change_by text NULL added_on timestamp without time zone NULL user_id text NULL TABLE: loan_deletion (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('loan_deletion_id_seq'::regclass) loan_id character varying(100) NOT NULL user_id character varying(100) NULL deleted_by character varying(255) NULL deleted_on timestamp without time zone NULL loan_detail_data text NULL loan_to_application_data text NULL user_to_loan_data text NULL INDEXES: loan_deletion_pkey: CREATE UNIQUE INDEX loan_deletion_pkey ON public.loan_deletion USING btree (id) TABLE: loan_detail (68 columns) ------------------------------------------------------------ loan_id text NULL loan_amount bigint NULL DEFAULT 0 loan_reason text NULL loan_apply_date timestamp without time zone NULL loan_sanction_status text NULL total_payback_amount integer NULL payback_duration integer NULL if_salaried_account text NULL payback_status text NULL penalty_amount integer NULL total_payback_with_penalty text NULL payback_type text NULL loan_return_date date NULL loan_payback_date timestamp without time zone NULL loan_approve_date timestamp without time zone NULL loan_approve_reason text NULL disburse_date timestamp without time zone NULL score character varying NULL disberse_date timestamp without time zone NULL id integer NOT NULL DEFAULT nextval('loan_detail_id_seq'::regclass) loan_approve_amount bigint NULL paid_amount integer NULL certificate_number text NULL approve_status boolean NULL DEFAULT false tentative_approve_amount bigint NULL tentative_tenure text NULL DEFAULT 0 loan_emi integer NULL DEFAULT 0 call_shifts integer NULL DEFAULT '-1'::integer call_status boolean NULL DEFAULT false call_schedule_date text NULL customer_call_duration text NULL ivr_status integer NULL DEFAULT '-2'::integer call_time text NULL tentative_time timestamp without time zone NULL DEFAULT now() soft_approved text NULL soft_approved_date timestamp without time zone NULL emi_apply boolean NULL DEFAULT false loan_from text NULL nbfc_id text NULL platform_from text NULL mark_complete_type text NULL incomplete_type text NULL tea_garden_id text NULL kyc_status boolean NULL DEFAULT false esign_status integer NULL DEFAULT 0 doctor_id text NULL doctor_name text NULL is_ntc boolean NULL DEFAULT false monthly_emi_expense bigint NULL loan_reject_date timestamp without time zone NULL keyfact_statement_url text NULL is_repeat text NULL product_id text NULL is_subvention_loan boolean NULL DEFAULT false treatment_amount bigint NULL DEFAULT 0 advance_emi_amount double precision NULL DEFAULT 0 utr_no text NULL pf_amount double precision NULL DEFAULT 0 disburse_amount double precision NULL DEFAULT 0 subvention_amt_incl_gst double precision NULL DEFAULT 0 loan_type character varying(50) NULL is_closed boolean NULL DEFAULT false short_approved boolean NULL DEFAULT false order_id text NULL asked_treatment_amount bigint NULL DEFAULT 0 short_approved_new character varying(255) NULL source_unique_id character varying(50) NULL latest_comment_id bigint NULL INDEXES: idx_loan_detail_doctor_loan: CREATE INDEX idx_loan_detail_doctor_loan ON public.loan_detail USING btree (doctor_id, loan_id) WHERE (loan_id IS NOT NULL) idx_ld_doctor_id_loan_apply_date: CREATE INDEX idx_ld_doctor_id_loan_apply_date ON public.loan_detail USING btree (doctor_id, loan_apply_date) idx_loan_detail_apply_date: CREATE INDEX idx_loan_detail_apply_date ON public.loan_detail USING btree (loan_apply_date DESC) idx_loan_detail_apply_date_doctor: CREATE INDEX idx_loan_detail_apply_date_doctor ON public.loan_detail USING btree (loan_apply_date, doctor_id) WHERE (loan_id IS NOT NULL) idx_loan_detail_doctor_apply_date: CREATE INDEX idx_loan_detail_doctor_apply_date ON public.loan_detail USING btree (doctor_id, loan_apply_date DESC) WHERE (loan_id IS NOT NULL) idx_loan_detail_doctor_date: CREATE INDEX idx_loan_detail_doctor_date ON public.loan_detail USING btree (doctor_id, loan_apply_date) idx_loan_detail_doctor_id: CREATE INDEX idx_loan_detail_doctor_id ON public.loan_detail USING btree (doctor_id) idx_loan_detail_doctor_treatment: CREATE INDEX idx_loan_detail_doctor_treatment ON public.loan_detail USING btree (doctor_id, treatment_amount) WHERE (treatment_amount IS NOT NULL) idx_loan_detail_is_closed: CREATE INDEX idx_loan_detail_is_closed ON public.loan_detail USING btree (is_closed) WHERE (is_closed IS NOT NULL) idx_loan_detail_loan_id: CREATE INDEX idx_loan_detail_loan_id ON public.loan_detail USING btree (loan_id) idx_loan_detail_nbfc_closed: CREATE INDEX idx_loan_detail_nbfc_closed ON public.loan_detail USING btree (nbfc_id, is_closed) WHERE (nbfc_id IS NOT NULL) TABLE: loan_mandate (6 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('loan_mandate_id_seq'::regclass) loan_id character varying(64) NOT NULL provider character varying(32) NOT NULL status character varying(64) NOT NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: loan_mandate_pkey: CREATE UNIQUE INDEX loan_mandate_pkey ON public.loan_mandate USING btree (id) uq_loan_mandate_loan_provider: CREATE UNIQUE INDEX uq_loan_mandate_loan_provider ON public.loan_mandate USING btree (loan_id, provider) idx_loan_mandate_loan_id: CREATE INDEX idx_loan_mandate_loan_id ON public.loan_mandate USING btree (loan_id) TABLE: loan_nbfc (6 columns) ------------------------------------------------------------ loan_id text NOT NULL is_eligible_check_on_findoc boolean NULL is_eligible_check_on_fibe boolean NULL is_eligible_check_on_zype boolean NULL is_eligible_check_on_juspay_cardless boolean NULL is_eligible_check_on_lazypay boolean NULL INDEXES: loan_nbfc_pkey: CREATE UNIQUE INDEX loan_nbfc_pkey ON public.loan_nbfc USING btree (loan_id) TABLE: loan_status (4 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('loan_status_id_seq'::regclass) loan_id character varying(255) NOT NULL status_code integer NOT NULL added_on timestamp without time zone NULL INDEXES: loan_status_pkey: CREATE UNIQUE INDEX loan_status_pkey ON public.loan_status USING btree (id) idx_loan_status_code: CREATE INDEX idx_loan_status_code ON public.loan_status USING btree (status_code) idx_loan_status_loan_code: CREATE INDEX idx_loan_status_loan_code ON public.loan_status USING btree (loan_id, status_code) idx_loan_status_loan_code_date: CREATE INDEX idx_loan_status_loan_code_date ON public.loan_status USING btree (loan_id, status_code, added_on DESC) idx_loan_status_loan_id: CREATE INDEX idx_loan_status_loan_id ON public.loan_status USING btree (loan_id) idx_loan_status_loan_id_code: CREATE INDEX idx_loan_status_loan_id_code ON public.loan_status USING btree (loan_id, status_code) TABLE: loan_to_application (4 columns) ------------------------------------------------------------ loan_id text NULL application_id text NULL id integer NOT NULL DEFAULT nextval('loan_to_application_id_seq'::regclass) gift_card_id text NULL INDEXES: idx_loan_to_application_application_id: CREATE INDEX idx_loan_to_application_application_id ON public.loan_to_application USING btree (application_id) WHERE (application_id IS NOT NULL) idx_loan_to_application_loan_id: CREATE INDEX idx_loan_to_application_loan_id ON public.loan_to_application USING btree (loan_id) uk_application_id: CREATE UNIQUE INDEX uk_application_id ON public.loan_to_application USING btree (application_id) uk_loan_id: CREATE UNIQUE INDEX uk_loan_id ON public.loan_to_application USING btree (loan_id) TABLE: loan_webhook (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('loan_webhook_id_seq'::regclass) utr_no text NULL approved_amount double precision NULL DEFAULT 0 disbursed_amount double precision NULL DEFAULT 0 application_no text NULL docs bytea NULL unique_id_no text NULL loan_id text NULL TABLE: mandate (20 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('mandate_id_seq'::regclass) loan_id character varying(255) NULL mandate_id character varying(255) NULL umrn character varying(255) NULL state character varying(100) NULL status character varying(100) NULL created_at timestamp without time zone NULL valid_till timestamp without time zone NULL data text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL mandate_type character varying(100) NULL authentication_url text NULL current_stage character varying(100) NULL message text NULL npci_txn_id character varying(255) NULL phone_number character varying(255) NULL auth_sub_mode character varying(100) NULL maximum_amount double precision NULL nbfc_id character varying(255) NULL INDEXES: mandate_pkey: CREATE UNIQUE INDEX mandate_pkey ON public.mandate USING btree (id) TABLE: mandate_razorpay (18 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('mandate_razorpay_id_seq'::regclass) loan_mandate_id bigint NOT NULL razorpay_customer_id character varying(128) NULL razorpay_order_id character varying(128) NULL razorpay_token_id character varying(128) NULL extra_payload text NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() status character varying(64) NULL invoice_id character varying(128) NULL invoice_number character varying(128) NULL short_url text NULL lead_id character varying(64) NULL customer_ref_id character varying(64) NULL account_no character varying(64) NULL account_type character varying(32) NULL bank character varying(128) NULL ifsc character varying(32) NULL INDEXES: mandate_razorpay_pkey: CREATE UNIQUE INDEX mandate_razorpay_pkey ON public.mandate_razorpay USING btree (id) idx_mandate_razorpay_customer: CREATE INDEX idx_mandate_razorpay_customer ON public.mandate_razorpay USING btree (razorpay_customer_id) idx_mandate_razorpay_order: CREATE INDEX idx_mandate_razorpay_order ON public.mandate_razorpay USING btree (razorpay_order_id) TABLE: mandate_razorpay_status (13 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('mandate_razorpay_status_id_seq'::regclass) mandate_razorpay_id character varying(64) NULL customer_id character varying(128) NULL status character varying(64) NULL invoice_id character varying(128) NULL lead_id character varying(64) NULL token_id character varying(128) NULL account_no character varying(64) NULL account_type character varying(32) NULL bank character varying(128) NULL ifsc character varying(32) NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: mandate_razorpay_status_pkey: CREATE UNIQUE INDEX mandate_razorpay_status_pkey ON public.mandate_razorpay_status USING btree (id) idx_mandate_razorpay_status_customer_invoice: CREATE INDEX idx_mandate_razorpay_status_customer_invoice ON public.mandate_razorpay_status USING btree (customer_id, invoice_id, lead_id, token_id) TABLE: media_library_asset (14 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('media_library_asset_id_seq'::regclass) asset_id character varying(64) NOT NULL title character varying(255) NOT NULL language character varying(64) NULL category character varying(128) NULL file_name character varying(255) NULL bucket_name character varying(128) NOT NULL bucket_key character varying(512) NOT NULL content_type character varying(128) NULL size_bytes bigint NULL url text NULL active boolean NOT NULL DEFAULT true added_on timestamp without time zone NOT NULL DEFAULT now() updated_on timestamp without time zone NOT NULL DEFAULT now() INDEXES: media_library_asset_pkey: CREATE UNIQUE INDEX media_library_asset_pkey ON public.media_library_asset USING btree (id) ux_media_library_asset_asset_id: CREATE UNIQUE INDEX ux_media_library_asset_asset_id ON public.media_library_asset USING btree (asset_id) ux_media_library_asset_bucket_key: CREATE UNIQUE INDEX ux_media_library_asset_bucket_key ON public.media_library_asset USING btree (bucket_key) TABLE: merchant_checkout_webhook_config (9 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('merchant_checkout_webhook_config_id_seq'::regclass) merchant_id character varying(64) NOT NULL status_push_enabled boolean NOT NULL DEFAULT false status_push_url text NULL status_push_api_key character varying(512) NULL connect_timeout_ms integer NOT NULL DEFAULT 5000 read_timeout_ms integer NOT NULL DEFAULT 15000 created_at timestamp without time zone NOT NULL updated_at timestamp without time zone NOT NULL INDEXES: merchant_checkout_webhook_config_pkey: CREATE UNIQUE INDEX merchant_checkout_webhook_config_pkey ON public.merchant_checkout_webhook_config USING btree (id) uk_merchant_checkout_webhook_merchant: CREATE UNIQUE INDEX uk_merchant_checkout_webhook_merchant ON public.merchant_checkout_webhook_config USING btree (merchant_id) TABLE: merchant_incentive_monthly_summary (18 columns) ------------------------------------------------------------ id character varying(32) NOT NULL beneficiary_doctor_id text NOT NULL payout_doctor_id text NOT NULL calc_scope text NOT NULL month integer NOT NULL year integer NOT NULL plan_id character varying(32) NULL achieved_slab_id integer NULL total_disbursed_amount bigint NOT NULL DEFAULT 0 incentive_amount integer NOT NULL DEFAULT 0 included_doctor_ids text NULL status text NOT NULL calculated_on timestamp without time zone NULL paid_on timestamp without time zone NULL transaction_ref text NULL wallet_transferred_amount integer NOT NULL DEFAULT 0 payout_to text NOT NULL DEFAULT 'SELF'::text payout_target_id text NULL INDEXES: merchant_incentive_monthly_summary_pkey: CREATE UNIQUE INDEX merchant_incentive_monthly_summary_pkey ON public.merchant_incentive_monthly_summary USING btree (id) uq_merchant_incentive_summary: CREATE UNIQUE INDEX uq_merchant_incentive_summary ON public.merchant_incentive_monthly_summary USING btree (beneficiary_doctor_id, calc_scope, month, year) TABLE: merchant_incentive_plan (7 columns) ------------------------------------------------------------ id character varying(32) NOT NULL name text NOT NULL description text NULL is_default boolean NOT NULL DEFAULT false status text NOT NULL DEFAULT 'active'::text added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: merchant_incentive_plan_pkey: CREATE UNIQUE INDEX merchant_incentive_plan_pkey ON public.merchant_incentive_plan USING btree (id) TABLE: merchant_incentive_plan_assignment (11 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('merchant_incentive_plan_assignment_id_seq'::regclass) doctor_id text NOT NULL plan_id character varying(32) NOT NULL calc_scope text NOT NULL payout_to text NOT NULL DEFAULT 'SELF'::text effective_from timestamp without time zone NOT NULL effective_to timestamp without time zone NULL status text NOT NULL DEFAULT 'active'::text added_on timestamp without time zone NULL updated_on timestamp without time zone NULL payout_target_id text NULL INDEXES: merchant_incentive_plan_assignment_pkey: CREATE UNIQUE INDEX merchant_incentive_plan_assignment_pkey ON public.merchant_incentive_plan_assignment USING btree (id) TABLE: merchant_incentive_slab (5 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('merchant_incentive_slab_id_seq'::regclass) plan_id character varying(32) NOT NULL min_disbursed_amount bigint NOT NULL incentive_amount integer NOT NULL sort_order integer NOT NULL DEFAULT 0 INDEXES: merchant_incentive_slab_pkey: CREATE UNIQUE INDEX merchant_incentive_slab_pkey ON public.merchant_incentive_slab USING btree (id) TABLE: merchant_logs (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('merchant_logs_id_seq'::regclass) doctor_id character varying(255) NULL type character varying(100) NULL remark text NULL log_message text NULL added_on timestamp without time zone NULL INDEXES: merchant_logs_pkey: CREATE UNIQUE INDEX merchant_logs_pkey ON public.merchant_logs USING btree (id) TABLE: merchant_payment_links (25 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('merchant_payment_links_id_seq'::regclass) merchant_id character varying(64) NOT NULL purpose character varying(64) NOT NULL reference_id character varying(128) NULL client_request_id character varying(128) NULL amount integer NOT NULL currency character varying(8) NOT NULL DEFAULT 'INR'::character varying description character varying(512) NULL payment_link_id character varying(64) NOT NULL short_url character varying(512) NULL status character varying(32) NOT NULL payment_id character varying(64) NULL customer_name character varying(128) NULL customer_contact character varying(32) NULL created_by character varying(100) NULL razorpay_created_at timestamp without time zone NULL paid_date timestamp without time zone NULL added_on timestamp without time zone NOT NULL updated_on timestamp without time zone NULL version integer NOT NULL DEFAULT 0 clinic_code character varying(64) NULL credits_posted character varying(20) NULL DEFAULT 'no'::character varying credits_posted_on timestamp without time zone NULL credits_post_attempt_count integer NULL DEFAULT 0 credits_post_response character varying(2000) NULL INDEXES: merchant_payment_links_pkey: CREATE UNIQUE INDEX merchant_payment_links_pkey ON public.merchant_payment_links USING btree (id) uk_mpl_payment_link_id: CREATE UNIQUE INDEX uk_mpl_payment_link_id ON public.merchant_payment_links USING btree (payment_link_id) uk_mpl_client_request_id: CREATE UNIQUE INDEX uk_mpl_client_request_id ON public.merchant_payment_links USING btree (client_request_id) uk_mpl_payment_id: CREATE UNIQUE INDEX uk_mpl_payment_id ON public.merchant_payment_links USING btree (payment_id) idx_mpl_merchant_id: CREATE INDEX idx_mpl_merchant_id ON public.merchant_payment_links USING btree (merchant_id) idx_mpl_merchant_purpose_ref: CREATE INDEX idx_mpl_merchant_purpose_ref ON public.merchant_payment_links USING btree (merchant_id, purpose, reference_id) idx_mpl_status_added: CREATE INDEX idx_mpl_status_added ON public.merchant_payment_links USING btree (status, added_on) uk_mpl_open_charge: CREATE UNIQUE INDEX uk_mpl_open_charge ON public.merchant_payment_links USING btree (merchant_id, purpose, COALESCE(reference_id, ''::character varying)) WHERE (lower((status)::text) <> ALL (ARRAY['paid'::text, 'expired'::text, 'cancelled'::text])) idx_mpl_credits_posted: CREATE INDEX idx_mpl_credits_posted ON public.merchant_payment_links USING btree (credits_posted) WHERE (lower((COALESCE(credits_posted, 'no'::character varying))::text) <> 'yes'::text) TABLE: merchant_settlement_recovery (17 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('merchant_settlement_recovery_id_seq'::regclass) doctor_id character varying(255) NOT NULL recovery_amount numeric NOT NULL recovery_type character varying(50) NOT NULL DEFAULT 'OVER_DISBURSEMENT'::character varying status character varying(30) NOT NULL DEFAULT 'PENDING'::character varying source_application_id character varying(255) NULL source_transfer_payment_id integer NULL reason text NULL created_by character varying(100) NULL scheduled_transfer_payment_id integer NULL applied_transfer_payment_id integer NULL applied_at timestamp without time zone NULL added_on timestamp without time zone NULL DEFAULT now() updated_on timestamp without time zone NULL DEFAULT now() cancelled_by character varying(100) NULL cancel_reason text NULL cancelled_at timestamp without time zone NULL INDEXES: merchant_settlement_recovery_pkey: CREATE UNIQUE INDEX merchant_settlement_recovery_pkey ON public.merchant_settlement_recovery USING btree (id) idx_msr_doctor_status: CREATE INDEX idx_msr_doctor_status ON public.merchant_settlement_recovery USING btree (doctor_id, status) TABLE: metrics_events (8 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('metrics_events_id_seq'::regclass) loan_id character varying(50) NULL doctor_id character varying(50) NULL lender_name character varying(50) NULL metric_type character varying(100) NOT NULL metric_value character varying(255) NULL metadata text NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: metrics_events_pkey: CREATE UNIQUE INDEX metrics_events_pkey ON public.metrics_events USING btree (id) idx_metrics_events_loan: CREATE INDEX idx_metrics_events_loan ON public.metrics_events USING btree (loan_id) TABLE: mis_data (22 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('mis_data_id_seq'::regclass) application_no character varying(100) NULL user_id character varying(100) NULL loan_id character varying(100) NULL borrower_name character varying(255) NULL borrower_mobile_no character varying(20) NULL patient_name character varying(255) NULL patient_mobile_no character varying(20) NULL loan_amount double precision NULL DEFAULT 0.0 treatment_amount double precision NULL DEFAULT 0.0 final_disbursed_amount double precision NULL DEFAULT 0.0 subvention_amount_including_gst double precision NULL DEFAULT 0.0 downpayment_amount double precision NULL DEFAULT 0.0 purpose_of_loan character varying(255) NULL loan_application_date timestamp without time zone NULL clinic_name character varying(255) NULL loan_application_status character varying(100) NULL product_name character varying(255) NULL disbursed_date timestamp without time zone NULL utr_number character varying(100) NULL lender_name character varying(255) NULL added_on timestamp without time zone NULL INDEXES: mis_data_pkey: CREATE UNIQUE INDEX mis_data_pkey ON public.mis_data USING btree (id) TABLE: mis_scheduler (10 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('mis_scheduler_id_seq'::regclass) vendor_name character varying(255) NULL execution_time character varying(255) NULL mail_id character varying(255) NULL cc_mail character varying(255) NULL enabled boolean NOT NULL added_on timestamp without time zone NULL updated_at timestamp without time zone NULL doctor_code character varying(255) NULL type character varying(255) NULL INDEXES: mis_scheduler_pkey: CREATE UNIQUE INDEX mis_scheduler_pkey ON public.mis_scheduler USING btree (id) TABLE: nbfc (20 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nbfc_id_seq'::regclass) name text NULL razorpay_api text NULL razorpay_secret text NULL max_days text NULL max_month text NULL interest_rate text NULL nbfc_id text NULL columns_allowed text NULL api_key text NULL logo_url text NULL dynamic_emi boolean NULL DEFAULT false contact_person_name text NULL contact_person_number text NULL city text NULL state text NULL address text NULL pin_code text NULL authentication_token text NULL is_bre_lender boolean NOT NULL DEFAULT false INDEXES: idx_nbfc_nbfc_id: CREATE INDEX idx_nbfc_nbfc_id ON public.nbfc USING btree (nbfc_id) TABLE: new_status_record (56 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('new_status_record_id_seq'::regclass) loan_id character varying(100) NULL application_initiated timestamp without time zone NULL application_in_progress timestamp without time zone NULL application_complete timestamp without time zone NULL lender_eligibility_check timestamp without time zone NULL decisioning_initiated timestamp without time zone NULL awaiting_lender_decision timestamp without time zone NULL loan_rejected timestamp without time zone NULL income_verification_required timestamp without time zone NULL approved timestamp without time zone NULL emi_plans_eligibility_check timestamp without time zone NULL emi_plan_selected timestamp without time zone NULL lender_flow_initiated timestamp without time zone NULL kyc_required timestamp without time zone NULL kyc_failed timestamp without time zone NULL kyc_complete timestamp without time zone NULL agreement_signing_initiated timestamp without time zone NULL agreement_generated timestamp without time zone NULL agreement_signing_failed timestamp without time zone NULL agreement_signed timestamp without time zone NULL bank_acc_kyc_initiated timestamp without time zone NULL bank_acc_kyc_successful timestamp without time zone NULL bank_acc_kyc_failed timestamp without time zone NULL emi_auto_pay_setup_in_progress timestamp without time zone NULL emi_auto_pay_setup_failed timestamp without time zone NULL emi_auto_pay_setup_complete timestamp without time zone NULL disbursal_initiated timestamp without time zone NULL disbursal_failed timestamp without time zone NULL loan_disbursed timestamp without time zone NULL utr_received timestamp without time zone NULL kyc_initiated timestamp without time zone NULL face_verification_initiated timestamp without time zone NULL face_verification_completed timestamp without time zone NULL digi_kyc_initiated timestamp without time zone NULL digi_kyc_completed timestamp without time zone NULL digi_kyc_failed timestamp without time zone NULL rfd timestamp without time zone NULL loan_operation_complete timestamp without time zone NULL name_verification_success timestamp without time zone NULL name_verification_failed timestamp without time zone NULL vc_pending timestamp without time zone NULL vc_completed timestamp without time zone NULL vc_skipped timestamp without time zone NULL do_generated timestamp without time zone NULL do_shared timestamp without time zone NULL invoice_required timestamp without time zone NULL invoice_uploaded timestamp without time zone NULL invoice_shared timestamp without time zone NULL invoice_skipped timestamp without time zone NULL digio_kyc_completed timestamp without time zone NULL digio_kyc_initiated timestamp without time zone NULL short_approval timestamp without time zone NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL invoice_verified timestamp without time zone NULL INDEXES: new_status_record_pkey: CREATE UNIQUE INDEX new_status_record_pkey ON public.new_status_record USING btree (id) TABLE: nexus_audit_log (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nexus_audit_log_id_seq'::regclass) table_name text NULL record_id text NULL action text NULL old_values text NULL new_values text NULL user_id text NULL timestamp timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: idx_nexus_audit_log_record: CREATE INDEX idx_nexus_audit_log_record ON public.nexus_audit_log USING btree (record_id) idx_nexus_audit_log_table: CREATE INDEX idx_nexus_audit_log_table ON public.nexus_audit_log USING btree (table_name) idx_nexus_audit_log_timestamp: CREATE INDEX idx_nexus_audit_log_timestamp ON public.nexus_audit_log USING btree ("timestamp") TABLE: nexus_details (16 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nexus_details_id_seq'::regclass) nexus_id text NOT NULL name text NULL email_id text NULL phone_number text NULL password text NULL parent_nexus_id text NULL level integer NULL DEFAULT 1 created_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_date timestamp without time zone NULL created_by text NULL status text NULL DEFAULT 'ACTIVE'::text nexus_login_otp integer NULL view character varying(64) NULL hard_logout boolean NOT NULL DEFAULT false device_id text NULL INDEXES: nexus_details_email_id_key: CREATE UNIQUE INDEX nexus_details_email_id_key ON public.nexus_details USING btree (email_id) nexus_details_nexus_id_key: CREATE UNIQUE INDEX nexus_details_nexus_id_key ON public.nexus_details USING btree (nexus_id) nexus_details_phone_number_key: CREATE UNIQUE INDEX nexus_details_phone_number_key ON public.nexus_details USING btree (phone_number) idx_nd_parent_nexus_id_status: CREATE INDEX idx_nd_parent_nexus_id_status ON public.nexus_details USING btree (parent_nexus_id, status) WHERE (status = 'ACTIVE'::text) idx_nexus_details_email: CREATE INDEX idx_nexus_details_email ON public.nexus_details USING btree (email_id) idx_nexus_details_nexus_id: CREATE INDEX idx_nexus_details_nexus_id ON public.nexus_details USING btree (nexus_id) idx_nexus_details_parent: CREATE INDEX idx_nexus_details_parent ON public.nexus_details USING btree (parent_nexus_id) idx_nexus_details_parent_status: CREATE INDEX idx_nexus_details_parent_status ON public.nexus_details USING btree (parent_nexus_id, status) WHERE (status = 'ACTIVE'::text) idx_nexus_details_phone: CREATE INDEX idx_nexus_details_phone ON public.nexus_details USING btree (phone_number) idx_nexus_details_status: CREATE INDEX idx_nexus_details_status ON public.nexus_details USING btree (status) TABLE: nexus_doctor_mapping (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nexus_doctor_mapping_id_seq'::regclass) nexus_id text NOT NULL doctor_id text NOT NULL assigned_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP assigned_by text NULL status text NULL DEFAULT 'ACTIVE'::text INDEXES: nexus_doctor_mapping_nexus_id_doctor_id_key: CREATE UNIQUE INDEX nexus_doctor_mapping_nexus_id_doctor_id_key ON public.nexus_doctor_mapping USING btree (nexus_id, doctor_id) idx_ndm_doctor_id_nexus_id_status: CREATE INDEX idx_ndm_doctor_id_nexus_id_status ON public.nexus_doctor_mapping USING btree (doctor_id, nexus_id, status) WHERE (status = 'ACTIVE'::text) idx_ndm_doctor_id_status: CREATE INDEX idx_ndm_doctor_id_status ON public.nexus_doctor_mapping USING btree (doctor_id, status) WHERE (status = 'ACTIVE'::text) idx_ndm_nexus_id_status: CREATE INDEX idx_ndm_nexus_id_status ON public.nexus_doctor_mapping USING btree (nexus_id, status) WHERE (status = 'ACTIVE'::text) idx_nexus_doctor_mapping_doctor: CREATE INDEX idx_nexus_doctor_mapping_doctor ON public.nexus_doctor_mapping USING btree (doctor_id) idx_nexus_doctor_mapping_doctor_id: CREATE INDEX idx_nexus_doctor_mapping_doctor_id ON public.nexus_doctor_mapping USING btree (nexus_id) idx_nexus_doctor_mapping_doctor_status: CREATE INDEX idx_nexus_doctor_mapping_doctor_status ON public.nexus_doctor_mapping USING btree (nexus_id, status) WHERE (status = 'ACTIVE'::text) idx_nexus_doctor_mapping_nexus: CREATE INDEX idx_nexus_doctor_mapping_nexus ON public.nexus_doctor_mapping USING btree (nexus_id) idx_nexus_doctor_mapping_nexus_doctor_status: CREATE INDEX idx_nexus_doctor_mapping_nexus_doctor_status ON public.nexus_doctor_mapping USING btree (nexus_id, doctor_id, status) idx_nexus_doctor_mapping_nexus_status: CREATE INDEX idx_nexus_doctor_mapping_nexus_status ON public.nexus_doctor_mapping USING btree (nexus_id, status) WHERE (status = 'ACTIVE'::text) idx_nexus_doctor_mapping_status: CREATE INDEX idx_nexus_doctor_mapping_status ON public.nexus_doctor_mapping USING btree (status) TABLE: nexus_logs (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nexus_logs_id_seq'::regclass) user_id character varying(255) NULL loan_id character varying(255) NULL type character varying(255) NULL remark text NULL log_message text NULL log_data text NULL added_on timestamp without time zone NULL INDEXES: nexus_logs_pkey: CREATE UNIQUE INDEX nexus_logs_pkey ON public.nexus_logs USING btree (id) TABLE: nexus_performance (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nexus_performance_id_seq'::regclass) nexus_id character varying(255) NOT NULL target_id integer NULL period_start_date date NOT NULL period_end_date date NOT NULL target_type character varying(50) NOT NULL target_value numeric NOT NULL actual_value numeric NOT NULL achievement_percentage numeric NULL status character varying(20) NULL calculated_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP notification_sent boolean NULL DEFAULT false notification_sent_at timestamp without time zone NULL INDEXES: nexus_performance_pkey: CREATE UNIQUE INDEX nexus_performance_pkey ON public.nexus_performance USING btree (id) idx_nexus_performance_calculated_at: CREATE INDEX idx_nexus_performance_calculated_at ON public.nexus_performance USING btree (calculated_at) idx_nexus_performance_nexus_id: CREATE INDEX idx_nexus_performance_nexus_id ON public.nexus_performance USING btree (nexus_id) idx_nexus_performance_period: CREATE INDEX idx_nexus_performance_period ON public.nexus_performance USING btree (period_start_date, period_end_date) idx_nexus_performance_status: CREATE INDEX idx_nexus_performance_status ON public.nexus_performance USING btree (status) idx_nexus_performance_target_id: CREATE INDEX idx_nexus_performance_target_id ON public.nexus_performance USING btree (target_id) TABLE: nexus_target (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nexus_target_id_seq'::regclass) nexus_id character varying(255) NOT NULL target_type character varying(50) NOT NULL target_value numeric NOT NULL period_type character varying(20) NOT NULL period_start_date date NOT NULL period_end_date date NOT NULL assigned_by character varying(255) NULL assigned_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP status character varying(20) NULL DEFAULT 'ACTIVE'::character varying notes text NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_at timestamp without time zone NULL INDEXES: nexus_target_pkey: CREATE UNIQUE INDEX nexus_target_pkey ON public.nexus_target USING btree (id) idx_nexus_target_nexus_id: CREATE INDEX idx_nexus_target_nexus_id ON public.nexus_target USING btree (nexus_id) idx_nexus_target_period: CREATE INDEX idx_nexus_target_period ON public.nexus_target USING btree (period_start_date, period_end_date) idx_nexus_target_status: CREATE INDEX idx_nexus_target_status ON public.nexus_target USING btree (status) idx_nexus_target_type: CREATE INDEX idx_nexus_target_type ON public.nexus_target USING btree (target_type) TABLE: nexus_visit (21 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('nexus_visit_id_seq'::regclass) nexus_id character varying(255) NOT NULL visit_id character varying(255) NOT NULL doctor_id character varying(255) NULL visit_date timestamp without time zone NULL check_in timestamp without time zone NULL check_out timestamp without time zone NULL status character varying(50) NULL check_in_location text NULL check_out_location text NULL doctor_opportunity_id character varying(255) NULL reminder_sent integer NULL DEFAULT 0 clinic_image character varying(255) NULL checkin_reminder_sent integer NULL DEFAULT 0 device_id_mismatch integer NULL DEFAULT 0 device_id character varying(255) NULL purpose_of_visit text NULL type_of_visit text NULL remark text NULL feedback text NULL poc_id character varying(255) NULL INDEXES: nexus_visit_pkey: CREATE UNIQUE INDEX nexus_visit_pkey ON public.nexus_visit USING btree (id) nexus_visit_visit_id_unique: CREATE UNIQUE INDEX nexus_visit_visit_id_unique ON public.nexus_visit USING btree (visit_id) TABLE: occupational_detail (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('occupational_detail_id_seq'::regclass) user_id text NULL highest_qualification text NULL employer_type text NULL change_date date NULL full_part_time text NULL optional_email text NULL designation text NULL TABLE: otp (4 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('otp_id_seq'::regclass) otp integer NULL mobile_number text NULL added_on timestamp without time zone NULL TABLE: payment_links_detail (25 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('payment_links_id_seq'::regclass) payment_link_id text NULL loan_id text NULL emi_no integer NULL short_url text NULL status text NULL created_at timestamp without time zone NULL amount integer NULL currency character varying(3) NULL customer_name character varying(100) NULL customer_contact character varying(15) NULL reference_id character varying(50) NULL expire_by timestamp without time zone NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL user_id text NULL paid_date timestamp without time zone NULL payment_id text NULL payment_type character varying(100) NULL posted_to_findoc character varying(50) NULL posted_date timestamp without time zone NULL nbfc_id character varying(100) NULL created_by character varying(100) NULL whatsapp_sent character varying(20) NULL findoc_post_attempt_count integer NULL DEFAULT 0 TABLE: payu_settlement (10 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('payu_settlement_id_seq'::regclass) settlement_id character varying(255) NULL merchant_id character varying(255) NULL utr_number character varying(255) NULL settlement_amount character varying(50) NULL transaction_amount character varying(50) NULL settlement_date timestamp without time zone NULL raw_response text NULL created_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: payu_settlement_pkey: CREATE UNIQUE INDEX payu_settlement_pkey ON public.payu_settlement USING btree (id) payu_settlement_settlement_id_key: CREATE UNIQUE INDEX payu_settlement_settlement_id_key ON public.payu_settlement USING btree (settlement_id) TABLE: personal_loan_credit_decision (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('personal_loan_credit_decision_id_seq'::regclass) user_id character varying(255) NOT NULL income_declared numeric NULL employment_tenure integer NULL decision character varying(50) NULL external_api_response text NULL created_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP status character varying(20) NULL DEFAULT 'ACTIVE'::character varying INDEXES: personal_loan_credit_decision_pkey: CREATE UNIQUE INDEX personal_loan_credit_decision_pkey ON public.personal_loan_credit_decision USING btree (id) TABLE: personal_loan_product (14 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('personal_loan_product_id_seq'::regclass) product_id character varying(255) NULL product_name character varying(50) NULL total_emi integer NULL advance_emi integer NULL processing_fees_including_gst_rate numeric NULL processing_fees_including_gst_inr integer NULL subvention_rate integer NULL nbfc_take_percent integer NULL interest integer NULL status boolean NULL processing_fees_type character varying(20) NULL reference_id character varying(255) NULL interest_type character varying(20) NULL INDEXES: personal_loan_product_pkey: CREATE UNIQUE INDEX personal_loan_product_pkey ON public.personal_loan_product USING btree (id) personal_loan_product_product_id_key: CREATE UNIQUE INDEX personal_loan_product_product_id_key ON public.personal_loan_product USING btree (product_id) TABLE: poc_details (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('poc_details_id_seq'::regclass) poc_id character varying(255) NULL name character varying(255) NULL phone_number character varying(20) NULL designation character varying(255) NULL email_id character varying(255) NULL doctor_opportunity_id character varying(255) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: poc_details_pkey: CREATE UNIQUE INDEX poc_details_pkey ON public.poc_details USING btree (id) TABLE: policy_doctor_mapping (8 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('policy_doctor_mapping_id_seq'::regclass) doctor_id character varying(255) NOT NULL small_ticket_policy character varying(50) NULL DEFAULT 'Active'::character varying medium_ticket_policy character varying(50) NULL DEFAULT 'Active'::character varying large_ticket_policy character varying(50) NULL DEFAULT 'Active'::character varying added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL changed_by character varying(255) NULL INDEXES: policy_doctor_mapping_doctor_id_key: CREATE UNIQUE INDEX policy_doctor_mapping_doctor_id_key ON public.policy_doctor_mapping USING btree (doctor_id) policy_doctor_mapping_pkey: CREATE UNIQUE INDEX policy_doctor_mapping_pkey ON public.policy_doctor_mapping USING btree (id) TABLE: poonawala_logs (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('poonawala_logs_id_seq'::regclass) loan_id character varying(100) NULL user_id character varying(100) NULL poonawala_reference_id character varying(100) NULL log_type character varying(100) NULL remarks text NULL log_message text NULL data text NULL added_on timestamp without time zone NULL INDEXES: poonawala_logs_pkey: CREATE UNIQUE INDEX poonawala_logs_pkey ON public.poonawala_logs USING btree (id) TABLE: poonawala_offer_details (23 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('poonawala_offer_details_id_seq'::regclass) loan_id character varying(100) NULL reference_id character varying(100) NULL lead_id character varying(100) NULL offer_type character varying(20) NOT NULL product character varying(100) NULL interest_rate character varying(50) NULL tenure character varying(50) NULL processing_fee character varying(50) NULL loan_amount character varying(50) NULL offer_start character varying(100) NULL offer_expiry character varying(100) NULL no_offer_reason character varying(255) NULL campaign_name character varying(255) NULL scheme_name character varying(255) NULL risk_segment character varying(100) NULL offer_eligible character varying(20) NULL stamp_duty character varying(50) NULL documentation_charges character varying(50) NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL offer_status character varying(255) NULL max_eligible_emi character varying(255) NULL INDEXES: poonawala_offer_details_pkey: CREATE UNIQUE INDEX poonawala_offer_details_pkey ON public.poonawala_offer_details USING btree (id) TABLE: poonawalla_details (70 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('poonawalla_details_id_seq'::regclass) loan_id character varying(100) NULL last_complete_step character varying(100) NULL reference_id character varying(100) NULL email_verify_id character varying(255) NULL personal_email_verify boolean NOT NULL DEFAULT false offered_loan_amount character varying(50) NULL tenure character varying(50) NULL aa_journey_status character varying(100) NULL aa_callback_status character varying(100) NULL perfios_transaction_id character varying(255) NULL aa_generated_link text NULL aa_generate_link_code character varying(50) NULL aa_initiated_activity_status character varying(255) NULL aa_completed_activity_status character varying(255) NULL offer_updated_activity_status character varying(255) NULL selfie_activity_status character varying(255) NULL borrower_digilocker_url text NULL patient_digilocker_url text NULL borrower_digilocker_status character varying(100) NULL borrower_kyc_status character varying(100) NULL patient_digilocker_status character varying(100) NULL patient_kyc_status character varying(100) NULL ovd_name character varying(255) NULL ovd_address text NULL penny_drop_status character varying(100) NULL penny_drop_status_message character varying(255) NULL penny_drop_api_success character varying(20) NULL penny_drop_bank_name character varying(255) NULL penny_drop_name_match_score character varying(50) NULL penny_drop_activity_status character varying(255) NULL name_at_bank character varying(255) NULL pfl_lsq_application_id character varying(100) NULL mandate_id character varying(255) NULL mandate_req_id character varying(255) NULL mandate_registration_url text NULL mandate_status character varying(100) NULL mandate_activity_status character varying(255) NULL umrn character varying(255) NULL rps_kfs_base64 text NULL rps_esign_base64 text NULL esign_link_signing_url text NULL esign_link_reason character varying(500) NULL esign_link_status character varying(50) NULL application_status character varying(100) NULL callback_remark character varying(500) NULL callback_date_time character varying(50) NULL lender_status character varying(100) NULL loan_account_number character varying(100) NULL lsq_lead_id character varying(100) NULL rcu_status character varying(100) NULL rcu_remark character varying(500) NULL esign_status character varying(50) NULL customer_agreement_date character varying(20) NULL final_loan_amount character varying(50) NULL loan_booking_status character varying(500) NULL esign_activity_status character varying(255) NULL segment_color character varying(255) NULL scheme_id character varying(255) NULL pan_match character varying(50) NULL dob_match character varying(50) NULL phone_match character varying(50) NULL pincode_match character varying(50) NULL cibil_expiry character varying(100) NULL utr_number character varying(255) NULL payment_status character varying(64) NULL stamp_duty character varying(50) NULL patient_ovd_address text NULL penny_drop_timestamp character varying(50) NULL rps_pnfout_json text NULL INDEXES: poonawalla_details_pkey: CREATE UNIQUE INDEX poonawalla_details_pkey ON public.poonawalla_details USING btree (id) TABLE: product_details (15 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('product_details_id_seq'::regclass) product_id text NULL product_name text NULL total_emi integer NULL advance_emi integer NULL processing_fees_including_gst_rate double precision NULL processing_fees_including_gst_inr double precision NULL subvention_rate double precision NULL nbfc_take_percent double precision NULL interest double precision NULL status boolean NULL DEFAULT false processing_fees_type text NULL reference_id text NULL money_view_scheme_id text NULL zype_scheme_id character varying(255) NULL TABLE: razorpay (37 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('razorpay_id_seq'::regclass) user_id text NULL loan_id text NULL customer_id text NULL razorpay_signature text NULL razorpay_order_id text NULL razorpay_payment_id text NULL error text NULL token_id text NULL is_token_present boolean NULL DEFAULT false date timestamp without time zone NULL gift_card_id text NULL method_type text NULL status text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL acquirer_data text NULL entity character varying(255) NULL amount integer NULL invoice_id character varying(255) NULL method character varying(255) NULL amount_refunded integer NULL refund_status character varying(255) NULL captured boolean NULL description text NULL card_id character varying(255) NULL bank character varying(255) NULL wallet character varying(255) NULL vpa character varying(255) NULL email character varying(255) NULL contact character varying(255) NULL fee integer NULL tax integer NULL emi_issuer text NULL emi_duration integer NULL DEFAULT 0 emi_rate double precision NULL DEFAULT 0.0 emi_type text NULL TABLE: repayment_schedule (14 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('repayment_schedule_id_seq'::regclass) user_id text NULL repay_schedule_id integer NULL DEFAULT 0 company_id integer NULL DEFAULT 0 product_id integer NULL DEFAULT 0 loan_id text NULL emi_no integer NULL DEFAULT 0 due_date text NULL emi_amount double precision NULL DEFAULT 0 prin double precision NULL DEFAULT 0 int_amount double precision NULL DEFAULT 0 __v integer NULL DEFAULT 0 added_on timestamp without time zone NULL outstanding_principal double precision NULL TABLE: roles (5 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('roles_id_seq'::regclass) role_code text NULL role_name text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: salaried_detail (27 columns) ------------------------------------------------------------ user_id text NULL organization_name text NULL net_take_home_salary integer NULL DEFAULT 0 work_experience_current_organization text NULL is_this_first_job text NULL work_experience_previous_organization text NULL total_experience text NULL id integer NOT NULL DEFAULT nextval('salaried_detail_id_seq'::regclass) office_address text NULL salary_day integer NULL DEFAULT 0 no_of_employees integer NULL organisation_verified boolean NULL DEFAULT false date_of_joining text NULL employer_type text NULL monthly_in_hand_salary integer NULL DEFAULT 0 monthly_family_income integer NULL DEFAULT 0 current_company_name text NULL workplace_address1 text NULL workplace_address2 text NULL workplace_pincode text NULL industry text NULL current_job_exp_in_month integer NULL DEFAULT 0 current_job_exp_in_years integer NULL DEFAULT 0 total_job_exp_in_month integer NULL DEFAULT 0 total_job_exp_in_years integer NULL DEFAULT 0 employment_type text NULL salary_verified boolean NULL DEFAULT false TABLE: scout_performance (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('scout_performance_id_seq'::regclass) scout_id character varying(255) NOT NULL target_id integer NULL period_start_date date NOT NULL period_end_date date NOT NULL target_type character varying(50) NOT NULL target_value numeric NOT NULL actual_value numeric NOT NULL achievement_percentage numeric NULL status character varying(20) NULL calculated_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP notification_sent boolean NULL DEFAULT false notification_sent_at timestamp without time zone NULL INDEXES: scout_performance_pkey: CREATE UNIQUE INDEX scout_performance_pkey ON public.scout_performance USING btree (id) idx_scout_performance_calculated_at: CREATE INDEX idx_scout_performance_calculated_at ON public.scout_performance USING btree (calculated_at) idx_scout_performance_period: CREATE INDEX idx_scout_performance_period ON public.scout_performance USING btree (period_start_date, period_end_date) idx_scout_performance_scout_id: CREATE INDEX idx_scout_performance_scout_id ON public.scout_performance USING btree (scout_id) idx_scout_performance_status: CREATE INDEX idx_scout_performance_status ON public.scout_performance USING btree (status) idx_scout_performance_target_id: CREATE INDEX idx_scout_performance_target_id ON public.scout_performance USING btree (target_id) TABLE: scout_target (13 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('scout_target_id_seq'::regclass) scout_id character varying(255) NOT NULL target_type character varying(50) NOT NULL target_value numeric NOT NULL period_type character varying(20) NOT NULL period_start_date date NOT NULL period_end_date date NOT NULL assigned_by character varying(255) NULL assigned_date timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP status character varying(20) NULL DEFAULT 'ACTIVE'::character varying notes text NULL created_at timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_at timestamp without time zone NULL INDEXES: scout_target_pkey: CREATE UNIQUE INDEX scout_target_pkey ON public.scout_target USING btree (id) idx_scout_target_period: CREATE INDEX idx_scout_target_period ON public.scout_target USING btree (period_start_date, period_end_date) idx_scout_target_scout_id: CREATE INDEX idx_scout_target_scout_id ON public.scout_target USING btree (scout_id) idx_scout_target_status: CREATE INDEX idx_scout_target_status ON public.scout_target USING btree (status) idx_scout_target_type: CREATE INDEX idx_scout_target_type ON public.scout_target USING btree (target_type) TABLE: scout_visit (11 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('scout_visit_id_seq'::regclass) scout_id character varying(255) NULL visit_id character varying(255) NULL doctor_id character varying(255) NULL visit_date date NULL check_in timestamp without time zone NULL check_out timestamp without time zone NULL status character varying(100) NULL check_in_location character varying(255) NULL check_out_location character varying(255) NULL doctor_opportunity_id text NULL INDEXES: scout_visit_pkey: CREATE UNIQUE INDEX scout_visit_pkey ON public.scout_visit USING btree (id) TABLE: sftp_ingestion_file (12 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('sftp_ingestion_file_id_seq'::regclass) file_name character varying(255) NOT NULL remote_path character varying(1000) NOT NULL file_size_bytes bigint NULL remote_mtime_epoch bigint NULL status character varying(40) NOT NULL attempt_count integer NOT NULL DEFAULT 0 last_error text NULL local_path character varying(1000) NULL processed_on timestamp without time zone NULL added_on timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP INDEXES: sftp_ingestion_file_pkey: CREATE UNIQUE INDEX sftp_ingestion_file_pkey ON public.sftp_ingestion_file USING btree (id) uk_sftp_ingestion_file_remote_path: CREATE UNIQUE INDEX uk_sftp_ingestion_file_remote_path ON public.sftp_ingestion_file USING btree (remote_path) idx_sftp_ingestion_file_status: CREATE INDEX idx_sftp_ingestion_file_status ON public.sftp_ingestion_file USING btree (status) idx_sftp_ingestion_file_updated_on: CREATE INDEX idx_sftp_ingestion_file_updated_on ON public.sftp_ingestion_file USING btree (updated_on DESC) TABLE: signzy_bureau_report (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('signzy_bureau_report_id_seq'::regclass) user_id character varying(255) NULL request_id character varying(255) NULL reference_id character varying(255) NULL signzy_bureau_dump text NULL signzy_bureau_score character varying(64) NULL created_at timestamp without time zone NULL updated_at timestamp without time zone NULL INDEXES: signzy_bureau_report_pkey: CREATE UNIQUE INDEX signzy_bureau_report_pkey ON public.signzy_bureau_report USING btree (id) TABLE: signzy_digilocker (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('signzy_digilocker_id_seq'::regclass) loan_id character varying(255) NULL request_id character varying(255) NULL url text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: signzy_digilocker_docs (20 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('signzy_digilocker_docs_id_seq'::regclass) loan_id text NULL digilocker_id text NULL name text NULL mobile text NULL dob text NULL gender text NULL eaadhaar text NULL file_name text NULL file_type text NULL doc_type text NULL description text NULL issuer_id text NULL issuer text NULL file_id text NULL xml_url text NULL pdf_url text NULL json_url text NULL added_on timestamp without time zone NULL carepay_url text NULL TABLE: signzy_employment_verification (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('signzy_employment_verification_id_seq'::regclass) mobile_number character varying(20) NULL pan_number character varying(20) NULL employee_name character varying(255) NULL date_of_birth character varying(20) NULL request_body text NULL response_body text NULL status_code integer NULL added_on timestamp without time zone NOT NULL DEFAULT now() INDEXES: signzy_employment_verification_pkey: CREATE UNIQUE INDEX signzy_employment_verification_pkey ON public.signzy_employment_verification USING btree (id) TABLE: signzy_penny_drop (15 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('signzy_penny_drop_id_seq'::regclass) loan_id character varying(255) NULL data text NULL active character varying(255) NULL reason character varying(255) NULL name_match character varying(255) NULL mobile_match character varying(255) NULL signzy_reference_id character varying(255) NULL name_match_score character varying(255) NULL bank_transfer text NULL audit_trail text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL audit_time_tamp timestamp without time zone NULL doctor_id text NULL INDEXES: signzy_penny_drop_pkey: CREATE UNIQUE INDEX signzy_penny_drop_pkey ON public.signzy_penny_drop USING btree (id) TABLE: signzy_phone_prefill (7 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('signzy_phone_prefill_id_seq'::regclass) phone_number character varying(20) NULL first_name character varying(100) NULL request_body text NULL response_body text NULL status_code integer NULL added_on timestamp without time zone NOT NULL DEFAULT now() INDEXES: signzy_phone_prefill_pkey: CREATE UNIQUE INDEX signzy_phone_prefill_pkey ON public.signzy_phone_prefill USING btree (id) TABLE: speciality_master (5 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('speciality_master_id_seq'::regclass) speciality_id character varying(50) NULL speciality_name character varying(255) NOT NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: speciality_master_pkey: CREATE UNIQUE INDEX speciality_master_pkey ON public.speciality_master USING btree (id) speciality_master_speciality_id_key: CREATE UNIQUE INDEX speciality_master_speciality_id_key ON public.speciality_master USING btree (speciality_id) TABLE: staff_incentive_plan (17 columns) ------------------------------------------------------------ id character varying(32) NOT NULL plan_code character varying(64) NOT NULL external_ref character varying(32) NULL category character varying(32) NOT NULL metric character varying(64) NOT NULL threshold_value bigint NOT NULL points integer NOT NULL window_type character varying(32) NOT NULL requires_plan_code character varying(64) NULL merchant_scope character varying(16) NOT NULL active boolean NOT NULL DEFAULT true start_at timestamp without time zone NULL end_at timestamp without time zone NULL award_mode character varying(32) NOT NULL title character varying(128) NULL created_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: staff_incentive_plan_pkey: CREATE UNIQUE INDEX staff_incentive_plan_pkey ON public.staff_incentive_plan USING btree (id) uk_sip_plan_code: CREATE UNIQUE INDEX uk_sip_plan_code ON public.staff_incentive_plan USING btree (plan_code) idx_sip_metric_active: CREATE INDEX idx_sip_metric_active ON public.staff_incentive_plan USING btree (metric, active) TABLE: staff_incentive_plan_merchant (3 columns) ------------------------------------------------------------ plan_id character varying(32) NOT NULL merchant_id character varying(64) NOT NULL created_on timestamp without time zone NULL INDEXES: staff_incentive_plan_merchant_pkey: CREATE UNIQUE INDEX staff_incentive_plan_merchant_pkey ON public.staff_incentive_plan_merchant USING btree (plan_id, merchant_id) TABLE: staff_incentive_plan_merchant_extra (4 columns) ------------------------------------------------------------ plan_id character varying(32) NOT NULL merchant_id character varying(64) NOT NULL extra_points integer NOT NULL DEFAULT 0 updated_on timestamp without time zone NULL INDEXES: staff_incentive_plan_merchant_extra_pkey: CREATE UNIQUE INDEX staff_incentive_plan_merchant_extra_pkey ON public.staff_incentive_plan_merchant_extra USING btree (plan_id, merchant_id) TABLE: staff_plan_progress (10 columns) ------------------------------------------------------------ id character varying(32) NOT NULL account_id character varying(32) NOT NULL plan_id character varying(32) NOT NULL window_key character varying(32) NOT NULL progress_value bigint NOT NULL DEFAULT 0 threshold_snapshot bigint NOT NULL status character varying(32) NOT NULL rewarded_ledger_id character varying(32) NULL rewarded_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: staff_plan_progress_pkey: CREATE UNIQUE INDEX staff_plan_progress_pkey ON public.staff_plan_progress USING btree (id) uk_spp_account_plan_window: CREATE UNIQUE INDEX uk_spp_account_plan_window ON public.staff_plan_progress USING btree (account_id, plan_id, window_key) TABLE: staff_reward_account (7 columns) ------------------------------------------------------------ id character varying(32) NOT NULL owner_type character varying(32) NOT NULL owner_id character varying(64) NOT NULL mobile_number character varying(20) NULL status character varying(32) NULL created_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: staff_reward_account_pkey: CREATE UNIQUE INDEX staff_reward_account_pkey ON public.staff_reward_account USING btree (id) uk_sra_owner: CREATE UNIQUE INDEX uk_sra_owner ON public.staff_reward_account USING btree (owner_type, owner_id) idx_sra_mobile: CREATE INDEX idx_sra_mobile ON public.staff_reward_account USING btree (mobile_number) TABLE: staff_reward_balance (5 columns) ------------------------------------------------------------ account_id character varying(32) NOT NULL balance integer NOT NULL DEFAULT 0 lifetime_earned integer NOT NULL DEFAULT 0 updated_on timestamp without time zone NULL version integer NOT NULL DEFAULT 0 INDEXES: staff_reward_balance_pkey: CREATE UNIQUE INDEX staff_reward_balance_pkey ON public.staff_reward_balance USING btree (account_id) TABLE: staff_reward_economy_config (5 columns) ------------------------------------------------------------ id character varying(32) NOT NULL config_key character varying(64) NOT NULL point_to_inr_ratio numeric NOT NULL DEFAULT 1.000000 updated_on timestamp without time zone NULL updated_by character varying(64) NULL INDEXES: staff_reward_economy_config_pkey: CREATE UNIQUE INDEX staff_reward_economy_config_pkey ON public.staff_reward_economy_config USING btree (id) uk_srec_key: CREATE UNIQUE INDEX uk_srec_key ON public.staff_reward_economy_config USING btree (config_key) TABLE: staff_reward_ledger_entry (18 columns) ------------------------------------------------------------ id character varying(32) NOT NULL account_id character varying(32) NOT NULL delta integer NOT NULL entry_type character varying(32) NOT NULL plan_id character varying(32) NULL plan_code character varying(64) NULL points_base integer NULL points_extra integer NULL event_type character varying(64) NULL source_type character varying(64) NULL source_id character varying(128) NULL idempotency_key character varying(191) NOT NULL merchant_id character varying(64) NULL staff_id character varying(64) NULL mobile_number character varying(20) NULL reason character varying(255) NULL metadata_json text NULL created_on timestamp without time zone NULL INDEXES: staff_reward_ledger_entry_pkey: CREATE UNIQUE INDEX staff_reward_ledger_entry_pkey ON public.staff_reward_ledger_entry USING btree (id) uk_srle_idempotency: CREATE UNIQUE INDEX uk_srle_idempotency ON public.staff_reward_ledger_entry USING btree (idempotency_key) idx_srle_merchant_earn: CREATE INDEX idx_srle_merchant_earn ON public.staff_reward_ledger_entry USING btree (merchant_id, entry_type, created_on) idx_srle_account_created: CREATE INDEX idx_srle_account_created ON public.staff_reward_ledger_entry USING btree (account_id, created_on) TABLE: staff_reward_processed_source (7 columns) ------------------------------------------------------------ id character varying(32) NOT NULL account_id character varying(32) NOT NULL plan_id character varying(32) NOT NULL source_type character varying(64) NOT NULL source_id character varying(128) NOT NULL amount_applied bigint NOT NULL DEFAULT 0 created_on timestamp without time zone NULL INDEXES: staff_reward_processed_source_pkey: CREATE UNIQUE INDEX staff_reward_processed_source_pkey ON public.staff_reward_processed_source USING btree (id) uk_srps_dedupe: CREATE UNIQUE INDEX uk_srps_dedupe ON public.staff_reward_processed_source USING btree (account_id, plan_id, source_type, source_id) TABLE: status (7 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('status_id_seq'::regclass) status_code integer NOT NULL user_status character varying(255) NULL admin_status character varying(255) NULL merchant_status character varying(255) NULL scout_status character varying(255) NULL colour_code character varying(255) NULL INDEXES: status_pkey: CREATE UNIQUE INDEX status_pkey ON public.status USING btree (id) TABLE: status_change_detail (8 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('status_change_detail_id_seq'::regclass) loan_id text NULL user_id text NULL previous_status text NULL updated_status text NULL comment text NULL changed_by text NULL change_on timestamp without time zone NULL TABLE: status_mapping (5 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('status_mapping_id_seq'::regclass) user_status text NULL admin_status text NULL status_id text NULL colour_code text NULL INDEXES: status_mapping_pkey: CREATE UNIQUE INDEX status_mapping_pkey ON public.status_mapping USING btree (id) idx_status_mapping_status_id: CREATE INDEX idx_status_mapping_status_id ON public.status_mapping USING btree (status_id) TABLE: tpa_agent (11 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_agent_id_seq'::regclass) tpa_org_id bigint NOT NULL center_id bigint NULL employee_code character varying(100) NULL full_name character varying(255) NOT NULL email character varying(255) NOT NULL mobile character varying(30) NOT NULL status character varying(50) NOT NULL last_login_at timestamp without time zone NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: tpa_agent_pkey: CREATE UNIQUE INDEX tpa_agent_pkey ON public.tpa_agent USING btree (id) ux_tpa_agent_email: CREATE UNIQUE INDEX ux_tpa_agent_email ON public.tpa_agent USING btree (email) ux_tpa_agent_mobile: CREATE UNIQUE INDEX ux_tpa_agent_mobile ON public.tpa_agent USING btree (mobile) ix_tpa_agent_center_created: CREATE INDEX ix_tpa_agent_center_created ON public.tpa_agent USING btree (center_id, created_at DESC) ix_tpa_agent_lower_email: CREATE INDEX ix_tpa_agent_lower_email ON public.tpa_agent USING btree (lower((email)::text)) TABLE: tpa_agent_auth (9 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_agent_auth_id_seq'::regclass) agent_id bigint NOT NULL password_hash character varying(255) NULL otp_code character varying(20) NULL otp_expires_at timestamp without time zone NULL last_login_at timestamp without time zone NULL failed_attempts integer NULL DEFAULT 0 created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: tpa_agent_auth_pkey: CREATE UNIQUE INDEX tpa_agent_auth_pkey ON public.tpa_agent_auth USING btree (id) ux_tpa_agent_auth_agent_id: CREATE UNIQUE INDEX ux_tpa_agent_auth_agent_id ON public.tpa_agent_auth USING btree (agent_id) ix_tpa_agent_auth_otp_expiry: CREATE INDEX ix_tpa_agent_auth_otp_expiry ON public.tpa_agent_auth USING btree (otp_expires_at) TABLE: tpa_center (10 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_center_id_seq'::regclass) tpa_org_id bigint NOT NULL center_name character varying(255) NOT NULL center_code character varying(100) NOT NULL region character varying(100) NULL city character varying(100) NULL address_json text NULL status character varying(50) NOT NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: tpa_center_pkey: CREATE UNIQUE INDEX tpa_center_pkey ON public.tpa_center USING btree (id) ux_tpa_center_org_code: CREATE UNIQUE INDEX ux_tpa_center_org_code ON public.tpa_center USING btree (tpa_org_id, center_code) ix_tpa_center_org_created: CREATE INDEX ix_tpa_center_org_created ON public.tpa_center USING btree (tpa_org_id, created_at DESC) TABLE: tpa_documents (7 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_documents_id_seq'::regclass) lead_id character varying(255) NULL user_id character varying(255) NULL document_type character varying(255) NULL document_url text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: tpa_documents_pkey: CREATE UNIQUE INDEX tpa_documents_pkey ON public.tpa_documents USING btree (id) TABLE: tpa_lead (50 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_lead_id_seq'::regclass) lead_id character varying(100) NOT NULL tpa_org_id bigint NOT NULL center_id bigint NOT NULL agent_id bigint NOT NULL user_id character varying(64) NULL hospital_id character varying(100) NOT NULL patient_name character varying(255) NULL patient_number character varying(30) NULL applicant_name character varying(255) NULL applicant_number character varying(30) NULL relationship_with_patient character varying(100) NULL applicant_monthly_income numeric NULL additional_details_json text NULL estimated_bill_amount numeric NULL final_bill_amount numeric NULL estimated_claim_amount numeric NULL final_claim_amount numeric NULL insurance_provider character varying(255) NULL policy_number character varying(100) NULL claim_number character varying(100) NULL status character varying(80) NOT NULL bureau_policy_version character varying(100) NULL bureau_decision character varying(50) NULL bureau_limit numeric NULL income_assessment_policy_version character varying(100) NULL income_assessment_decision character varying(50) NULL income_assessment_source character varying(50) NULL client_requested_income_assessment boolean NULL DEFAULT false bs_limit numeric NULL sanction_amount numeric NULL reason_codes_json text NULL decision_summary_json text NULL required_upfront_payment_amount numeric NULL booked_loan_amount numeric NULL linked_loan_id character varying(100) NULL linked_application_id character varying(100) NULL upfront_payment_confirmed boolean NULL DEFAULT false upfront_payment_confirmed_amount numeric NULL upfront_payment_reference character varying(150) NULL upfront_payment_confirmed_by character varying(150) NULL upfront_payment_confirmed_at timestamp without time zone NULL upfront_payment_remarks text NULL do_released boolean NULL DEFAULT false do_released_by character varying(150) NULL do_released_at timestamp without time zone NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL pre_auth_patient_name character varying(255) NULL final_bill_patient_name character varying(255) NULL INDEXES: tpa_lead_pkey: CREATE UNIQUE INDEX tpa_lead_pkey ON public.tpa_lead USING btree (id) ux_tpa_lead_lead_id: CREATE UNIQUE INDEX ux_tpa_lead_lead_id ON public.tpa_lead USING btree (lead_id) ix_tpa_lead_agent_created: CREATE INDEX ix_tpa_lead_agent_created ON public.tpa_lead USING btree (agent_id, created_at DESC) ix_tpa_lead_status_created: CREATE INDEX ix_tpa_lead_status_created ON public.tpa_lead USING btree (status, created_at DESC) ix_tpa_lead_hospital_created: CREATE INDEX ix_tpa_lead_hospital_created ON public.tpa_lead USING btree (hospital_id, created_at DESC) ix_tpa_lead_org_created: CREATE INDEX ix_tpa_lead_org_created ON public.tpa_lead USING btree (tpa_org_id, created_at DESC) ix_tpa_lead_center_created: CREATE INDEX ix_tpa_lead_center_created ON public.tpa_lead USING btree (center_id, created_at DESC) ix_tpa_lead_linked_loan: CREATE INDEX ix_tpa_lead_linked_loan ON public.tpa_lead USING btree (linked_loan_id) TABLE: tpa_lead_activity (16 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_lead_activity_id_seq'::regclass) lead_id character varying(255) NOT NULL activity_code character varying(80) NOT NULL activity_category character varying(40) NOT NULL title character varying(255) NULL description text NULL status_snapshot character varying(80) NULL actor_type character varying(30) NULL actor_id character varying(120) NULL linked_loan_id character varying(120) NULL linked_application_id character varying(120) NULL metadata_json text NULL is_milestone boolean NOT NULL DEFAULT false idempotency_key character varying(200) NULL occurred_at timestamp without time zone NOT NULL DEFAULT now() created_at timestamp without time zone NOT NULL DEFAULT now() INDEXES: tpa_lead_activity_pkey: CREATE UNIQUE INDEX tpa_lead_activity_pkey ON public.tpa_lead_activity USING btree (id) ix_tpa_lead_activity_lead_occurred: CREATE INDEX ix_tpa_lead_activity_lead_occurred ON public.tpa_lead_activity USING btree (lead_id, occurred_at DESC) ix_tpa_lead_activity_lead_milestone: CREATE INDEX ix_tpa_lead_activity_lead_milestone ON public.tpa_lead_activity USING btree (lead_id, is_milestone, occurred_at DESC) ix_tpa_lead_activity_code: CREATE INDEX ix_tpa_lead_activity_code ON public.tpa_lead_activity USING btree (activity_code) ix_tpa_lead_activity_loan: CREATE INDEX ix_tpa_lead_activity_loan ON public.tpa_lead_activity USING btree (linked_loan_id) WHERE (linked_loan_id IS NOT NULL) ux_tpa_lead_activity_idempotency: CREATE UNIQUE INDEX ux_tpa_lead_activity_idempotency ON public.tpa_lead_activity USING btree (lead_id, idempotency_key) WHERE (idempotency_key IS NOT NULL) TABLE: tpa_lead_kyc (26 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_lead_kyc_id_seq'::regclass) lead_id character varying(255) NOT NULL user_id character varying(64) NULL linked_loan_id character varying(120) NULL kyc_status character varying(40) NULL kyc_provider character varying(60) NULL kyc_reference_id character varying(120) NULL kyc_rejection_reason text NULL kyc_verified_at timestamp without time zone NULL selfie_url text NULL selfie_captured_at timestamp without time zone NULL face_match_status character varying(40) NULL face_match_score numeric NULL face_match_checked_at timestamp without time zone NULL face_match_raw_response_json text NULL advance_liveliness_status character varying(40) NULL advance_liveliness_score numeric NULL advance_liveliness_checked_at timestamp without time zone NULL advance_liveliness_raw_response_json text NULL digilocker_details_json text NULL digilocker_docs_json text NULL digilocker_files_json text NULL digilocker_eaadhaar_json text NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL kyc_document_image_url text NULL INDEXES: tpa_lead_kyc_pkey: CREATE UNIQUE INDEX tpa_lead_kyc_pkey ON public.tpa_lead_kyc USING btree (id) tpa_lead_kyc_lead_id_key: CREATE UNIQUE INDEX tpa_lead_kyc_lead_id_key ON public.tpa_lead_kyc USING btree (lead_id) ix_tpa_lead_kyc_lead_id: CREATE INDEX ix_tpa_lead_kyc_lead_id ON public.tpa_lead_kyc USING btree (lead_id) ix_tpa_lead_kyc_status: CREATE INDEX ix_tpa_lead_kyc_status ON public.tpa_lead_kyc USING btree (kyc_status) TABLE: tpa_lead_name_match (13 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_lead_name_match_id_seq'::regclass) lead_id character varying(100) NOT NULL left_source character varying(60) NOT NULL right_source character varying(60) NOT NULL left_name character varying(255) NULL right_name character varying(255) NULL match_score numeric NULL match_status character varying(40) NULL matcher character varying(40) NULL threshold numeric NULL checked_at timestamp without time zone NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: tpa_lead_name_match_pkey: CREATE UNIQUE INDEX tpa_lead_name_match_pkey ON public.tpa_lead_name_match USING btree (id) ux_tpa_lead_name_match_pair: CREATE UNIQUE INDEX ux_tpa_lead_name_match_pair ON public.tpa_lead_name_match USING btree (lead_id, left_source, right_source) ix_tpa_lead_name_match_lead_id: CREATE INDEX ix_tpa_lead_name_match_lead_id ON public.tpa_lead_name_match USING btree (lead_id) TABLE: tpa_lead_name_source (8 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_lead_name_source_id_seq'::regclass) lead_id character varying(100) NOT NULL source_type character varying(60) NOT NULL name_value character varying(255) NOT NULL source_ref character varying(150) NULL captured_at timestamp without time zone NOT NULL DEFAULT now() created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: tpa_lead_name_source_pkey: CREATE UNIQUE INDEX tpa_lead_name_source_pkey ON public.tpa_lead_name_source USING btree (id) ux_tpa_lead_name_source_lead_type: CREATE UNIQUE INDEX ux_tpa_lead_name_source_lead_type ON public.tpa_lead_name_source USING btree (lead_id, source_type) ix_tpa_lead_name_source_lead_id: CREATE INDEX ix_tpa_lead_name_source_lead_id ON public.tpa_lead_name_source USING btree (lead_id) TABLE: tpa_organization (9 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('tpa_organization_id_seq'::regclass) name character varying(255) NOT NULL code character varying(100) NOT NULL status character varying(50) NOT NULL contact_name character varying(255) NULL contact_email character varying(255) NULL contact_phone character varying(50) NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: tpa_organization_pkey: CREATE UNIQUE INDEX tpa_organization_pkey ON public.tpa_organization USING btree (id) ux_tpa_organization_name: CREATE UNIQUE INDEX ux_tpa_organization_name ON public.tpa_organization USING btree (name) ux_tpa_organization_code: CREATE UNIQUE INDEX ux_tpa_organization_code ON public.tpa_organization USING btree (code) TABLE: treatment_catalog (12 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('treatment_catalog_id_seq'::regclass) service_name character varying(255) NULL variant character varying(255) NULL type character varying(255) NULL speciality character varying(255) NULL age_min integer NULL age_max integer NULL min_price double precision NULL max_price double precision NULL average_duration integer NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: treatment_catalog_pkey: CREATE UNIQUE INDEX treatment_catalog_pkey ON public.treatment_catalog USING btree (id) TABLE: treatment_consultation_detail (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('treatment_consultation_detail_id_seq'::regclass) name character varying(255) NULL mobile character varying(20) NULL email character varying(255) NULL added_on timestamp without time zone NOT NULL treatment_name character varying(255) NULL city character varying(255) NULL analysis_id character varying(255) NULL face_score text NULL INDEXES: treatment_consultation_detail_pkey: CREATE UNIQUE INDEX treatment_consultation_detail_pkey ON public.treatment_consultation_detail USING btree (id) TABLE: treatment_details (10 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('treatment_details_id_seq'::regclass) speciality character varying(255) NULL treatment_name character varying(255) NULL treatment_category character varying(255) NULL cost double precision NULL time character varying(255) NULL status character varying(50) NULL DEFAULT 'active'::character varying added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP description text NULL INDEXES: treatment_details_pkey: CREATE UNIQUE INDEX treatment_details_pkey ON public.treatment_details USING btree (id) idx_treatment_category: CREATE INDEX idx_treatment_category ON public.treatment_details USING btree (treatment_category) idx_treatment_speciality: CREATE INDEX idx_treatment_speciality ON public.treatment_details USING btree (speciality) idx_treatment_status: CREATE INDEX idx_treatment_status ON public.treatment_details USING btree (status) TABLE: treatment_invoice (16 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('treatment_invoice_id_seq'::regclass) billing_date timestamp without time zone NOT NULL invoice_number character varying(255) NOT NULL loan_id character varying(100) NOT NULL invoice_url text NOT NULL added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP verification_status character varying NULL DEFAULT 'pending'::character varying verification_date date NULL verified_by character varying NULL remarks character varying NULL customer_name character varying(255) NULL treatment_name character varying(255) NULL total_amount character varying(100) NULL approved_by character varying(255) NULL approval_date timestamp without time zone NULL INDEXES: treatment_invoice_pkey: CREATE UNIQUE INDEX treatment_invoice_pkey ON public.treatment_invoice USING btree (id) TABLE: user_activity_detail (9 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('user_activity_detail_id_seq'::regclass) user_id text NULL type text NULL added_by text NULL added_on timestamp without time zone NULL activity text NULL loan_id text NULL updated_on timestamp without time zone NULL comments text NULL TABLE: user_address (12 columns) ------------------------------------------------------------ user_id text NULL address_type text NULL address text NULL state text NULL city text NULL pincode integer NULL residence_type text NULL residence_value text NULL change_date date NULL id integer NOT NULL DEFAULT nextval('user_address_id_seq'::regclass) locality text NULL landmark text NULL INDEXES: idx_user_address_user_id_id: CREATE INDEX idx_user_address_user_id_id ON public.user_address USING btree (user_id, id DESC) TABLE: user_documents_detail (42 columns) ------------------------------------------------------------ user_id text NULL loan_id text NULL photograph_url text NULL salary_proof_url text NULL pan_card_url text NULL bank_statement_url text NULL adhar_card_url text NULL cibil_url text NULL itr_url text NULL status text NULL loan_agreement text NULL id integer NOT NULL DEFAULT nextval('user_documents_detail_id_seq'::regclass) stamp_duty_url text NULL address text NULL city text NULL loan_cheque text NULL comments text NULL office_id_url text NULL location_image_url text NULL finbix_entity_id text NULL finbox_statement_id text NULL transaction_data text NULL finbox_hit integer NULL DEFAULT 0 finbox_statement_status text NULL signed_loan_aggreement text NULL current_address_url text NULL document_upload_status boolean NULL DEFAULT false gst_url text NULL other_doc_url text NULL multiple_bank_statements text NULL bank_statement_password text NULL other_doc_name text NULL audit_trail_url text NULL prescription_url text NULL adhar_card_back_url text NULL doctor_signed_aggrement_url text NULL rent_agreement_url text NULL electricity_bill_url text NULL gas_connection_bill_url text NULL wifi_bill_url text NULL telephone_bill_url text NULL treatment_proof text NULL TABLE: user_favorite_clinic (6 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('user_favorite_clinic_id_seq'::regclass) user_id character varying(255) NOT NULL doctor_id character varying(255) NOT NULL is_favorite boolean NULL DEFAULT true added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP INDEXES: user_favorite_clinic_pkey: CREATE UNIQUE INDEX user_favorite_clinic_pkey ON public.user_favorite_clinic USING btree (id) TABLE: user_kyc_attempt (12 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('user_kyc_attempt_id_seq'::regclass) attempt_id character varying(140) NOT NULL case_id character varying(120) NOT NULL user_id character varying(120) NOT NULL provider character varying(40) NULL status character varying(60) NOT NULL provider_reference_id character varying(200) NULL request_payload_json text NULL response_payload_json text NULL error_message text NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: user_kyc_attempt_pkey: CREATE UNIQUE INDEX user_kyc_attempt_pkey ON public.user_kyc_attempt USING btree (id) user_kyc_attempt_attempt_id_key: CREATE UNIQUE INDEX user_kyc_attempt_attempt_id_key ON public.user_kyc_attempt USING btree (attempt_id) ix_user_kyc_attempt_case_id: CREATE INDEX ix_user_kyc_attempt_case_id ON public.user_kyc_attempt USING btree (case_id) ix_user_kyc_attempt_user_id: CREATE INDEX ix_user_kyc_attempt_user_id ON public.user_kyc_attempt USING btree (user_id) TABLE: user_kyc_case (11 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('user_kyc_case_id_seq'::regclass) case_id character varying(120) NOT NULL user_id character varying(120) NOT NULL status character varying(40) NOT NULL provider character varying(40) NULL provider_reference_id character varying(200) NULL rejection_reason text NULL verified_at timestamp without time zone NULL expires_at timestamp without time zone NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: user_kyc_case_pkey: CREATE UNIQUE INDEX user_kyc_case_pkey ON public.user_kyc_case USING btree (id) user_kyc_case_case_id_key: CREATE UNIQUE INDEX user_kyc_case_case_id_key ON public.user_kyc_case USING btree (case_id) ix_user_kyc_case_user_id: CREATE INDEX ix_user_kyc_case_user_id ON public.user_kyc_case USING btree (user_id) ix_user_kyc_case_status: CREATE INDEX ix_user_kyc_case_status ON public.user_kyc_case USING btree (status) TABLE: user_kyc_context_link (7 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('user_kyc_context_link_id_seq'::regclass) case_id character varying(120) NOT NULL user_id character varying(120) NOT NULL context_type character varying(50) NOT NULL context_ref_id character varying(140) NOT NULL created_at timestamp without time zone NOT NULL DEFAULT now() updated_at timestamp without time zone NULL INDEXES: user_kyc_context_link_pkey: CREATE UNIQUE INDEX user_kyc_context_link_pkey ON public.user_kyc_context_link USING btree (id) uq_user_kyc_context: CREATE UNIQUE INDEX uq_user_kyc_context ON public.user_kyc_context_link USING btree (context_type, context_ref_id) ix_user_kyc_context_user_id: CREATE INDEX ix_user_kyc_context_user_id ON public.user_kyc_context_link USING btree (user_id) ix_user_kyc_context_case_id: CREATE INDEX ix_user_kyc_context_case_id ON public.user_kyc_context_link USING btree (case_id) TABLE: user_login (50 columns) ------------------------------------------------------------ user_id text NULL first_name text NULL middle_name text NULL last_name text NULL date_of_birth text NULL gender text NULL marital_status text NULL email_id text NULL mobile_number bigint NULL name_of_reference text NULL religion text NULL image_url text NULL mobile_verified boolean NULL form_status text NULL login_date timestamp without time zone NULL login_device text NULL reference_code text NULL sourceofinfo_plateform text NULL adhahar_link_status boolean NULL DEFAULT false alternate_number text NULL nach_status boolean NULL DEFAULT false verified boolean NULL DEFAULT false loan_from text NULL mail_subscribe boolean NULL DEFAULT true crif_decision text NULL recent_login timestamp without time zone NULL email_verified boolean NULL DEFAULT false save_date timestamp without time zone NULL important text NULL pan_no text NULL login_type integer NULL DEFAULT 0 pan_card_name text NULL completion_status boolean NULL DEFAULT false father_name text NULL reference_number text NULL reference_name text NULL reference_relation text NULL consent boolean NULL DEFAULT false aadhaar_no text NULL mother_name text NULL type_of_email text NULL education_level text NULL created_date timestamp without time zone NULL consent_timestamp timestamp without time zone NULL aadhaar_verified boolean NULL DEFAULT false name_as_per_pan text NULL name_as_per_aadhaar text NULL test_lead boolean NULL DEFAULT false activation_status character varying(50) NULL name_as_per_bureau character varying(255) NULL INDEXES: user_login_user_id_unique: CREATE UNIQUE INDEX user_login_user_id_unique ON public.user_login USING btree (user_id) idx_user_login_completion_date: CREATE INDEX idx_user_login_completion_date ON public.user_login USING btree (completion_status, login_date DESC) WHERE (login_date IS NOT NULL) idx_user_login_date_completion: CREATE INDEX idx_user_login_date_completion ON public.user_login USING btree (login_date DESC, completion_status) WHERE (login_date IS NOT NULL) idx_user_login_email_id: CREATE INDEX idx_user_login_email_id ON public.user_login USING btree (email_id) WHERE (email_id IS NOT NULL) idx_user_login_important: CREATE INDEX idx_user_login_important ON public.user_login USING btree (important) WHERE (important = 'yes'::text) idx_user_login_mobile_number: CREATE INDEX idx_user_login_mobile_number ON public.user_login USING btree (mobile_number) WHERE (mobile_number IS NOT NULL) idx_user_login_recent_login: CREATE INDEX idx_user_login_recent_login ON public.user_login USING btree (recent_login DESC NULLS LAST) WHERE (login_date IS NOT NULL) idx_user_login_user_id: CREATE INDEX idx_user_login_user_id ON public.user_login USING btree (user_id) unique_mobile_number: CREATE UNIQUE INDEX unique_mobile_number ON public.user_login USING btree (mobile_number) TABLE: user_logs (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('user_logs_id_seq'::regclass) log_message text NULL type text NULL added_on timestamp without time zone NULL user_id text NULL remark text NULL INDEXES: useridindex: CREATE INDEX useridindex ON public.user_logs USING btree (user_id) TABLE: user_rating (6 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('user_rating_id_seq'::regclass) loan_id character varying(255) NULL stars double precision NULL DEFAULT 0 comment text NULL created_at timestamp without time zone NULL updated_at timestamp without time zone NULL TABLE: user_to_bank (5 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('user_to_bank_id_seq'::regclass) user_id text NULL bank_id text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL TABLE: user_to_loan (45 columns) ------------------------------------------------------------ user_id text NULL loan_id text NULL loan_amount bigint NULL loan_status text NULL application_status text NULL id integer NOT NULL DEFAULT nextval('user_to_loan_id_seq'::regclass) status_date date NULL assign_to text NULL alert boolean NULL DEFAULT false extension_time boolean NULL DEFAULT false field_boy_assign text NULL referral_code text NULL complete_application_status boolean NULL DEFAULT false latest_activity_date timestamp without time zone NULL current_obligation text NULL nbfc_sent_status boolean NULL DEFAULT false loan_sub_status text NULL assigned_date timestamp without time zone NULL last_assigned character varying NULL incomplete_mark_status boolean NULL DEFAULT false ambassador_id text NULL patient_name text NULL relationship_with_patient text NULL patient_email_id text NULL patient_phone_number text NULL device_type text NULL loan_form_status text NULL quality_check boolean NULL DEFAULT false status_logs text NULL policy_id text NULL bureau_type text NULL do_shared character varying(255) NULL name_verification_status character varying(50) NULL DEFAULT NULL::character varying name_verification_date timestamp without time zone NULL name_verification_manual_override boolean NULL DEFAULT false name_verification_verified_by character varying(255) NULL DEFAULT NULL::character varying name_verification_remarks text NULL is_complete boolean NULL DEFAULT false surepass_score character varying(255) NULL experian_score character varying(255) NULL surepass_type character varying(255) NULL experian_type character varying(255) NULL do_timestamp timestamp without time zone NULL approval_source character varying(50) NULL do_url text NULL INDEXES: idx_user_to_loan_loan_id: CREATE INDEX idx_user_to_loan_loan_id ON public.user_to_loan USING btree (loan_id) idx_user_to_loan_loan_id_name_verification: CREATE INDEX idx_user_to_loan_loan_id_name_verification ON public.user_to_loan USING btree (loan_id, name_verification_status) idx_user_to_loan_loan_id_status: CREATE INDEX idx_user_to_loan_loan_id_status ON public.user_to_loan USING btree (loan_id, loan_status) idx_user_to_loan_loan_status: CREATE INDEX idx_user_to_loan_loan_status ON public.user_to_loan USING btree (loan_id, loan_status) idx_user_to_loan_name_verification_status: CREATE INDEX idx_user_to_loan_name_verification_status ON public.user_to_loan USING btree (name_verification_status) idx_user_to_loan_status: CREATE INDEX idx_user_to_loan_status ON public.user_to_loan USING btree (loan_status) idx_user_to_loan_status_complete: CREATE INDEX idx_user_to_loan_status_complete ON public.user_to_loan USING btree (loan_status, is_complete) WHERE (loan_status = '105'::text) idx_user_to_loan_user_id: CREATE INDEX idx_user_to_loan_user_id ON public.user_to_loan USING btree (user_id) idx_utl_loan_id_name_verification: CREATE INDEX idx_utl_loan_id_name_verification ON public.user_to_loan USING btree (loan_id, name_verification_status) idx_utl_loan_id_status: CREATE INDEX idx_utl_loan_id_status ON public.user_to_loan USING btree (loan_id, loan_status) idx_user_to_loan_loan_id_unique: CREATE UNIQUE INDEX idx_user_to_loan_loan_id_unique ON public.user_to_loan USING btree (loan_id) TABLE: userdata (4 columns) ------------------------------------------------------------ id integer NOT NULL mobilenumber text NOT NULL email text NOT NULL name text NOT NULL INDEXES: userdata_email_key: CREATE UNIQUE INDEX userdata_email_key ON public.userdata USING btree (email) userdata_pkey: CREATE UNIQUE INDEX userdata_pkey ON public.userdata USING btree (id) TABLE: whatsapp_log (7 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('whatsapp_log_id_seq'::regclass) identifier character varying(255) NULL identifier_type character varying(255) NULL template_name character varying(255) NULL message text NULL send_to character varying(255) NULL send_date timestamp without time zone NULL INDEXES: whatsapp_log_pkey: CREATE UNIQUE INDEX whatsapp_log_pkey ON public.whatsapp_log USING btree (id) TABLE: yashik_debit_details (15 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('yashik_debit_details_id_seq'::regclass) loan_id character varying(255) NOT NULL emi_no integer NULL amount integer NULL razorpay_customer_id character varying(255) NULL razorpay_token_id character varying(255) NULL razorpay_payment_id character varying(255) NULL status character varying(50) NULL razorpay_status character varying(50) NULL error_message text NULL razorpay_response text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL razorpay_order_id character varying(255) NULL action_by character varying(100) NULL INDEXES: yashik_debit_details_pkey: CREATE UNIQUE INDEX yashik_debit_details_pkey ON public.yashik_debit_details USING btree (id) TABLE: yashik_details (18 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('yashik_details_id_seq'::regclass) loan_id character varying(255) NULL loan_amount character varying(255) NULL product_id character varying(255) NULL product_name character varying(255) NULL total_emi integer NULL advance_emi integer NULL processing_fees_including_gst_rate double precision NULL processing_fees_including_gst_inr double precision NULL subvention_rate_including_gst_rate double precision NULL subvention_rate_including_gst_inr double precision NULL disburse_amount double precision NULL utr_no character varying(255) NULL disburse_date timestamp without time zone NULL foreclosed boolean NULL DEFAULT false closed boolean NULL DEFAULT false added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: yashik_details_pkey: CREATE UNIQUE INDEX yashik_details_pkey ON public.yashik_details USING btree (id) TABLE: yashik_payment_links (19 columns) ------------------------------------------------------------ id bigint NOT NULL DEFAULT nextval('yashik_payment_links_id_seq'::regclass) loan_id character varying(64) NOT NULL user_id character varying(64) NULL emi_no integer NOT NULL DEFAULT 0 payment_link_id character varying(128) NULL short_url character varying(512) NULL status character varying(32) NULL amount integer NULL currency character varying(8) NULL payment_id character varying(128) NULL reference_id character varying(128) NULL customer_name character varying(255) NULL customer_contact character varying(32) NULL customer_email character varying(255) NULL created_at timestamp without time zone NULL paid_date timestamp without time zone NULL settlement_detail text NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: yashik_payment_links_pkey: CREATE UNIQUE INDEX yashik_payment_links_pkey ON public.yashik_payment_links USING btree (id) TABLE: yashik_repayment (15 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('yashik_repayment_id_seq'::regclass) loan_id character varying(255) NULL emi_no integer NULL due_date timestamp without time zone NULL emi_amount double precision NULL principal double precision NULL paid boolean NULL DEFAULT false interest double precision NULL balance double precision NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL debit_status character varying(20) NULL DEFAULT 'PENDING'::character varying paid_date timestamp without time zone NULL paid_amount double precision NULL DEFAULT 0 remaining_amount double precision NULL DEFAULT 0 INDEXES: yashik_repayment_pkey: CREATE UNIQUE INDEX yashik_repayment_pkey ON public.yashik_repayment USING btree (id) TABLE: yashik_repayment_adjustment (18 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('yashik_repayment_adjustment_id_seq'::regclass) loan_id character varying(255) NOT NULL emi_no integer NOT NULL adjustment_type character varying(100) NULL amount integer NULL DEFAULT 0 paid_amount integer NULL DEFAULT 0 waived_amount integer NULL DEFAULT 0 remaining_amount integer NULL DEFAULT 0 status character varying(50) NULL source character varying(100) NULL source_ref_id character varying(255) NULL reason text NULL waived_reason text NULL waived_by character varying(255) NULL paid_on timestamp without time zone NULL waived_on timestamp without time zone NULL added_on timestamp without time zone NULL updated_on timestamp without time zone NULL INDEXES: yashik_repayment_adjustment_pkey: CREATE UNIQUE INDEX yashik_repayment_adjustment_pkey ON public.yashik_repayment_adjustment USING btree (id) TABLE: zype_orders (22 columns) ------------------------------------------------------------ id integer NOT NULL DEFAULT nextval('zype_orders_id_seq'::regclass) loan_id character varying(255) NOT NULL sso_key character varying(255) NULL redirect_url text NULL webhook_status integer NULL loan_status character varying(255) NULL webhook_amount numeric NULL added_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP updated_on timestamp without time zone NULL DEFAULT CURRENT_TIMESTAMP offer integer NULL short_approved boolean NULL DEFAULT false kyc_status character varying(255) NULL offer_status character varying(255) NULL lead_status text NULL loan_lead_id character varying(255) NULL final_offer integer NULL offer_generated_mode character varying(255) NULL max_l1_offer_amount double precision NULL DEFAULT 0.0 order_amount double precision NULL DEFAULT 0.0 minimum_offer_amount integer NULL DEFAULT 0 bank_statement_required boolean NULL zype_loan_id character varying(255) NULL INDEXES: zype_orders_pkey: CREATE UNIQUE INDEX zype_orders_pkey ON public.zype_orders USING btree (id)