import {
  Controller,
  Post,
  Body,
  Patch,
  Param,
  Delete,
  Get,
  Query,
} from '@nestjs/common';
import { TokenData } from 'src/common/decorator/token-data.decorator';
import { TokenDataEntity } from 'src/common/entities/token-data.entity';
import { EvaluationIndicatorDto } from '../dto/evaluation-indicator.dto';
import { StudentEvaluationDto } from '../dto/student-evaluation.dto';
import { EvaluationIndicatorService } from '../service/evaluation-indicator.service';

@Controller('evaluation/indicator')
export class EvaluationIndicatorController {
  constructor(
    private readonly evaluationIndicatorService: EvaluationIndicatorService,
  ) {}

  @Post()
  editor(
    @Body() data: EvaluationIndicatorDto,
    @TokenData() token: TokenDataEntity,
  ) {
    data.updater = token.userId;
    data.creator = 'SYSTEM';
    return this.evaluationIndicatorService.editor(data);
  }
  @Get()
  getInfo() {
    return this.evaluationIndicatorService.getInfo();
  }
}
