parts and areas tested
This commit is contained in:
11
backend/src/company/dto/create-company.input.ts
Normal file
11
backend/src/company/dto/create-company.input.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
import { InputType, Field, ID } from '@nestjs/graphql';
|
||||
|
||||
|
||||
@InputType()
|
||||
export class CreateCompanyInput {
|
||||
|
||||
@Field()
|
||||
name: string;
|
||||
|
||||
}
|
||||
14
backend/src/company/dto/list-company.response.ts
Normal file
14
backend/src/company/dto/list-company.response.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Field, ObjectType } from "@nestjs/graphql";
|
||||
import { Int } from "@nestjs/graphql";
|
||||
import { Company } from "@/models/company.model";
|
||||
|
||||
@ObjectType()
|
||||
export class ListCompanyResponse {
|
||||
|
||||
@Field(() => [Company], { nullable: true })
|
||||
data?: Company[];
|
||||
|
||||
@Field(() => Int, { nullable: true })
|
||||
totalCount?: number;
|
||||
|
||||
}
|
||||
9
backend/src/company/dto/update-company.input.ts
Normal file
9
backend/src/company/dto/update-company.input.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { InputType, Field, ID } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class UpdateCompanyInput {
|
||||
|
||||
@Field({ nullable: true })
|
||||
name?: string;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user