@kipicore/dbcore 1.1.692 → 1.1.693

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.
@@ -5,6 +5,7 @@ export interface IUserAmenityFacilityDetail {
5
5
  facilityMasterId: string;
6
6
  count: number;
7
7
  description?: string;
8
+ sportsIds?: string[];
8
9
  }
9
10
  export interface IUserAmenityModelAttributes extends IDefaultAttributes, Document {
10
11
  id: string;
@@ -57,6 +57,7 @@ const userAmenitySchema = new mongoose_1.Schema({
57
57
  facilityMasterId: { type: String, required: true },
58
58
  count: { type: Number, required: true },
59
59
  description: { type: String, required: false },
60
+ sportsIds: { type: [String], required: false },
60
61
  },
61
62
  ],
62
63
  createdBy: { type: String, required: false },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.692",
3
+ "version": "1.1.693",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -1,23 +0,0 @@
1
- import { Document } from 'mongoose';
2
- import { COMMAN_STATUS } from '../constants/app';
3
- import { IDefaultAttributes } from './commonInterface';
4
- export interface IAmenityFacilityDetail {
5
- facilityMasterId: string;
6
- count: number;
7
- description?: string;
8
- }
9
- export interface IAmenityModelAttributes extends IDefaultAttributes, Document {
10
- id: string;
11
- name: string;
12
- description?: string;
13
- addressLine1?: string;
14
- addressLine2?: string;
15
- pinCode?: string;
16
- city?: number;
17
- state?: number;
18
- country?: number;
19
- images?: string[];
20
- ownerId?: string;
21
- status: COMMAN_STATUS;
22
- facilities?: IAmenityFacilityDetail[];
23
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import { Model } from 'mongoose';
2
- import { IAmenityModelAttributes } from '../../interfaces/amenityInterface';
3
- declare const AmenityModel: Model<IAmenityModelAttributes>;
4
- export default AmenityModel;
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- const mongoose_1 = __importStar(require("mongoose"));
37
- const app_1 = require("../../constants/app");
38
- const amenitySchema = new mongoose_1.Schema({
39
- name: { type: String, required: true },
40
- description: { type: String, required: false },
41
- addressLine1: { type: String, required: false },
42
- addressLine2: { type: String, required: false },
43
- pinCode: { type: String, required: false },
44
- city: { type: Number, required: false },
45
- state: { type: Number, required: false },
46
- country: { type: Number, required: false },
47
- images: { type: [String], required: false },
48
- ownerId: { type: String, required: false },
49
- status: {
50
- type: String,
51
- enum: Object.values(app_1.COMMAN_STATUS),
52
- default: app_1.COMMAN_STATUS.ACTIVE,
53
- required: true,
54
- },
55
- facilities: [
56
- {
57
- facilityMasterId: { type: String, required: true },
58
- count: { type: Number, required: true },
59
- description: { type: String, required: false },
60
- },
61
- ],
62
- createdBy: { type: String, required: false },
63
- updatedBy: { type: String, required: false },
64
- deletedBy: { type: String, required: false },
65
- deletedAt: { type: Date, default: null },
66
- }, {
67
- timestamps: true,
68
- versionKey: false,
69
- virtuals: true,
70
- });
71
- const AmenityModel = mongoose_1.default.model('amenity', amenitySchema);
72
- exports.default = AmenityModel;