Loading backend/src/category/dto/create-category-req.dto.ts 0 → 100644 +8 −0 Original line number Diff line number Diff line import { ApiProperty } from '@nestjs/swagger'; export class CreateCategoryReqDto { @ApiProperty() nameES: string; @ApiProperty() nameEN: string; } backend/src/category/dto/create-category.dto.ts 0 → 100644 +7 −0 Original line number Diff line number Diff line import { LANGUAGES } from 'src/shared/enum/languages.enum'; export class CreateCategoryDto { idCategory?: number; language: LANGUAGES; name: string; } backend/src/category/dto/update-category.dto.ts 0 → 100644 +4 −0 Original line number Diff line number Diff line import { PartialType } from '@nestjs/swagger'; import { CreateCategoryDto } from './create-category.dto'; export class UpdateCategoryDto extends PartialType(CreateCategoryDto) {} backend/src/category/entities/category.entity.ts 0 → 100644 +14 −0 Original line number Diff line number Diff line import { LANGUAGES } from 'src/shared/enum/languages.enum'; import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; @Entity() export class Category { @PrimaryGeneratedColumn() idCategory: number; @Column({ nullable: false, primary: true, type: 'enum', enum: LANGUAGES }) language: LANGUAGES; @Column({ nullable: false }) name: string; } Loading
backend/src/category/dto/create-category-req.dto.ts 0 → 100644 +8 −0 Original line number Diff line number Diff line import { ApiProperty } from '@nestjs/swagger'; export class CreateCategoryReqDto { @ApiProperty() nameES: string; @ApiProperty() nameEN: string; }
backend/src/category/dto/create-category.dto.ts 0 → 100644 +7 −0 Original line number Diff line number Diff line import { LANGUAGES } from 'src/shared/enum/languages.enum'; export class CreateCategoryDto { idCategory?: number; language: LANGUAGES; name: string; }
backend/src/category/dto/update-category.dto.ts 0 → 100644 +4 −0 Original line number Diff line number Diff line import { PartialType } from '@nestjs/swagger'; import { CreateCategoryDto } from './create-category.dto'; export class UpdateCategoryDto extends PartialType(CreateCategoryDto) {}
backend/src/category/entities/category.entity.ts 0 → 100644 +14 −0 Original line number Diff line number Diff line import { LANGUAGES } from 'src/shared/enum/languages.enum'; import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; @Entity() export class Category { @PrimaryGeneratedColumn() idCategory: number; @Column({ nullable: false, primary: true, type: 'enum', enum: LANGUAGES }) language: LANGUAGES; @Column({ nullable: false }) name: string; }