import { MTableQueries } from "../../common-types/common"; import { FeeStructure, FeeStructureBase, FeeStructureItem } from "../../schema"; import { controllerResponse } from "../../utilities"; import { AcaAcademicYear } from "../../schema/academics/aca_academic_year"; import { CoreSystemEntity } from "../../schema/core/core_system_entity"; import { AcaClassProgramMasterBase } from "../../schema/academics/aca_class_program_master"; import { AcaClassPrgBranchBase } from "../../schema/academics/aca_class_prg_branch"; import { AcaClassProgramTermBase } from "../../schema/academics/aca_class_program_term"; import { AcaPrgTrmSectionBase } from "../../schema/academics/aca_prg_trm_section"; import { ICoreSygms } from "../../schema/core/core_general_master"; import { AuthUserMst } from "../../schema/auth/auth_user_mst"; type IFeeStructureErrorLogger = { [key in keyof MFeeStructure]: string; }; type IFeeStructureGetByIdErrorLogger = { [key in keyof MFeeStructureGetByIdPayload]: string; }; type IFeeStructureDeleteErrorLogger = { [key in keyof MFeeStructureDeletePayload]: string; }; type IFeeStructureInsertUpdateErrorLogger = { [key in keyof MFeeStructureInsertUpdatePayload]: string; }; type IFeeStructureSaveUpdateErrorLogger = { [key: string]: string; }; type IFeeStructureToggleStatusErrorLogger = { [key in keyof MFeeStructureToggleStatusPayload]: string; }; /** * Fee Structure Query Model * Extends MTableQueries for pagination/querying and includes FeeStructure properties for filtering */ declare class MFeeStructure extends MTableQueries { fees_academic_year_id_acayr?: string; fees_entity_id_syen?: string; fees_class_program_id_acacpm?: string; fees_class_program_branch_id_acabrn?: string; fees_class_program_term_id_acapt?: string; fees_program_term_section_id_acapts?: string; fees_student_category_id_sygms?: string; fees_is_active?: boolean; constructor(init: MFeeStructure); Validate?(): Partial; } declare class MFeeStructureGetByIdPayload { fees_id?: string; constructor(init: MFeeStructureGetByIdPayload); Validate?(): Partial; } declare class MFeeStructureDeletePayload { fees_id?: string; constructor(init: MFeeStructureDeletePayload); Validate?(): Partial; } declare class MFeeStructureToggleStatusPayload { fees_id?: string; constructor(init: MFeeStructureToggleStatusPayload); Validate?(): Partial; } declare class MFeeStructureInsertUpdatePayload extends FeeStructure { constructor(init: FeeStructure); Validate?(): Partial; } /** * Fee Structure Save/Update Payload * Similar to CoreSystemEntitySaveUpdatePayload, uses separate keys for structure and items */ declare class FeeStructureSaveUpdatePayload { fee_structure?: FeeStructure; fee_structure_items?: FeeStructureItem[]; constructor(init: FeeStructureSaveUpdatePayload); Validate?(): Partial; } /** * Populated Fee Structure Response * Contains populated references for all related entities */ interface FeeStructureResponse extends FeeStructureBase { fees_academic_year_id_acayr?: AcaAcademicYear | string; fees_entity_id_syen?: CoreSystemEntity | string; fees_class_program_id_acacpm?: AcaClassProgramMasterBase | string; fees_class_program_branch_id_acabrn?: AcaClassPrgBranchBase | string; fees_class_program_term_id_acapt?: AcaClassProgramTermBase | string; fees_program_term_section_id_acapts?: AcaPrgTrmSectionBase | string; fees_student_category_id_sygms?: ICoreSygms | string; fees_created_by_user?: AuthUserMst | string; } /** * Fee Discount Data interface */ export interface FeeDiscountData { discount_type: 'PERCENTAGE' | 'FIXED_AMOUNT'; discount_value: number; discount_amount: number; discount_reason_id?: string; discount_reason_title?: string; valid_from?: Date; valid_to?: Date; notes?: string; } /** * Fee Scholarship Data interface */ export interface FeeScholarshipData { scholarship_type_id?: string; scholarship_type_title?: string; scholarship_category: 'FULL' | 'PARTIAL'; scholarship_percentage?: number; scholarship_amount: number; valid_from?: Date; valid_to?: Date; notes?: string; } /** * Applicable Fee Item type */ export type ApplicableFeeItem = FeeStructureResponse & { fees_structure_name?: string; fees_category_name?: string; fees_total_amount?: number; fees_amount?: number; fees_structure_id?: string; _feeItemData?: FeeStructureItem | any; discount?: number; scholarship?: number; final_amount?: number; is_assigned?: boolean; fees_category_id_sygms?: string | { _id: string; sygms_title?: string; sygms_code?: string; }; feesi_item_name?: string; discountData?: FeeDiscountData; scholarshipData?: FeeScholarshipData; }; interface feeStructureControllerResponse extends controllerResponse { data?: FeeStructureResponse[]; } /** * Fee Structure By ID Response * Includes both structure and items for complete data */ interface FeeStructureByIdResponse { fee_structure?: FeeStructureResponse; fee_structure_items?: FeeStructureItem[]; } interface feeStructureByIdControllerResponse extends controllerResponse { data?: FeeStructureByIdResponse | FeeStructureResponse; } interface feeStructureInsertUpdateControllerResponse extends controllerResponse { data?: FeeStructureResponse; } interface feeStructureDeleteControllerResponse extends controllerResponse { data?: boolean; } interface feeStructureToggleStatusControllerResponse extends controllerResponse { data?: boolean; } export { IFeeStructureErrorLogger, IFeeStructureGetByIdErrorLogger, IFeeStructureDeleteErrorLogger, IFeeStructureInsertUpdateErrorLogger, IFeeStructureSaveUpdateErrorLogger, IFeeStructureToggleStatusErrorLogger, MFeeStructure, MFeeStructureGetByIdPayload, MFeeStructureDeletePayload, MFeeStructureInsertUpdatePayload, FeeStructureSaveUpdatePayload, MFeeStructureToggleStatusPayload, FeeStructureResponse, FeeStructureByIdResponse, feeStructureControllerResponse, feeStructureByIdControllerResponse, feeStructureInsertUpdateControllerResponse, feeStructureDeleteControllerResponse, feeStructureToggleStatusControllerResponse };