init
This commit is contained in:
25
src/store/store.schema.ts
Normal file
25
src/store/store.schema.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
||||
import { Document } from 'mongoose';
|
||||
|
||||
export class StoreParams {
|
||||
key: string;
|
||||
value: any;
|
||||
}
|
||||
|
||||
@Schema()
|
||||
export class Store extends Document {
|
||||
@Prop({
|
||||
required: true,
|
||||
unique: true,
|
||||
type: String,
|
||||
})
|
||||
key: string;
|
||||
|
||||
@Prop({
|
||||
required: true,
|
||||
type: {}
|
||||
})
|
||||
value: any;
|
||||
}
|
||||
|
||||
export const StoreSchema = SchemaFactory.createForClass(Store);
|
||||
Reference in New Issue
Block a user