Creacion de entities

This commit is contained in:
2025-09-10 17:46:13 -06:00
parent 0b5a7aa68a
commit 3481d76d38
7 changed files with 74 additions and 4 deletions
+7 -1
View File
@@ -1 +1,7 @@
export class CreateServicioDto {}
import { IsString, MaxLength } from 'class-validator';
export class CreateServicioDto {
@IsString()
@MaxLength(45)
servicio: string;
}
+4
View File
@@ -0,0 +1,4 @@
export class ServicioDto {
id_servicio: number;
servicio: string;
}
+10 -1
View File
@@ -1 +1,10 @@
export class Servicio {}
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
@Entity({ name: 'servicio' })
export class Servicio {
@PrimaryGeneratedColumn({ name: 'id_servicio', type: 'int' })
id_servicio: number;
@Column({ type: 'varchar', length: 45, nullable: false })
servicio: string;
}