mypage.entity.ts
411 Bytes
/* eslint-disable @typescript-eslint/no-unused-vars */
import { ObjectType, Field, Int } from '@nestjs/graphql';
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
@ObjectType()
export class MyPage {
@PrimaryGeneratedColumn()
@Field((type) => Int)
id: number;
@Column()
@Field()
name: string;
@Column({ nullable: true })
@Field({ nullable: true })
type?: string;
}