Skip to content
Snippets Groups Projects
Commit 03e0c59d authored by stevereis's avatar stevereis
Browse files

Add username and fullname on experiment result

parent 6b1d50d8
No related branches found
No related tags found
No related merge requests found
import { Field, ObjectType } from '@nestjs/graphql';
@ObjectType()
export class Author {
@Field({ nullable: true, defaultValue: '' })
username?: string;
@Field({ nullable: true, defaultValue: '' })
fullname?: string;
}
import { Field, ObjectType, PartialType } from '@nestjs/graphql'; import { Field, ObjectType, PartialType } from '@nestjs/graphql';
import { ResultUnion } from '../result/common/result-union.model'; import { ResultUnion } from '../result/common/result-union.model';
import { Algorithm } from './algorithm.model'; import { Algorithm } from './algorithm.model';
import { Author } from './author.model';
@ObjectType() @ObjectType()
export class Experiment { export class Experiment {
@Field({ nullable: true }) @Field({ nullable: true })
id?: string; id?: string;
@Field({ nullable: true, defaultValue: '' }) @Field(() => Author, { nullable: true, defaultValue: '' })
author?: string; author?: Author;
@Field({ nullable: true }) @Field({ nullable: true })
createdAt?: number; createdAt?: number;
......
...@@ -126,9 +126,14 @@ type Header { ...@@ -126,9 +126,14 @@ type Header {
type: String! type: String!
} }
type Author {
username: String
fullname: String
}
type Experiment { type Experiment {
id: String id: String
author: String author: Author
createdAt: Float createdAt: Float
updateAt: Float updateAt: Float
finishedAt: Float finishedAt: Float
...@@ -147,7 +152,7 @@ type Experiment { ...@@ -147,7 +152,7 @@ type Experiment {
type PartialExperiment { type PartialExperiment {
id: String id: String
author: String author: Author
createdAt: Float createdAt: Float
updateAt: Float updateAt: Float
finishedAt: Float finishedAt: Float
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment