import type { Constructor } from '@wener/utils'; import { Field, InputType, InterfaceType, ObjectType } from 'type-graphql'; import { HasCodeNode } from '../interface'; export function withCodeType(Base: TBase) { @InterfaceType({ implements: HasCodeNode }) @ObjectType({ implements: HasCodeNode }) @InputType() class HasCodeMixinType extends Base { @Field(() => String, { nullable: true }) code?: string; } return HasCodeMixinType; }