26 lines
781 B
TypeScript
26 lines
781 B
TypeScript
import { ObjectType, Field, ArgsType, InputType, Int } from 'type-graphql';
|
|
|
|
import { IEngineSchema, MetaBy, MetaPermissions } from '@lib/seed/engine/EngineSchema';
|
|
import { IsNotEmpty } from 'class-validator';
|
|
import { CommentReviewDBBaseSchema } from '../../components';
|
|
|
|
@ObjectType()
|
|
export class CommentDBIntefaceSchema extends CommentReviewDBBaseSchema {
|
|
@Field()
|
|
@IsNotEmpty()
|
|
comment: string;
|
|
}
|
|
|
|
@ObjectType()
|
|
export class CommentDBSchema extends CommentDBIntefaceSchema {}
|
|
|
|
@ObjectType({ implements: IEngineSchema })
|
|
export class CommentSchema extends CommentDBSchema implements IEngineSchema {
|
|
_id: string;
|
|
organisationId?: string | undefined;
|
|
by?: MetaBy | undefined;
|
|
permissions: MetaPermissions;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
}
|