dl-commons 0.0.2-testing.29 → 0.0.2-testing.30

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dl-commons",
3
3
  "type": "commonjs",
4
- "version": "0.0.2-testing.29",
4
+ "version": "0.0.2-testing.30",
5
5
  "description": "distance learning commons",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -126,6 +126,8 @@ import { IVirtualAddress } from './models/interfaces/virtual-address.interface';
126
126
  import { VirtualAddress, VirtualAddressDocument, VirtualAddressSchema } from './models/schemas/embedded/virtual-address.schema';
127
127
  import { Location, LocationDocument, LocationSchema } from './models/schemas/embedded/location.schema';
128
128
  import { ILocation } from './models/interfaces/location.interface';
129
+ import { IArchive } from './models/interfaces/archive.interface';
130
+ import { Archive, ArchiveDocument, ArchiveSchema } from './models/schemas/embedded/archive.schema';
129
131
 
130
132
  export {
131
133
  /**
@@ -233,6 +235,7 @@ export {
233
235
  IDateTimeRange,
234
236
  IVirtualAddress,
235
237
  ILocation,
238
+ IArchive,
236
239
 
237
240
  /**
238
241
  * Schemas & Documents
@@ -327,6 +330,9 @@ export {
327
330
  Location,
328
331
  LocationSchema,
329
332
  LocationDocument,
333
+ Archive,
334
+ ArchiveSchema,
335
+ ArchiveDocument,
330
336
 
331
337
  /**
332
338
  * Filters
@@ -0,0 +1,4 @@
1
+ export interface IArchive {
2
+ value: Boolean;
3
+ date?: Date | null;
4
+ }
@@ -1,8 +1,8 @@
1
1
  import { IDictionary } from './dictionary.interface';
2
2
 
3
3
  export interface IPhysicalAddress {
4
- country?: IDictionary | null | undefined;
5
- city?: IDictionary | null | undefined;
6
- address1?: string | null | undefined;
7
- address2?: string | null | undefined;
4
+ country?: IDictionary | null;
5
+ city?: IDictionary | null;
6
+ address1?: string | null;
7
+ address2?: string | null;
8
8
  }
@@ -0,0 +1,15 @@
1
+ import { Schema, Prop, SchemaFactory } from '@nestjs/mongoose';
2
+ import { HydratedDocument } from 'mongoose';
3
+ import { IArchive } from '../../interfaces/archive.interface';
4
+
5
+ @Schema({ _id: false })
6
+ export class Archive implements IArchive {
7
+ @Prop({ required: true, type: Boolean, default: false })
8
+ value: Boolean;
9
+
10
+ @Prop({ type: Date, required: false, default: null })
11
+ date: Date;
12
+ }
13
+
14
+ export const ArchiveSchema = SchemaFactory.createForClass(Archive);
15
+ export type ArchiveDocument = HydratedDocument<Archive>;