This commit is contained in:
2025-09-10 16:15:36 -06:00
parent d9afbcd1e9
commit 70478f3fc3
16 changed files with 170 additions and 99 deletions
+12 -19
View File
@@ -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 } });
}
}