Added form results
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Field, ObjectType } from "@nestjs/graphql";
|
||||
import { Formular, MyField } from "src/dto/formular.dto";
|
||||
import { Column, Entity, OneToMany, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { Formular, FormularResults, MyField } from "src/dto/formular.dto";
|
||||
import { Column, Entity, ManyToOne, OneToMany, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { FieldEntity } from "./fields.entity";
|
||||
import { FormResultsEntity } from "./results.entity";
|
||||
|
||||
|
||||
@ObjectType()
|
||||
@@ -30,4 +31,8 @@ export class FormularEntity implements Formular{
|
||||
@Field(()=>[FieldEntity])
|
||||
@OneToMany(()=>FieldEntity,field=>field.formularObject)
|
||||
public fields: FieldEntity[];
|
||||
}
|
||||
|
||||
@Field(()=>[FormResultsEntity])
|
||||
@OneToMany(()=>FormResultsEntity,entity=>entity.formular)
|
||||
public results: FormResultsEntity[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user