@kipicore/dbcore 1.1.160 → 1.1.162

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.
@@ -63,11 +63,11 @@ const CampusCarnivalSchema = new mongoose_1.Schema({
63
63
  },
64
64
  academicCalendarId: {
65
65
  type: String,
66
- required: true,
66
+ required: false,
67
67
  },
68
68
  instituteId: {
69
69
  type: String,
70
- required: true,
70
+ required: false,
71
71
  },
72
72
  createdBy: {
73
73
  type: String,
@@ -42,19 +42,19 @@ const RoundsInformationSchema = new mongoose_1.Schema({
42
42
  },
43
43
  startTime: {
44
44
  type: Date,
45
- required: true,
45
+ required: false,
46
46
  },
47
47
  endTime: {
48
48
  type: Date,
49
- required: true,
49
+ required: false,
50
50
  },
51
51
  mark: {
52
52
  type: Number,
53
- required: true,
53
+ required: false,
54
54
  },
55
55
  passingMark: {
56
56
  type: Number,
57
- required: true,
57
+ required: false,
58
58
  },
59
59
  status: {
60
60
  type: String,
@@ -65,29 +65,29 @@ const RoundsInformationSchema = new mongoose_1.Schema({
65
65
  const StandardsInformationSchema = new mongoose_1.Schema({
66
66
  standardId: {
67
67
  type: String,
68
- required: true,
68
+ required: false,
69
69
  },
70
70
  numberOfParticipants: {
71
71
  type: Number,
72
- required: true,
72
+ required: false,
73
73
  },
74
74
  maxParticipants: {
75
75
  type: Number,
76
- required: true,
76
+ required: false,
77
77
  },
78
78
  batchId: {
79
79
  type: [String],
80
- required: true,
80
+ required: false,
81
81
  },
82
82
  }, { _id: false });
83
83
  const CompetitionSchema = new mongoose_1.Schema({
84
84
  name: {
85
85
  type: String,
86
- required: true,
86
+ required: false,
87
87
  },
88
88
  description: {
89
89
  type: String,
90
- required: true,
90
+ required: false,
91
91
  },
92
92
  type: {
93
93
  type: String,
@@ -109,19 +109,19 @@ const CompetitionSchema = new mongoose_1.Schema({
109
109
  },
110
110
  venue: {
111
111
  type: String,
112
- required: true,
112
+ required: false,
113
113
  },
114
114
  rounds: {
115
115
  type: [RoundsInformationSchema],
116
- required: true,
116
+ required: false,
117
117
  },
118
118
  startTime: {
119
119
  type: Date,
120
- required: true,
120
+ required: false,
121
121
  },
122
122
  endTime: {
123
123
  type: Date,
124
- required: true,
124
+ required: false,
125
125
  },
126
126
  status: {
127
127
  type: String,
@@ -130,15 +130,15 @@ const CompetitionSchema = new mongoose_1.Schema({
130
130
  },
131
131
  judges: {
132
132
  type: [String],
133
- required: true,
133
+ required: false,
134
134
  },
135
135
  coordinator: {
136
136
  type: [String],
137
- required: true,
137
+ required: false,
138
138
  },
139
139
  standards: {
140
140
  type: [StandardsInformationSchema],
141
- required: true,
141
+ required: false,
142
142
  },
143
143
  isNeedApproval: {
144
144
  type: Boolean,
@@ -146,7 +146,7 @@ const CompetitionSchema = new mongoose_1.Schema({
146
146
  },
147
147
  subCategory: {
148
148
  type: String,
149
- required: true,
149
+ required: false,
150
150
  },
151
151
  academicCalendarId: {
152
152
  type: String,
@@ -154,11 +154,11 @@ const CompetitionSchema = new mongoose_1.Schema({
154
154
  },
155
155
  instituteId: {
156
156
  type: String,
157
- required: true,
157
+ required: false,
158
158
  },
159
159
  campusCarnivalId: {
160
160
  type: String,
161
- required: true,
161
+ required: false,
162
162
  },
163
163
  createdBy: {
164
164
  type: String,
@@ -13,6 +13,5 @@ export declare class SequelizeCommonService<T extends Model> implements ISequeli
13
13
  create: (createData: T["_creationAttributes"], options?: CreateOptions) => Promise<T["_attributes"]>;
14
14
  bulkCreate: (createData: T["_creationAttributes"][], options?: BulkCreateOptions<T["_attributes"]>) => Promise<T["_attributes"][]>;
15
15
  delete: (where: WhereOptions<T["_attributes"]>, options?: DestroyOptions<T["_attributes"]>) => Promise<number>;
16
- hardDelete: (where: WhereOptions<T["_attributes"]>, options?: Omit<DestroyOptions<T["_attributes"]>, "where">) => Promise<number>;
17
16
  count: (where: WhereOptions<T["_attributes"]>, options?: CountOptions<T["_attributes"]>) => Promise<number>;
18
17
  }
@@ -102,14 +102,6 @@ class SequelizeCommonService {
102
102
  throw err;
103
103
  }
104
104
  };
105
- this.hardDelete = async (where, options) => {
106
- try {
107
- return this.model.destroy({ where, force: true, ...options });
108
- }
109
- catch (err) {
110
- throw err;
111
- }
112
- };
113
105
  this.count = (where, options) => {
114
106
  try {
115
107
  return this.model.count({ where, ...options });
@@ -15,7 +15,6 @@ interface IWriteService<T extends Model> {
15
15
  }
16
16
  interface IDeleteService<T extends Model> {
17
17
  delete(where: WhereOptions<T['_attributes']>, options?: DestroyOptions<T['_attributes']>): Promise<number>;
18
- hardDelete(where: WhereOptions<T['_attributes']>, options?: DestroyOptions<T['_attributes']>): Promise<number>;
19
18
  }
20
19
  export interface ISequelizeCommonService<T extends Model> extends IReadService<T>, IWriteService<T>, IDeleteService<T> {
21
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.160",
3
+ "version": "1.1.162",
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",