57 lines
951 B
TypeScript
57 lines
951 B
TypeScript
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
import { Document } from 'mongoose';
|
|
import {ApiProperty} from '@nestjs/swagger';
|
|
|
|
export class StoreRequest {
|
|
@ApiProperty()
|
|
key: string;
|
|
|
|
@ApiProperty()
|
|
value: any;
|
|
|
|
@ApiProperty()
|
|
description: string;
|
|
|
|
@ApiProperty()
|
|
service_name: string;
|
|
|
|
@ApiProperty()
|
|
author: string;
|
|
}
|
|
|
|
@Schema()
|
|
export class Store extends Document {
|
|
@Prop({
|
|
required: true,
|
|
unique: true,
|
|
type: String,
|
|
})
|
|
key: string;
|
|
|
|
@Prop({
|
|
required: true,
|
|
type: Object,
|
|
})
|
|
value: any;
|
|
|
|
@Prop({
|
|
required: true,
|
|
type: String,
|
|
})
|
|
description: string;
|
|
|
|
@Prop({
|
|
required: true,
|
|
type: String,
|
|
})
|
|
service_name: string;
|
|
|
|
@Prop({
|
|
required: true,
|
|
type: String,
|
|
})
|
|
author: string;
|
|
}
|
|
|
|
export const StoreSchema = SchemaFactory.createForClass(Store);
|