Skip to content

Commit

Permalink
Merge pull request #26 from DevendraPPatil/all-1.1-dev-indexing
Browse files Browse the repository at this point in the history
Feat:Indexing added
  • Loading branch information
sudeeppr1998 authored Jun 4, 2024
2 parents 2b9963a + 3cb345c commit 9753dda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/schemas/collection.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IsOptional, IsString } from 'class-validator';

@Schema({ collection: 'collection' })
export class collection {
@Prop({ default: uuidv4 })
@Prop({ default: uuidv4, index:true})
collectionId: string;

@Prop({ type: String, required: true })
Expand Down Expand Up @@ -41,7 +41,7 @@ export class collection {
@IsString()
imagePath: string;

@Prop({ type: String, required: true })
@Prop({ type: String, required: true, index:true })
@IsString()
language: string;

Expand Down Expand Up @@ -87,7 +87,7 @@ export class collection {
@Prop({ required: true })
tags: [string];

@Prop({ default: now() })
@Prop({ default: now(), index:true })
createdAt: Date;

@Prop({ default: now() })
Expand Down
10 changes: 5 additions & 5 deletions src/schemas/content.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { IsNumber, IsOptional, IsString } from 'class-validator';

@Schema({ collection: 'content' })
export class content {
@Prop({ default: uuidv4 })
@Prop({ default: uuidv4, index:true })
contentId: string;

@Prop({ type: String, required: false })
@Prop({ type: String, required: false, index:true})
@IsOptional()
@IsString()
collectionId: string;
Expand All @@ -18,7 +18,7 @@ export class content {
@IsString()
name: string;

@Prop({ type: String, required: true })
@Prop({ type: String, required: true, index:true })
@IsString()
contentType: string;

Expand Down Expand Up @@ -64,7 +64,7 @@ export class content {
@IsString()
publisher: string;

@Prop({ type: String, required: true })
@Prop({ type: String, required: true, index:true })
@IsString()
language: string;

Expand All @@ -76,7 +76,7 @@ export class content {
@Prop({ required: true })
tags: [string];

@Prop({ default: now() })
@Prop({ default: now(), index:true })
createdAt: Date;

@Prop({ default: now() })
Expand Down

0 comments on commit 9753dda

Please sign in to comment.