Remove hasura and hasura-auth (#134)
* Remove hasura and hasura-auth * Move all models to prisma * Start implementing graphql * chore: clean package json * chore: make the code build * chore: get initial graphql.tsx file * feature: use typegql as qgl server * refactor: small refactoring * refactor: clean tests * bugfix: make all filters not case sensitive * chore: remove unused imports --------- Co-authored-by: Sammy Teillet <sammy.teillet@gmail.com>
This commit is contained in:
30
server/src/api/models/company.model.ts
Normal file
30
server/src/api/models/company.model.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import { Field, GraphQLISODateTime, Int, ObjectType } from '@nestjs/graphql';
|
||||
import { Company as CompanyDB } from '@prisma/client';
|
||||
import { CustomUuidScalar } from '../graphql/uuid';
|
||||
|
||||
@ObjectType()
|
||||
export class Company {
|
||||
@Field(() => CustomUuidScalar)
|
||||
id: CompanyDB[`id`];
|
||||
|
||||
@Field(() => GraphQLISODateTime)
|
||||
createdAt: CompanyDB[`createdAt`];
|
||||
|
||||
@Field(() => GraphQLISODateTime)
|
||||
updatedAt: CompanyDB[`updatedAt`];
|
||||
|
||||
@Field(() => GraphQLISODateTime, { nullable: true })
|
||||
deletedAt: CompanyDB[`deletedAt`];
|
||||
|
||||
@Field(() => String)
|
||||
name: CompanyDB[`name`];
|
||||
|
||||
@Field(() => String)
|
||||
domainName: CompanyDB[`domainName`];
|
||||
|
||||
@Field(() => String)
|
||||
address: CompanyDB[`address`];
|
||||
|
||||
@Field(() => Int)
|
||||
employees: CompanyDB[`employees`];
|
||||
}
|
||||
Reference in New Issue
Block a user