@platform-modules/foreign-ministry 1.3.252 → 1.3.254

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.
Files changed (46) hide show
  1. package/.env +12 -5
  2. package/dist/data-source.js +10 -0
  3. package/dist/index.d.ts +5 -0
  4. package/dist/index.js +6 -0
  5. package/dist/models/MediaApprovalModel.d.ts +2 -0
  6. package/dist/models/MediaApprovalModel.js +4 -0
  7. package/dist/models/RepatriationCitizensApprovalModel.d.ts +22 -0
  8. package/dist/models/RepatriationCitizensApprovalModel.js +84 -0
  9. package/dist/models/RepatriationCitizensAttachmentModel.d.ts +11 -0
  10. package/dist/models/RepatriationCitizensAttachmentModel.js +52 -0
  11. package/dist/models/RepatriationCitizensChatModel.d.ts +19 -0
  12. package/dist/models/RepatriationCitizensChatModel.js +77 -0
  13. package/dist/models/RepatriationCitizensRequestModel.d.ts +22 -0
  14. package/dist/models/RepatriationCitizensRequestModel.js +78 -0
  15. package/dist/models/RepatriationCitizensWorkflowModel.d.ts +17 -0
  16. package/dist/models/RepatriationCitizensWorkflowModel.js +67 -0
  17. package/package.json +24 -24
  18. package/src/data-source.ts +564 -554
  19. package/src/index.ts +410 -404
  20. package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
  21. package/src/models/DocumentationFileModel.ts +40 -40
  22. package/src/models/LMSExternalEntityTrainedPersonModel.ts +45 -45
  23. package/src/models/LanguageCourseRequestModel.ts +67 -67
  24. package/src/models/LeaveConfigModel.ts +71 -71
  25. package/src/models/MediaApprovalModel.ts +4 -0
  26. package/src/models/MissionTravelApprovalModel.ts +101 -101
  27. package/src/models/MissionTravelAttachmentModel.ts +56 -56
  28. package/src/models/MissionTravelChatModel.ts +52 -52
  29. package/src/models/MissionTravelPersonModel.ts +105 -105
  30. package/src/models/MissionTravelWorkflowModel.ts +54 -54
  31. package/src/models/ProjectContactsModel.ts +51 -51
  32. package/src/models/ProjectFaqModel.ts +36 -36
  33. package/src/models/ProjectInvoicesModel.ts +41 -41
  34. package/src/models/ProjectModel.ts +75 -75
  35. package/src/models/ProjectTasksModel.ts +75 -75
  36. package/src/models/RepatriationCitizensApprovalModel.ts +56 -0
  37. package/src/models/RepatriationCitizensAttachmentModel.ts +29 -0
  38. package/src/models/RepatriationCitizensChatModel.ts +63 -0
  39. package/src/models/RepatriationCitizensRequestModel.ts +52 -0
  40. package/src/models/RepatriationCitizensWorkflowModel.ts +43 -0
  41. package/src/models/SectionModel.ts +35 -35
  42. package/src/models/ServicesNotificationConfigsModel.ts +55 -55
  43. package/dist/models/MissionTravelClassConfigModel.d.ts +0 -10
  44. package/dist/models/MissionTravelClassConfigModel.js +0 -50
  45. package/dist/models/MissionTravelPerdiemModel.d.ts +0 -10
  46. package/dist/models/MissionTravelPerdiemModel.js +0 -54
@@ -1,55 +1,55 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum MissionTravelWorkFlowStatus {
5
- COMPLETED = "Completed",
6
- NOT_YET_STARTED = "Not Yet Started",
7
- PENDING = "Pending"
8
- }
9
-
10
- @Entity({ name: 'mission_travel_workflows' })
11
- export class MissionTravelWorkFlow extends BaseModel {
12
- @Column({ type: 'int', nullable: false })
13
- request_id: number;
14
-
15
- @Column({ type: 'int', nullable: true })
16
- service_id: number | null;
17
-
18
- @Column({ type: 'int', nullable: true })
19
- sub_service_id: number | null;
20
-
21
- @Column({ type: 'int', nullable: true })
22
- order: number | null;
23
-
24
- @Column({ type: 'varchar', length: 255, nullable: false })
25
- content: string;
26
-
27
- @Column({ type: 'enum', enum: MissionTravelWorkFlowStatus, default: MissionTravelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
28
- status: MissionTravelWorkFlowStatus;
29
-
30
- @Column({ type: 'integer', nullable: true })
31
- user_id: number | null;
32
-
33
- @Column({ type: 'integer', nullable: true })
34
- role_id: number | null;
35
-
36
- @Column({ type: 'integer', nullable: true })
37
- department_id: number | null;
38
-
39
- @Column({ type: 'integer', nullable: true })
40
- section_id: number | null;
41
-
42
- constructor(request_id: number, content: string, status: MissionTravelWorkFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
43
- super();
44
- this.request_id = request_id;
45
- this.content = content;
46
- this.status = status;
47
- this.order = order || null;
48
- this.service_id = service_id ?? null;
49
- this.sub_service_id = sub_service_id ?? null;
50
- this.user_id = user_id || null;
51
- this.role_id = role_id || null;
52
- this.department_id = department_id || null;
53
- this.section_id = section_id || null;
54
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum MissionTravelWorkFlowStatus {
5
+ COMPLETED = "Completed",
6
+ NOT_YET_STARTED = "Not Yet Started",
7
+ PENDING = "Pending"
8
+ }
9
+
10
+ @Entity({ name: 'mission_travel_workflows' })
11
+ export class MissionTravelWorkFlow extends BaseModel {
12
+ @Column({ type: 'int', nullable: false })
13
+ request_id: number;
14
+
15
+ @Column({ type: 'int', nullable: true })
16
+ service_id: number | null;
17
+
18
+ @Column({ type: 'int', nullable: true })
19
+ sub_service_id: number | null;
20
+
21
+ @Column({ type: 'int', nullable: true })
22
+ order: number | null;
23
+
24
+ @Column({ type: 'varchar', length: 255, nullable: false })
25
+ content: string;
26
+
27
+ @Column({ type: 'enum', enum: MissionTravelWorkFlowStatus, default: MissionTravelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
28
+ status: MissionTravelWorkFlowStatus;
29
+
30
+ @Column({ type: 'integer', nullable: true })
31
+ user_id: number | null;
32
+
33
+ @Column({ type: 'integer', nullable: true })
34
+ role_id: number | null;
35
+
36
+ @Column({ type: 'integer', nullable: true })
37
+ department_id: number | null;
38
+
39
+ @Column({ type: 'integer', nullable: true })
40
+ section_id: number | null;
41
+
42
+ constructor(request_id: number, content: string, status: MissionTravelWorkFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
43
+ super();
44
+ this.request_id = request_id;
45
+ this.content = content;
46
+ this.status = status;
47
+ this.order = order || null;
48
+ this.service_id = service_id ?? null;
49
+ this.sub_service_id = sub_service_id ?? null;
50
+ this.user_id = user_id || null;
51
+ this.role_id = role_id || null;
52
+ this.department_id = department_id || null;
53
+ this.section_id = section_id || null;
54
+ }
55
55
  }
@@ -1,51 +1,51 @@
1
- import { Column, Entity } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'project_contacts' })
5
- export class ProjectContacts extends BaseModel {
6
- @Column({ type: 'int' })
7
- project_id: number;
8
-
9
- @Column({ type: 'varchar', length: 50 })
10
- contact_type: string;
11
-
12
- @Column({ type: 'varchar', length: 50, nullable: true })
13
- phone_number: string;
14
-
15
- @Column({ type: 'varchar', length: 255, nullable: true })
16
- email_id: string;
17
-
18
- @Column({ type: 'varchar', length: 255, nullable: true })
19
- name: string;
20
-
21
- @Column({ type: 'varchar', length: 255, nullable: true })
22
- designation: string;
23
-
24
- @Column({ type: 'varchar', length: 500, nullable: true })
25
- organisation_name: string | null;
26
-
27
- /** Optional FK to departments.id */
28
- @Column({ type: 'int', nullable: true })
29
- department_id: number | null;
30
-
31
- constructor(
32
- project_id?: number,
33
- contact_type?: string,
34
- phone_number?: string,
35
- email_id?: string,
36
- name?: string,
37
- designation?: string,
38
- organisation_name?: string | null,
39
- department_id?: number | null
40
- ) {
41
- super();
42
- this.project_id = project_id ?? 0;
43
- this.contact_type = contact_type ?? '';
44
- this.phone_number = phone_number ?? '';
45
- this.email_id = email_id ?? '';
46
- this.name = name ?? '';
47
- this.designation = designation ?? '';
48
- this.organisation_name = organisation_name ?? null;
49
- this.department_id = department_id ?? null;
50
- }
51
- }
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'project_contacts' })
5
+ export class ProjectContacts extends BaseModel {
6
+ @Column({ type: 'int' })
7
+ project_id: number;
8
+
9
+ @Column({ type: 'varchar', length: 50 })
10
+ contact_type: string;
11
+
12
+ @Column({ type: 'varchar', length: 50, nullable: true })
13
+ phone_number: string;
14
+
15
+ @Column({ type: 'varchar', length: 255, nullable: true })
16
+ email_id: string;
17
+
18
+ @Column({ type: 'varchar', length: 255, nullable: true })
19
+ name: string;
20
+
21
+ @Column({ type: 'varchar', length: 255, nullable: true })
22
+ designation: string;
23
+
24
+ @Column({ type: 'varchar', length: 500, nullable: true })
25
+ organisation_name: string | null;
26
+
27
+ /** Optional FK to departments.id */
28
+ @Column({ type: 'int', nullable: true })
29
+ department_id: number | null;
30
+
31
+ constructor(
32
+ project_id?: number,
33
+ contact_type?: string,
34
+ phone_number?: string,
35
+ email_id?: string,
36
+ name?: string,
37
+ designation?: string,
38
+ organisation_name?: string | null,
39
+ department_id?: number | null
40
+ ) {
41
+ super();
42
+ this.project_id = project_id ?? 0;
43
+ this.contact_type = contact_type ?? '';
44
+ this.phone_number = phone_number ?? '';
45
+ this.email_id = email_id ?? '';
46
+ this.name = name ?? '';
47
+ this.designation = designation ?? '';
48
+ this.organisation_name = organisation_name ?? null;
49
+ this.department_id = department_id ?? null;
50
+ }
51
+ }
@@ -1,36 +1,36 @@
1
- import { Column, Entity } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'project_faqs' })
5
- export class ProjectFaqs extends BaseModel {
6
- @Column({ type: 'boolean', default: false })
7
- is_popular: boolean;
8
-
9
- @Column({ type: 'text' })
10
- question: string;
11
-
12
- /** Null = global / general FAQ not tied to a project */
13
- @Column({ type: 'int', nullable: true })
14
- project_id: number | null;
15
-
16
- @Column({ type: 'int', nullable: true })
17
- department_id: number;
18
-
19
- @Column({ type: 'text', nullable: true })
20
- answer: string;
21
-
22
- constructor(
23
- question?: string,
24
- project_id?: number | null,
25
- department_id?: number,
26
- answer?: string,
27
- is_popular?: boolean
28
- ) {
29
- super();
30
- this.question = question ?? '';
31
- this.project_id = project_id ?? null;
32
- this.department_id = department_id ?? 0;
33
- this.answer = answer ?? '';
34
- this.is_popular = is_popular ?? false;
35
- }
36
- }
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'project_faqs' })
5
+ export class ProjectFaqs extends BaseModel {
6
+ @Column({ type: 'boolean', default: false })
7
+ is_popular: boolean;
8
+
9
+ @Column({ type: 'text' })
10
+ question: string;
11
+
12
+ /** Null = global / general FAQ not tied to a project */
13
+ @Column({ type: 'int', nullable: true })
14
+ project_id: number | null;
15
+
16
+ @Column({ type: 'int', nullable: true })
17
+ department_id: number;
18
+
19
+ @Column({ type: 'text', nullable: true })
20
+ answer: string;
21
+
22
+ constructor(
23
+ question?: string,
24
+ project_id?: number | null,
25
+ department_id?: number,
26
+ answer?: string,
27
+ is_popular?: boolean
28
+ ) {
29
+ super();
30
+ this.question = question ?? '';
31
+ this.project_id = project_id ?? null;
32
+ this.department_id = department_id ?? 0;
33
+ this.answer = answer ?? '';
34
+ this.is_popular = is_popular ?? false;
35
+ }
36
+ }
@@ -1,41 +1,41 @@
1
- import { Column, Entity } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'project_invoices' })
5
- export class ProjectInvoices extends BaseModel {
6
- @Column({ type: 'int' })
7
- project_id: number;
8
-
9
- /** Optional link to a project milestone (same project). */
10
- @Column({ type: 'int', nullable: true })
11
- milestone_id: number | null;
12
-
13
- @Column({ type: 'text', nullable: true })
14
- invoice_link: string;
15
-
16
- @Column({ type: 'varchar', length: 500, nullable: true })
17
- filename: string;
18
-
19
- @Column({ type: 'bigint', nullable: true })
20
- filesize: number;
21
-
22
- @Column({ type: 'varchar', length: 100, nullable: true })
23
- filetype: string;
24
-
25
- constructor(
26
- project_id?: number,
27
- milestone_id?: number | null,
28
- invoice_link?: string,
29
- filename?: string,
30
- filesize?: number,
31
- filetype?: string
32
- ) {
33
- super();
34
- this.project_id = project_id ?? 0;
35
- this.milestone_id = milestone_id ?? null;
36
- this.invoice_link = invoice_link ?? '';
37
- this.filename = filename ?? '';
38
- this.filesize = filesize ?? 0;
39
- this.filetype = filetype ?? '';
40
- }
41
- }
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'project_invoices' })
5
+ export class ProjectInvoices extends BaseModel {
6
+ @Column({ type: 'int' })
7
+ project_id: number;
8
+
9
+ /** Optional link to a project milestone (same project). */
10
+ @Column({ type: 'int', nullable: true })
11
+ milestone_id: number | null;
12
+
13
+ @Column({ type: 'text', nullable: true })
14
+ invoice_link: string;
15
+
16
+ @Column({ type: 'varchar', length: 500, nullable: true })
17
+ filename: string;
18
+
19
+ @Column({ type: 'bigint', nullable: true })
20
+ filesize: number;
21
+
22
+ @Column({ type: 'varchar', length: 100, nullable: true })
23
+ filetype: string;
24
+
25
+ constructor(
26
+ project_id?: number,
27
+ milestone_id?: number | null,
28
+ invoice_link?: string,
29
+ filename?: string,
30
+ filesize?: number,
31
+ filetype?: string
32
+ ) {
33
+ super();
34
+ this.project_id = project_id ?? 0;
35
+ this.milestone_id = milestone_id ?? null;
36
+ this.invoice_link = invoice_link ?? '';
37
+ this.filename = filename ?? '';
38
+ this.filesize = filesize ?? 0;
39
+ this.filetype = filetype ?? '';
40
+ }
41
+ }
@@ -1,75 +1,75 @@
1
- import { Column, Entity } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'projects' })
5
- export class Projects extends BaseModel {
6
- @Column({ type: 'varchar', length: 255 })
7
- project_name: string;
8
-
9
- @Column({ type: 'text' , nullable: true})
10
- project_objective: string;
11
-
12
- @Column({ type: 'text' , nullable: true})
13
- project_benefits: string;
14
-
15
- @Column({ type: 'text' , nullable: true})
16
- project_risks: string;
17
-
18
- @Column({ type: 'text' , nullable: true})
19
- project_challenges: string;
20
-
21
- @Column({ type: 'text' , nullable: true})
22
- project_description: string;
23
-
24
- @Column({ type: 'text' , nullable: true})
25
- project_status: string;
26
-
27
- @Column({ type: 'text' , nullable: true})
28
- roadmap_link: string;
29
-
30
- @Column({ type: 'jsonb' , nullable: true})
31
- template_ids: number[] | null;
32
-
33
- @Column({ name: 'start_date', type: 'date', nullable: true })
34
- startDate: Date | null;
35
-
36
- @Column({ name: 'end_date', type: 'date', nullable: true })
37
- endDate: Date | null;
38
-
39
- @Column({ type: 'varchar', length: 100, nullable: true})
40
- project_version: string;
41
-
42
- @Column({ type: 'int', default: 0, nullable: true })
43
- no_of_phases: number;
44
-
45
- constructor(
46
- project_name?: string,
47
- project_objective?: string,
48
- project_benefits?: string,
49
- project_risks?: string,
50
- project_challenges?: string,
51
- project_description?: string,
52
- project_status?: string,
53
- roadmap_link?: string | null,
54
- template_ids?: number[] | null,
55
- startDate?: Date | null,
56
- endDate?: Date | null,
57
- project_version?: string,
58
- no_of_phases?: number
59
- ) {
60
- super();
61
- this.project_name = project_name || '';
62
- this.project_objective = project_objective || '';
63
- this.project_benefits = project_benefits || '';
64
- this.project_risks = project_risks || '';
65
- this.project_challenges = project_challenges || '';
66
- this.project_description = project_description || '';
67
- this.project_status = project_status || '';
68
- this.roadmap_link = roadmap_link || '';
69
- this.template_ids = template_ids || [];
70
- this.startDate = startDate ?? null;
71
- this.endDate = endDate ?? null;
72
- this.project_version = project_version || '';
73
- this.no_of_phases = no_of_phases ?? 0;
74
- }
75
- }
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'projects' })
5
+ export class Projects extends BaseModel {
6
+ @Column({ type: 'varchar', length: 255 })
7
+ project_name: string;
8
+
9
+ @Column({ type: 'text' , nullable: true})
10
+ project_objective: string;
11
+
12
+ @Column({ type: 'text' , nullable: true})
13
+ project_benefits: string;
14
+
15
+ @Column({ type: 'text' , nullable: true})
16
+ project_risks: string;
17
+
18
+ @Column({ type: 'text' , nullable: true})
19
+ project_challenges: string;
20
+
21
+ @Column({ type: 'text' , nullable: true})
22
+ project_description: string;
23
+
24
+ @Column({ type: 'text' , nullable: true})
25
+ project_status: string;
26
+
27
+ @Column({ type: 'text' , nullable: true})
28
+ roadmap_link: string;
29
+
30
+ @Column({ type: 'jsonb' , nullable: true})
31
+ template_ids: number[] | null;
32
+
33
+ @Column({ name: 'start_date', type: 'date', nullable: true })
34
+ startDate: Date | null;
35
+
36
+ @Column({ name: 'end_date', type: 'date', nullable: true })
37
+ endDate: Date | null;
38
+
39
+ @Column({ type: 'varchar', length: 100, nullable: true})
40
+ project_version: string;
41
+
42
+ @Column({ type: 'int', default: 0, nullable: true })
43
+ no_of_phases: number;
44
+
45
+ constructor(
46
+ project_name?: string,
47
+ project_objective?: string,
48
+ project_benefits?: string,
49
+ project_risks?: string,
50
+ project_challenges?: string,
51
+ project_description?: string,
52
+ project_status?: string,
53
+ roadmap_link?: string | null,
54
+ template_ids?: number[] | null,
55
+ startDate?: Date | null,
56
+ endDate?: Date | null,
57
+ project_version?: string,
58
+ no_of_phases?: number
59
+ ) {
60
+ super();
61
+ this.project_name = project_name || '';
62
+ this.project_objective = project_objective || '';
63
+ this.project_benefits = project_benefits || '';
64
+ this.project_risks = project_risks || '';
65
+ this.project_challenges = project_challenges || '';
66
+ this.project_description = project_description || '';
67
+ this.project_status = project_status || '';
68
+ this.roadmap_link = roadmap_link || '';
69
+ this.template_ids = template_ids || [];
70
+ this.startDate = startDate ?? null;
71
+ this.endDate = endDate ?? null;
72
+ this.project_version = project_version || '';
73
+ this.no_of_phases = no_of_phases ?? 0;
74
+ }
75
+ }
@@ -1,75 +1,75 @@
1
- import { Column, Entity } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- export interface TaskAttachmentItem {
5
- link?: string;
6
- filename?: string;
7
- filesize?: number;
8
- filetype?: string;
9
- }
10
-
11
- export const TASK_PRIORITY = ['low', 'medium', 'high'] as const;
12
- export const TASK_STATUS = ['Not started', 'Pending', 'In Progress', 'Completed'] as const;
13
-
14
- @Entity({ name: 'project_tasks' })
15
- export class ProjectTasks extends BaseModel {
16
- @Column({ type: 'int' })
17
- project_id: number;
18
-
19
- @Column({ type: 'varchar', length: 500 })
20
- task_title: string;
21
-
22
- @Column({ type: 'text', nullable: true })
23
- task_description: string;
24
-
25
- @Column({ type: 'jsonb', nullable: true })
26
- attachments: TaskAttachmentItem[] | null;
27
-
28
- @Column({ type: 'varchar', length: 20, default: 'medium' })
29
- priority: string;
30
-
31
- @Column({ type: 'varchar', length: 50, default: 'Not started' })
32
- status: string;
33
-
34
- @Column({ type: 'int', nullable: true })
35
- milestone_id: number | null;
36
-
37
- @Column({ type: 'int', default: 1, nullable: true })
38
- phase: number;
39
-
40
- @Column({ type: 'int', nullable: true })
41
- manager_id: number | null;
42
-
43
- @Column({ type: 'date', nullable: true })
44
- start_date: Date | null;
45
-
46
- @Column({ type: 'date', nullable: true })
47
- end_date: Date | null;
48
-
49
- constructor(
50
- project_id?: number,
51
- task_title?: string,
52
- task_description?: string,
53
- attachments?: TaskAttachmentItem[] | null,
54
- priority?: string,
55
- status?: string,
56
- milestone_id?: number | null,
57
- phase?: number,
58
- manager_id?: number | null,
59
- start_date?: Date | null,
60
- end_date?: Date | null
61
- ) {
62
- super();
63
- this.project_id = project_id ?? 0;
64
- this.task_title = task_title ?? '';
65
- this.task_description = task_description ?? '';
66
- this.attachments = attachments ?? null;
67
- this.priority = priority ?? 'medium';
68
- this.status = status ?? 'Not started';
69
- this.milestone_id = milestone_id ?? null;
70
- this.phase = phase ?? 1;
71
- this.manager_id = manager_id ?? null;
72
- this.start_date = start_date ?? null;
73
- this.end_date = end_date ?? null;
74
- }
75
- }
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export interface TaskAttachmentItem {
5
+ link?: string;
6
+ filename?: string;
7
+ filesize?: number;
8
+ filetype?: string;
9
+ }
10
+
11
+ export const TASK_PRIORITY = ['low', 'medium', 'high'] as const;
12
+ export const TASK_STATUS = ['Not started', 'Pending', 'In Progress', 'Completed'] as const;
13
+
14
+ @Entity({ name: 'project_tasks' })
15
+ export class ProjectTasks extends BaseModel {
16
+ @Column({ type: 'int' })
17
+ project_id: number;
18
+
19
+ @Column({ type: 'varchar', length: 500 })
20
+ task_title: string;
21
+
22
+ @Column({ type: 'text', nullable: true })
23
+ task_description: string;
24
+
25
+ @Column({ type: 'jsonb', nullable: true })
26
+ attachments: TaskAttachmentItem[] | null;
27
+
28
+ @Column({ type: 'varchar', length: 20, default: 'medium' })
29
+ priority: string;
30
+
31
+ @Column({ type: 'varchar', length: 50, default: 'Not started' })
32
+ status: string;
33
+
34
+ @Column({ type: 'int', nullable: true })
35
+ milestone_id: number | null;
36
+
37
+ @Column({ type: 'int', default: 1, nullable: true })
38
+ phase: number;
39
+
40
+ @Column({ type: 'int', nullable: true })
41
+ manager_id: number | null;
42
+
43
+ @Column({ type: 'date', nullable: true })
44
+ start_date: Date | null;
45
+
46
+ @Column({ type: 'date', nullable: true })
47
+ end_date: Date | null;
48
+
49
+ constructor(
50
+ project_id?: number,
51
+ task_title?: string,
52
+ task_description?: string,
53
+ attachments?: TaskAttachmentItem[] | null,
54
+ priority?: string,
55
+ status?: string,
56
+ milestone_id?: number | null,
57
+ phase?: number,
58
+ manager_id?: number | null,
59
+ start_date?: Date | null,
60
+ end_date?: Date | null
61
+ ) {
62
+ super();
63
+ this.project_id = project_id ?? 0;
64
+ this.task_title = task_title ?? '';
65
+ this.task_description = task_description ?? '';
66
+ this.attachments = attachments ?? null;
67
+ this.priority = priority ?? 'medium';
68
+ this.status = status ?? 'Not started';
69
+ this.milestone_id = milestone_id ?? null;
70
+ this.phase = phase ?? 1;
71
+ this.manager_id = manager_id ?? null;
72
+ this.start_date = start_date ?? null;
73
+ this.end_date = end_date ?? null;
74
+ }
75
+ }