cloud-ide-lms-model 1.0.355 → 1.0.357
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/model/admission/admission_fee_snapshot.d.ts +128 -0
- package/lib/model/admission/admission_fee_snapshot.js +9 -0
- package/lib/model/admission/index.d.ts +1 -0
- package/lib/model/admission/index.js +1 -0
- package/lib/model/auth/auth_user_mst.js +126 -0
- package/lib/schema/admission/admission_application_main.d.ts +1 -0
- package/lib/schema/admission/admission_fee_snapshot.d.ts +65 -0
- package/lib/schema/admission/admission_fee_snapshot.js +7 -0
- package/lib/schema/admission/index.d.ts +1 -0
- package/lib/schema/admission/index.js +1 -0
- package/lib/schema/collection_names.d.ts +1 -0
- package/lib/schema/collection_names.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admission Fee Snapshot Model - Response Types
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Response type definitions with populated references for fee snapshots
|
|
5
|
+
* Stores complete fee structure snapshot at the time of admission confirmation/conversion
|
|
6
|
+
* Prefix: adfsn_ (admission fee snapshot)
|
|
7
|
+
*/
|
|
8
|
+
import { AdmissionFeeSnapshot } from "../../schema/admission/admission_fee_snapshot";
|
|
9
|
+
import { controllerResponse } from "../../utilities";
|
|
10
|
+
/**
|
|
11
|
+
* Response type with populated references
|
|
12
|
+
* Using Omit to avoid type conflicts when overriding properties
|
|
13
|
+
*/
|
|
14
|
+
type AdmissionAdmissionFeeSnapshot = Omit<AdmissionFeeSnapshot, 'adfsn_admission_id_admap' | 'adfsn_user_id_auth' | 'adfsn_entity_id_syen' | 'adfsn_academic_year_id_acayr' | 'adfsn_class_program_id_acacpm' | 'adfsn_class_program_term_id_acapt' | 'adfsn_class_program_branch_id_acabrn' | 'adfsn_section_id_acapts' | 'adfsn_fee_structure_id_feest' | 'adfsn_currency_id_sycr' | 'adfsn_created_by_user' | 'adfsn_modified_by_user'> & {
|
|
15
|
+
adfsn_admission_id_admap?: {
|
|
16
|
+
_id: string;
|
|
17
|
+
admap_application_number?: string;
|
|
18
|
+
admap_first_name?: string;
|
|
19
|
+
admap_last_name?: string;
|
|
20
|
+
} | string;
|
|
21
|
+
adfsn_user_id_auth?: {
|
|
22
|
+
_id: string;
|
|
23
|
+
user_first_name?: string;
|
|
24
|
+
user_last_name?: string;
|
|
25
|
+
user_fullname?: string;
|
|
26
|
+
user_email?: string;
|
|
27
|
+
} | string;
|
|
28
|
+
adfsn_entity_id_syen?: {
|
|
29
|
+
_id: string;
|
|
30
|
+
syen_name?: string;
|
|
31
|
+
syen_entity_code?: string;
|
|
32
|
+
} | string;
|
|
33
|
+
adfsn_academic_year_id_acayr?: {
|
|
34
|
+
_id: string;
|
|
35
|
+
acayr_name?: string;
|
|
36
|
+
acayr_code?: string;
|
|
37
|
+
acayr_title?: string;
|
|
38
|
+
} | string;
|
|
39
|
+
adfsn_class_program_id_acacpm?: {
|
|
40
|
+
_id: string;
|
|
41
|
+
acacpm_alise_title?: string;
|
|
42
|
+
acacpm_name?: string;
|
|
43
|
+
acacpm_title?: string;
|
|
44
|
+
} | string;
|
|
45
|
+
adfsn_class_program_term_id_acapt?: {
|
|
46
|
+
_id: string;
|
|
47
|
+
acapt_name?: string;
|
|
48
|
+
acapt_code?: string;
|
|
49
|
+
} | string | null;
|
|
50
|
+
adfsn_class_program_branch_id_acabrn?: {
|
|
51
|
+
_id: string;
|
|
52
|
+
acabrn_name?: string;
|
|
53
|
+
acabrn_code?: string;
|
|
54
|
+
} | string | null;
|
|
55
|
+
adfsn_section_id_acapts?: {
|
|
56
|
+
_id: string;
|
|
57
|
+
acapts_name?: string;
|
|
58
|
+
acapts_code?: string;
|
|
59
|
+
} | string | null;
|
|
60
|
+
adfsn_fee_structure_id_feest?: {
|
|
61
|
+
_id: string;
|
|
62
|
+
feest_structure_name?: string;
|
|
63
|
+
feest_structure_code?: string;
|
|
64
|
+
} | string | null;
|
|
65
|
+
adfsn_currency_id_sycr?: {
|
|
66
|
+
_id: string;
|
|
67
|
+
syic_currency_code?: string;
|
|
68
|
+
syic_currency_name?: string;
|
|
69
|
+
syic_currency_symbol?: string;
|
|
70
|
+
} | string | null;
|
|
71
|
+
adfsn_created_by_user?: {
|
|
72
|
+
_id: string;
|
|
73
|
+
user_first_name?: string;
|
|
74
|
+
user_last_name?: string;
|
|
75
|
+
user_fullname?: string;
|
|
76
|
+
} | string | null;
|
|
77
|
+
adfsn_modified_by_user?: {
|
|
78
|
+
_id: string;
|
|
79
|
+
user_first_name?: string;
|
|
80
|
+
user_last_name?: string;
|
|
81
|
+
user_fullname?: string;
|
|
82
|
+
} | string | null;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Controller response type for list operations
|
|
86
|
+
*/
|
|
87
|
+
interface admissionFeeSnapshotControllerResponse extends controllerResponse {
|
|
88
|
+
data?: AdmissionAdmissionFeeSnapshot[] | AdmissionAdmissionFeeSnapshot | null;
|
|
89
|
+
totalDocument?: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Controller response for single operations
|
|
93
|
+
*/
|
|
94
|
+
interface AdmissionFeeSnapshotResponse extends AdmissionAdmissionFeeSnapshot {
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get by ID payload
|
|
98
|
+
*/
|
|
99
|
+
interface MAdmissionFeeSnapshotGetByIdPayload {
|
|
100
|
+
adfsn_id?: string;
|
|
101
|
+
adfsn_admission_id_admap?: string;
|
|
102
|
+
adfsn_student_id?: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* List payload
|
|
106
|
+
*/
|
|
107
|
+
interface MAdmissionFeeSnapshotListPayload {
|
|
108
|
+
adfsn_admission_id_admap?: string;
|
|
109
|
+
adfsn_student_id?: string;
|
|
110
|
+
adfsn_entity_id_syen?: string;
|
|
111
|
+
adfsn_academic_year_id_acayr?: string;
|
|
112
|
+
adfsn_class_program_id_acacpm?: string;
|
|
113
|
+
adfsn_applied_at_stage?: 'CONFIRMATION' | 'CONVERSION';
|
|
114
|
+
adfsn_isactive?: boolean;
|
|
115
|
+
pageIndex?: number;
|
|
116
|
+
pageSize?: number;
|
|
117
|
+
query?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Insert/Update payload
|
|
121
|
+
*/
|
|
122
|
+
interface MAdmissionFeeSnapshotInsertUpdatePayload extends AdmissionFeeSnapshot {
|
|
123
|
+
adfsn_id?: string;
|
|
124
|
+
}
|
|
125
|
+
export { AdmissionAdmissionFeeSnapshot, // Main response type
|
|
126
|
+
AdmissionFeeSnapshotResponse, // Single response
|
|
127
|
+
admissionFeeSnapshotControllerResponse, // List response
|
|
128
|
+
MAdmissionFeeSnapshotGetByIdPayload, MAdmissionFeeSnapshotListPayload, MAdmissionFeeSnapshotInsertUpdatePayload };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Admission Fee Snapshot Model - Response Types
|
|
4
|
+
*
|
|
5
|
+
* Purpose: Response type definitions with populated references for fee snapshots
|
|
6
|
+
* Stores complete fee structure snapshot at the time of admission confirmation/conversion
|
|
7
|
+
* Prefix: adfsn_ (admission fee snapshot)
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -19,3 +19,4 @@ __exportStar(require("./admission_family_members"), exports);
|
|
|
19
19
|
__exportStar(require("./admission_application_main"), exports);
|
|
20
20
|
__exportStar(require("./admission_elective_detail"), exports);
|
|
21
21
|
__exportStar(require("./admission_confirmation_types"), exports);
|
|
22
|
+
__exportStar(require("./admission_fee_snapshot"), exports);
|
|
@@ -46,6 +46,132 @@ class AuthUserMstCreatePayload {
|
|
|
46
46
|
}
|
|
47
47
|
Validate() {
|
|
48
48
|
let errorLogger = {};
|
|
49
|
+
// Validate required fields in auth_user_mst
|
|
50
|
+
if (!this.auth_user_mst) {
|
|
51
|
+
errorLogger.auth_user_mst = 'User data (auth_user_mst) is required';
|
|
52
|
+
return errorLogger;
|
|
53
|
+
}
|
|
54
|
+
// Validate user_username is required (min 5, max 20 characters)
|
|
55
|
+
if (!this.auth_user_mst.user_username || !this.auth_user_mst.user_username.trim()) {
|
|
56
|
+
errorLogger.auth_user_mst = 'Username (user_username) is required';
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
const username = this.auth_user_mst.user_username.trim();
|
|
60
|
+
if (username.length < 5) {
|
|
61
|
+
errorLogger.auth_user_mst = 'Username must be at least 5 characters long';
|
|
62
|
+
}
|
|
63
|
+
else if (username.length > 20) {
|
|
64
|
+
errorLogger.auth_user_mst = 'Username must not exceed 20 characters';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Validate user_fullname is required (min 8, max 80 characters)
|
|
68
|
+
if (!this.auth_user_mst.user_fullname || !this.auth_user_mst.user_fullname.trim()) {
|
|
69
|
+
if (!errorLogger.auth_user_mst) {
|
|
70
|
+
errorLogger.auth_user_mst = 'Full name (user_fullname) is required';
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
errorLogger.auth_user_mst += '; Full name (user_fullname) is required';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const fullname = this.auth_user_mst.user_fullname.trim();
|
|
78
|
+
if (fullname.length < 8) {
|
|
79
|
+
if (!errorLogger.auth_user_mst) {
|
|
80
|
+
errorLogger.auth_user_mst = 'Full name must be at least 8 characters long';
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
errorLogger.auth_user_mst += '; Full name must be at least 8 characters long';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else if (fullname.length > 80) {
|
|
87
|
+
if (!errorLogger.auth_user_mst) {
|
|
88
|
+
errorLogger.auth_user_mst = 'Full name must not exceed 80 characters';
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
errorLogger.auth_user_mst += '; Full name must not exceed 80 characters';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Validate user_emailid is required and valid format (min 8, max 50 characters)
|
|
96
|
+
if (!this.auth_user_mst.user_emailid || !this.auth_user_mst.user_emailid.trim()) {
|
|
97
|
+
if (!errorLogger.auth_user_mst) {
|
|
98
|
+
errorLogger.auth_user_mst = 'Email (user_emailid) is required';
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
errorLogger.auth_user_mst += '; Email (user_emailid) is required';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
const email = this.auth_user_mst.user_emailid.trim();
|
|
106
|
+
if (email.length < 8) {
|
|
107
|
+
if (!errorLogger.auth_user_mst) {
|
|
108
|
+
errorLogger.auth_user_mst = 'Email must be at least 8 characters long';
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
errorLogger.auth_user_mst += '; Email must be at least 8 characters long';
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else if (email.length > 50) {
|
|
115
|
+
if (!errorLogger.auth_user_mst) {
|
|
116
|
+
errorLogger.auth_user_mst = 'Email must not exceed 50 characters';
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
errorLogger.auth_user_mst += '; Email must not exceed 50 characters';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
// Basic email format validation
|
|
124
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
125
|
+
if (!emailRegex.test(email)) {
|
|
126
|
+
if (!errorLogger.auth_user_mst) {
|
|
127
|
+
errorLogger.auth_user_mst = 'Email format is invalid';
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
errorLogger.auth_user_mst += '; Email format is invalid';
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// Validate user_firstname if provided (min 3, max 20 characters)
|
|
136
|
+
if (this.auth_user_mst.user_firstname && this.auth_user_mst.user_firstname.trim()) {
|
|
137
|
+
const firstname = this.auth_user_mst.user_firstname.trim();
|
|
138
|
+
if (firstname.length < 3) {
|
|
139
|
+
if (!errorLogger.auth_user_mst) {
|
|
140
|
+
errorLogger.auth_user_mst = 'First name must be at least 3 characters long';
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
errorLogger.auth_user_mst += '; First name must be at least 3 characters long';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else if (firstname.length > 20) {
|
|
147
|
+
if (!errorLogger.auth_user_mst) {
|
|
148
|
+
errorLogger.auth_user_mst = 'First name must not exceed 20 characters';
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
errorLogger.auth_user_mst += '; First name must not exceed 20 characters';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// Validate user_lastname if provided (min 3, max 20 characters)
|
|
156
|
+
if (this.auth_user_mst.user_lastname && this.auth_user_mst.user_lastname.trim()) {
|
|
157
|
+
const lastname = this.auth_user_mst.user_lastname.trim();
|
|
158
|
+
if (lastname.length < 3) {
|
|
159
|
+
if (!errorLogger.auth_user_mst) {
|
|
160
|
+
errorLogger.auth_user_mst = 'Last name must be at least 3 characters long';
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
errorLogger.auth_user_mst += '; Last name must be at least 3 characters long';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else if (lastname.length > 20) {
|
|
167
|
+
if (!errorLogger.auth_user_mst) {
|
|
168
|
+
errorLogger.auth_user_mst = 'Last name must not exceed 20 characters';
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
errorLogger.auth_user_mst += '; Last name must not exceed 20 characters';
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
49
175
|
return errorLogger;
|
|
50
176
|
}
|
|
51
177
|
}
|
|
@@ -190,6 +190,7 @@ declare class AdmissionApplicationMain {
|
|
|
190
190
|
admap_confirmed_at?: Date;
|
|
191
191
|
admap_confirmed_by_user?: string;
|
|
192
192
|
admap_confirmation_remarks?: string;
|
|
193
|
+
admap_islocked?: boolean;
|
|
193
194
|
admap_entity_id_syen?: string;
|
|
194
195
|
admap_program_id_sygms?: string;
|
|
195
196
|
admap_created_by_user?: string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admission Fee Snapshot Interface
|
|
3
|
+
* Stores complete fee structure snapshot at the time of admission confirmation/conversion
|
|
4
|
+
*/
|
|
5
|
+
export interface AdmissionFeeSnapshot {
|
|
6
|
+
_id?: string;
|
|
7
|
+
adfsn_snapshot_number?: string;
|
|
8
|
+
adfsn_admission_id_admap?: string;
|
|
9
|
+
adfsn_student_id?: string;
|
|
10
|
+
adfsn_user_id_auth?: string;
|
|
11
|
+
adfsn_entity_id_syen?: string;
|
|
12
|
+
adfsn_academic_year_id_acayr?: string;
|
|
13
|
+
adfsn_class_program_id_acacpm?: string;
|
|
14
|
+
adfsn_class_program_term_id_acapt?: string;
|
|
15
|
+
adfsn_class_program_branch_id_acabrn?: string;
|
|
16
|
+
adfsn_section_id_acapts?: string;
|
|
17
|
+
adfsn_fee_structure_id_feest?: string;
|
|
18
|
+
adfsn_snapshot_date?: Date;
|
|
19
|
+
adfsn_applied_at_stage?: 'CONFIRMATION' | 'CONVERSION';
|
|
20
|
+
adfsn_fee_items?: Array<{
|
|
21
|
+
feesi_original_item_id?: string;
|
|
22
|
+
feesi_category_id_sygms?: string;
|
|
23
|
+
feesi_category_name?: string;
|
|
24
|
+
feesi_item_code?: string;
|
|
25
|
+
feesi_item_name?: string;
|
|
26
|
+
feesi_description?: string;
|
|
27
|
+
feesi_original_amount?: number;
|
|
28
|
+
feesi_applied_amount?: number;
|
|
29
|
+
feesi_discount_type?: 'PERCENTAGE' | 'FIXED_AMOUNT' | null;
|
|
30
|
+
feesi_discount_value?: number;
|
|
31
|
+
feesi_discount_amount?: number;
|
|
32
|
+
feesi_discount_reason_id_sygms?: string;
|
|
33
|
+
feesi_scholarship_type_id_sygms?: string;
|
|
34
|
+
feesi_scholarship_category?: 'FULL' | 'PARTIAL' | null;
|
|
35
|
+
feesi_scholarship_percentage?: number;
|
|
36
|
+
feesi_scholarship_amount?: number;
|
|
37
|
+
feesi_final_amount?: number;
|
|
38
|
+
feesi_tax_applicable?: boolean;
|
|
39
|
+
feesi_tax_percentage?: number;
|
|
40
|
+
feesi_tax_amount?: number;
|
|
41
|
+
feesi_total_amount?: number;
|
|
42
|
+
feesi_is_mandatory?: boolean;
|
|
43
|
+
feesi_is_refundable?: boolean;
|
|
44
|
+
feesi_is_installment_allowed?: boolean;
|
|
45
|
+
feesi_installment_count?: number;
|
|
46
|
+
feesi_due_date_offset_days?: number;
|
|
47
|
+
feesi_collection_start_offset_days?: number;
|
|
48
|
+
feesi_collection_end_offset_days?: number;
|
|
49
|
+
feesi_display_order?: number;
|
|
50
|
+
feesi_notes?: string;
|
|
51
|
+
}>;
|
|
52
|
+
adfsn_total_original_amount?: number;
|
|
53
|
+
adfsn_total_discount_amount?: number;
|
|
54
|
+
adfsn_total_scholarship_amount?: number;
|
|
55
|
+
adfsn_total_tax_amount?: number;
|
|
56
|
+
adfsn_total_final_amount?: number;
|
|
57
|
+
adfsn_currency_id_sycr?: string;
|
|
58
|
+
adfsn_currency_code?: string;
|
|
59
|
+
adfsn_notes?: string;
|
|
60
|
+
adfsn_created_by_user?: string;
|
|
61
|
+
adfsn_modified_by_user?: string;
|
|
62
|
+
adfsn_isactive?: boolean;
|
|
63
|
+
adfsn_created_date?: Date;
|
|
64
|
+
adfsn_modified_date?: Date;
|
|
65
|
+
}
|
|
@@ -20,3 +20,4 @@ __exportStar(require("./admission_status_history"), exports);
|
|
|
20
20
|
__exportStar(require("./admission_document_uploads"), exports);
|
|
21
21
|
__exportStar(require("./admission_contact_addresses"), exports);
|
|
22
22
|
__exportStar(require("./admission_family_members"), exports);
|
|
23
|
+
__exportStar(require("./admission_fee_snapshot"), exports);
|
|
@@ -67,6 +67,7 @@ declare const COLLECTIONS: {
|
|
|
67
67
|
fdsk_lead_scheduling: string;
|
|
68
68
|
fdsk_leads: string;
|
|
69
69
|
admission_application_main: string;
|
|
70
|
+
admission_fee_snapshot: string;
|
|
70
71
|
admission_elective_detail: string;
|
|
71
72
|
admission_status_history: string;
|
|
72
73
|
admission_document_uploads: string;
|
|
@@ -77,6 +77,7 @@ const COLLECTIONS = {
|
|
|
77
77
|
fdsk_leads: "fdsk_leads",
|
|
78
78
|
// A - Admission Collections
|
|
79
79
|
admission_application_main: "admission_application_main",
|
|
80
|
+
admission_fee_snapshot: "admission_fee_snapshot",
|
|
80
81
|
admission_elective_detail: "admission_elective_detail",
|
|
81
82
|
admission_status_history: "admission_status_history",
|
|
82
83
|
admission_document_uploads: "admission_document_uploads",
|