@kipicore/dbcore 1.1.377 → 1.1.379
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.
|
@@ -3,10 +3,14 @@ import { IDefaultAttributes } from './commonInterface';
|
|
|
3
3
|
import { LANGUAGES } from '../constants/app';
|
|
4
4
|
export interface IDescription {
|
|
5
5
|
videoId: string[];
|
|
6
|
-
|
|
6
|
+
video: IVideo[];
|
|
7
7
|
description: string;
|
|
8
8
|
language: LANGUAGES;
|
|
9
9
|
}
|
|
10
|
+
export interface IVideo {
|
|
11
|
+
title: string;
|
|
12
|
+
videoUrl: string;
|
|
13
|
+
}
|
|
10
14
|
export interface IInformationSupportModelAttributes extends IDefaultAttributes, Document {
|
|
11
15
|
id: string;
|
|
12
16
|
title: string;
|
|
@@ -37,13 +37,20 @@ const mongoose_1 = __importStar(require("mongoose"));
|
|
|
37
37
|
const app_1 = require("../../constants/app");
|
|
38
38
|
// import AutoIncrementFactory from 'mongoose-sequence';
|
|
39
39
|
// const AutoIncrement = AutoIncrementFactory(mongoose);
|
|
40
|
+
const videoSchema = new mongoose_1.Schema({
|
|
41
|
+
title: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
videoUrl: { type: String, required: false },
|
|
46
|
+
}, { _id: false });
|
|
40
47
|
const descriptionSchema = new mongoose_1.Schema({
|
|
41
48
|
videoId: {
|
|
42
49
|
type: [String],
|
|
43
50
|
default: [],
|
|
44
51
|
},
|
|
45
|
-
|
|
46
|
-
type: [
|
|
52
|
+
video: {
|
|
53
|
+
type: [videoSchema],
|
|
47
54
|
default: [],
|
|
48
55
|
},
|
|
49
56
|
description: {
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class PdcHistoryModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, InstituteModel,
|
|
8
|
+
const { UserModel, InstituteModel, StudentFeeCollectionModel, PdcChequeModel, AcademicCalendarModel, StudentFeeTypeCollectionModel } = models;
|
|
9
9
|
PdcHistoryModel.belongsTo(UserModel, {
|
|
10
10
|
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
11
11
|
as: 'createdByUser',
|
|
@@ -34,14 +34,6 @@ class PdcHistoryModel extends sequelize_1.Model {
|
|
|
34
34
|
foreignKey: 'userId',
|
|
35
35
|
as: 'userHasPdcHistory',
|
|
36
36
|
});
|
|
37
|
-
PdcHistoryModel.belongsTo(InstituteEntityModel, {
|
|
38
|
-
foreignKey: 'standardId',
|
|
39
|
-
as: 'pdcHistoryStandard',
|
|
40
|
-
});
|
|
41
|
-
InstituteEntityModel.hasMany(PdcHistoryModel, {
|
|
42
|
-
foreignKey: 'standardId',
|
|
43
|
-
as: 'StandardPdcHistory',
|
|
44
|
-
});
|
|
45
37
|
PdcHistoryModel.belongsTo(PdcChequeModel, {
|
|
46
38
|
foreignKey: 'pdcChequeId',
|
|
47
39
|
as: 'pdcChequeDetails',
|
package/package.json
CHANGED