feat: update savings product backend changes

This commit is contained in:
Nitesh Yadav
2026-04-28 13:12:27 +05:30
parent 72adbf6305
commit dc4a720ae2
16 changed files with 17339 additions and 35 deletions
@@ -32,4 +32,5 @@
<include file="parts/2007_add_interest_calculation_type_option.xml" relativeToChangelogFile="true" />
<include file="parts/2008_add_other_gl_mappings_to_savings_product.xml" relativeToChangelogFile="true" />
<include file="parts/2009_add_gl_account_id_to_savings_product.xml" relativeToChangelogFile="true" />
<include file="parts/2010_add_savings_account_cbs_fields.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. This file is licensed under the Apache License, Version 2.0.
-->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
<!-- CBS extended fields on m_savings_account -->
<changeSet author="fineract" id="2010-add-savings-account-cbs-fields">
<addColumn tableName="m_savings_account">
<column name="cbs_account_type" type="VARCHAR(100)">
<constraints nullable="true"/>
</column>
<column name="customer_segment" type="VARCHAR(100)">
<constraints nullable="true"/>
</column>
<column name="account_status" type="VARCHAR(50)">
<constraints nullable="true"/>
</column>
<column name="mode_of_operation" type="VARCHAR(50)">
<constraints nullable="true"/>
</column>
<column name="special_category" type="VARCHAR(100)">
<constraints nullable="true"/>
</column>
<column name="weaker_section" type="VARCHAR(100)">
<constraints nullable="true"/>
</column>
<column name="guardian_name" type="VARCHAR(200)">
<constraints nullable="true"/>
</column>
<column name="guardian_cif_number" type="VARCHAR(50)">
<constraints nullable="true"/>
</column>
<column name="guardian_relationship" type="VARCHAR(100)">
<constraints nullable="true"/>
</column>
<column name="minor_date_of_birth" type="DATE">
<constraints nullable="true"/>
</column>
<column name="guardian_client_id" type="BIGINT">
<constraints nullable="true"/>
</column>
<column name="introducer_client_id" type="BIGINT">
<constraints nullable="true"/>
</column>
<column name="introducer_name" type="VARCHAR(200)">
<constraints nullable="true"/>
</column>
<column name="introducer_cif_number" type="VARCHAR(50)">
<constraints nullable="true"/>
</column>
<column name="nominee_data" type="TEXT">
<constraints nullable="true"/>
</column>
<column name="linked_account_id" type="BIGINT">
<constraints nullable="true"/>
</column>
<column name="linked_account_type" type="VARCHAR(20)">
<constraints nullable="true"/>
</column>
<column name="linked_account_no" type="VARCHAR(50)">
<constraints nullable="true"/>
</column>
</addColumn>
</changeSet>
<!-- Facility config table for savings accounts -->
<changeSet author="fineract" id="2010-create-savings-account-facility-config">
<createTable tableName="m_savings_account_facility_config">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false" unique="true"
foreignKeyName="fk_sa_facility_config_account"
references="m_savings_account(id)"/>
</column>
<column name="atm_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="atm_withdrawal_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="upi_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="pos_transactions_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="cheque_book" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="imps_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="sms_alerts" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="bbps_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="insurance_cover" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="bepg_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="neft_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="rtgs_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="inter_bank_total_cap_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="withdrawal_facility" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="deposit_facility_kyc" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="virtual_debit_card" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="created_date" type="DATETIME">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<!-- Joint holders table for savings accounts -->
<changeSet author="fineract" id="2010-create-savings-account-joint-holders">
<createTable tableName="m_savings_account_joint_holders">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="savings_account_id" type="BIGINT">
<constraints nullable="false"
foreignKeyName="fk_sa_joint_holder_account"
references="m_savings_account(id)"/>
</column>
<column name="client_id" type="BIGINT">
<constraints nullable="true"/>
</column>
<column name="cif_number" type="VARCHAR(50)">
<constraints nullable="true"/>
</column>
<column name="display_name" type="VARCHAR(200)">
<constraints nullable="true"/>
</column>
<column name="share_percentage" type="DECIMAL(5,2)">
<constraints nullable="true"/>
</column>
<column name="signing_authority" type="VARCHAR(100)">
<constraints nullable="true"/>
</column>
<column name="role" type="VARCHAR(100)">
<constraints nullable="true"/>
</column>
<column name="is_primary" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>
@@ -112,6 +112,8 @@
<class>org.apache.fineract.portfolio.savings.domain.SavingsProductDepositLimitKyc</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsProductFacilityConfig</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsProductFacilityLimit</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountFacilityConfig</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountJointHolder</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>