Added form results

This commit is contained in:
2026-03-20 14:09:38 +01:00
parent f7925e6248
commit 6b68570e46
8 changed files with 90 additions and 8 deletions

View File

@@ -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[];
}