@kipicore/dbcore 1.1.264 → 1.1.266
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/dist/db/psql/migrations/20260214061731-institute_add_establishmentYear1.d.ts +2 -0
- package/dist/db/psql/migrations/20260214061731-institute_add_establishmentYear1.js +21 -0
- package/dist/interfaces/ticketRaiseInterface.d.ts +4 -3
- package/dist/models/mongodb/ticketRaiseModel.js +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('institutes');
|
|
4
|
+
if (!table.establishment_year) {
|
|
5
|
+
await queryInterface.addColumn('institutes', 'establishment_year', {
|
|
6
|
+
type: Sequelize.INTEGER,
|
|
7
|
+
allowNull: true,
|
|
8
|
+
field: 'establishment_year',
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const down = async (queryInterface, Sequelize) => {
|
|
13
|
+
const table = await queryInterface.describeTable('institutes');
|
|
14
|
+
if (table.establishment_year) {
|
|
15
|
+
await queryInterface.removeColumn('institutes', 'establishment_year');
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
module.exports = {
|
|
19
|
+
up,
|
|
20
|
+
down,
|
|
21
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Document } from
|
|
2
|
-
import { TICKET_RAISE_PRIORITY, TICKET_RAISE_STATUS } from
|
|
3
|
-
import { IDefaultAttributes } from
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
|
+
import { TICKET_RAISE_PRIORITY, TICKET_RAISE_STATUS } from '../constants';
|
|
3
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
4
4
|
export interface ITicketRaiseConversationAttributes {
|
|
5
5
|
text: string;
|
|
6
6
|
senderId: string;
|
|
7
7
|
parentId?: string;
|
|
8
|
+
fileId?: string;
|
|
8
9
|
conversationId: string;
|
|
9
10
|
}
|
|
10
11
|
export interface ITicketRaiseAttributes extends IDefaultAttributes, Document {
|
|
@@ -51,6 +51,10 @@ const TicketConversationsSchema = new mongoose_1.Schema({
|
|
|
51
51
|
type: String,
|
|
52
52
|
required: false,
|
|
53
53
|
},
|
|
54
|
+
fileId: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
54
58
|
}, { _id: false });
|
|
55
59
|
const TicketRaiseSchema = new mongoose_1.Schema({
|
|
56
60
|
title: {
|
|
@@ -79,7 +83,7 @@ const TicketRaiseSchema = new mongoose_1.Schema({
|
|
|
79
83
|
},
|
|
80
84
|
conversation: {
|
|
81
85
|
type: [TicketConversationsSchema],
|
|
82
|
-
required: false
|
|
86
|
+
required: false,
|
|
83
87
|
},
|
|
84
88
|
userId: {
|
|
85
89
|
type: String,
|
package/package.json
CHANGED