ticket
This commit is contained in:
@@ -1,26 +1,19 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { CreateStudentDto } from './dto/create-student.dto';
|
||||
import { UpdateStudentDto } from './dto/update-student.dto';
|
||||
import { studentDto } from './dto/student.dto';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Student } from './entities/student.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
|
||||
@Injectable()
|
||||
export class StudentService {
|
||||
create(createStudentDto: CreateStudentDto) {
|
||||
return 'This action adds a new student';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all student`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} student`;
|
||||
}
|
||||
|
||||
update(id: number, updateStudentDto: UpdateStudentDto) {
|
||||
return `This action updates a #${id} student`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} student`;
|
||||
constructor(
|
||||
@InjectRepository(Student)
|
||||
private studenRepository: Repository<Student>,
|
||||
) {}
|
||||
findOne(data: studentDto) {
|
||||
const { id_cuenta } = data;
|
||||
return this.studenRepository.findOne({ where: { id_cuenta } });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user