import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'
import { Document } from 'mongoose'

export type DailyQuestionDocument = DailyQuestion & Document

@Schema({ timestamps: true })
export class DailyQuestion {
  @Prop({ required: true })
  position: string       // 适用岗位

  @Prop({ required: true })
  question: string       // 面试题

  @Prop({ required: true })
  referenceAnswer: string // 参考思路

  @Prop({ default: 'general' })
  category: string       // basic/algorithm/project/behavioral

  @Prop()
  date?: Date            // 推送日期

  @Prop({ default: false })
  pushed: boolean        // 是否已推送
}

export const DailyQuestionSchema = SchemaFactory.createForClass(DailyQuestion)