@kipicore/dbcore 1.1.463 → 1.1.465
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/interfaces/advertisementNewInterface.d.ts +3 -1
- package/dist/models/mongodb/{advertisementModel.d.ts → advertisementNewModel.d.ts} +2 -2
- package/dist/models/mongodb/{advertisementModel.js → advertisementNewModel.js} +8 -3
- package/dist/models/mongodb/index.d.ts +1 -1
- package/dist/models/mongodb/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IDefaultAttributes } from './commonInterface';
|
|
2
2
|
import { COMMAN_STATUS } from '../constants/app';
|
|
3
|
+
import { Document } from 'mongoose';
|
|
3
4
|
export interface ICommonBannerAndSlimSchema {
|
|
4
5
|
time: number;
|
|
5
6
|
fileStorageId: string;
|
|
@@ -9,8 +10,9 @@ export interface ITimeDurationSchema {
|
|
|
9
10
|
startTime: Date;
|
|
10
11
|
endDate: Date;
|
|
11
12
|
}
|
|
12
|
-
export interface IAdvertisementNewModelAttributes extends IDefaultAttributes {
|
|
13
|
+
export interface IAdvertisementNewModelAttributes extends IDefaultAttributes, Document {
|
|
13
14
|
id: string;
|
|
15
|
+
title: string;
|
|
14
16
|
appType: string;
|
|
15
17
|
userType: string;
|
|
16
18
|
frequency: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Model } from 'mongoose';
|
|
2
2
|
import { IAdvertisementNewModelAttributes } from '../../interfaces/advertisementNewInterface';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const AdvertisementNewModel: Model<IAdvertisementNewModelAttributes>;
|
|
4
|
+
export default AdvertisementNewModel;
|
|
@@ -44,7 +44,12 @@ const TimeDurationSchema = new mongoose_1.Schema({
|
|
|
44
44
|
startTime: { type: Date, required: false },
|
|
45
45
|
endDate: { type: Date, required: false },
|
|
46
46
|
}, { _id: false });
|
|
47
|
-
const
|
|
47
|
+
const advertisementNewSchema = new mongoose_1.Schema({
|
|
48
|
+
title: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false,
|
|
51
|
+
trim: true,
|
|
52
|
+
},
|
|
48
53
|
instituteId: {
|
|
49
54
|
type: String,
|
|
50
55
|
trim: true,
|
|
@@ -104,5 +109,5 @@ const advertisementSchema = new mongoose_1.Schema({
|
|
|
104
109
|
timestamps: true,
|
|
105
110
|
versionKey: false,
|
|
106
111
|
});
|
|
107
|
-
const
|
|
108
|
-
exports.default =
|
|
112
|
+
const AdvertisementNewModel = mongoose_1.default.model('advertisement_new', advertisementNewSchema);
|
|
113
|
+
exports.default = AdvertisementNewModel;
|
|
@@ -66,4 +66,4 @@ export { default as CommunityGroupModel } from './communityGroupModel';
|
|
|
66
66
|
export { default as CommunityGroupMemberModel } from './communityGroupMemberModel';
|
|
67
67
|
export { default as CommunityMessageModel } from './communityMessageModel';
|
|
68
68
|
export { default as RoleHasPermissionModel } from './roleHasPermissionModel';
|
|
69
|
-
export { default as AdvertisementNewModel } from './
|
|
69
|
+
export { default as AdvertisementNewModel } from './advertisementNewModel';
|
|
@@ -159,5 +159,5 @@ var communityMessageModel_1 = require("./communityMessageModel");
|
|
|
159
159
|
Object.defineProperty(exports, "CommunityMessageModel", { enumerable: true, get: function () { return __importDefault(communityMessageModel_1).default; } });
|
|
160
160
|
var roleHasPermissionModel_1 = require("./roleHasPermissionModel");
|
|
161
161
|
Object.defineProperty(exports, "RoleHasPermissionModel", { enumerable: true, get: function () { return __importDefault(roleHasPermissionModel_1).default; } });
|
|
162
|
-
var
|
|
163
|
-
Object.defineProperty(exports, "AdvertisementNewModel", { enumerable: true, get: function () { return __importDefault(
|
|
162
|
+
var advertisementNewModel_1 = require("./advertisementNewModel");
|
|
163
|
+
Object.defineProperty(exports, "AdvertisementNewModel", { enumerable: true, get: function () { return __importDefault(advertisementNewModel_1).default; } });
|
package/package.json
CHANGED