Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document, Schema as MongooseSchema } from 'mongoose'; @Schema({ timestamps: true, collection: 'feature_flags' }) export class FeatureFlag extends Document { @Prop({ required: true, unique: true, index: true }) key: string; @Prop({ default: null }) description: string; @Prop({ default: false }) isEnabled: boolean; @Prop({ type: MongooseSchema.Types.Mixed, default: null }) rules: any; // Rule engine properties (e.g. emails, plans, default value) } export const FeatureFlagSchema = SchemaFactory.createForClass(FeatureFlag); |