updated build
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ExpiryBaseInput } from "@/models/base.model";
|
||||
import { InputType, Field, ID } from "@nestjs/graphql";
|
||||
import { InputType, Field } from "@nestjs/graphql";
|
||||
|
||||
@InputType()
|
||||
export class CreateBuildInfoInput {
|
||||
@@ -60,9 +60,6 @@ export class CreateBuildInput extends ExpiryBaseInput {
|
||||
@Field()
|
||||
buildType: string;
|
||||
|
||||
@Field()
|
||||
collectionToken: string;
|
||||
|
||||
@Field(() => CreateBuildInfoInput)
|
||||
info: CreateBuildInfoInput;
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ export class ListPartialIbanResponse {
|
||||
|
||||
@ObjectType()
|
||||
class ResponsibleCompanyPerson {
|
||||
|
||||
@Field(() => Company, { nullable: true })
|
||||
company?: Company;
|
||||
|
||||
|
||||
@@ -102,9 +102,6 @@ export class UpdateBuildInput extends ExpiryBaseInput {
|
||||
@Field({ nullable: true })
|
||||
buildType?: string;
|
||||
|
||||
@Field({ nullable: true })
|
||||
collectionToken?: string;
|
||||
|
||||
@Field(() => UpdateBuildInfoInput, { nullable: true })
|
||||
info?: UpdateBuildInfoInput;
|
||||
|
||||
|
||||
@@ -4,30 +4,21 @@ import { Document, Types } from 'mongoose';
|
||||
import { Base } from '@/models/base.model';
|
||||
import { Person } from '@/models/person.model';
|
||||
|
||||
@ObjectType()
|
||||
export class CollectionTokenItem {
|
||||
|
||||
@Field()
|
||||
@Prop({ required: true })
|
||||
prefix: string;
|
||||
|
||||
@Field()
|
||||
@Prop({ required: true })
|
||||
token: string;
|
||||
}
|
||||
|
||||
@ObjectType()
|
||||
export class CollectionToken {
|
||||
|
||||
@Field(() => [CollectionTokenItem])
|
||||
@Prop({ type: [CollectionTokenItem], default: [] })
|
||||
tokens: CollectionTokenItem[];
|
||||
|
||||
@Field()
|
||||
@Prop({ required: true, default: '' })
|
||||
default: string;
|
||||
defaultSelection: string;
|
||||
|
||||
@Field(() => [String])
|
||||
selectedBuildIDS: string[];
|
||||
|
||||
@Field(() => [String])
|
||||
selectedCompanyIDS: string[];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ObjectType()
|
||||
@Schema({ timestamps: true })
|
||||
export class User extends Base {
|
||||
@@ -68,7 +59,7 @@ export class User extends Base {
|
||||
phone: string;
|
||||
|
||||
@Field(() => CollectionToken)
|
||||
@Prop({ type: CollectionToken, default: () => ({ tokens: [], default: '' }) })
|
||||
@Prop({ type: CollectionToken, default: () => ({ defaultSelection: '', selectedBuildIDS: [], selectedCompanyIDS: [] }) })
|
||||
collectionTokens: CollectionToken;
|
||||
|
||||
@Field(() => ID)
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
import { InputType, Field, ID } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class CollectionTokenItemInput {
|
||||
@Field()
|
||||
prefix: string;
|
||||
export class CreateCollectionTokenInput {
|
||||
|
||||
@Field()
|
||||
token: string;
|
||||
}
|
||||
defaultSelection: string;
|
||||
|
||||
@InputType()
|
||||
export class CollectionTokenInput {
|
||||
@Field(() => [CollectionTokenItemInput])
|
||||
tokens: CollectionTokenItemInput[];
|
||||
@Field(() => [String])
|
||||
selectedBuildIDS: string[];
|
||||
|
||||
@Field(() => [String])
|
||||
selectedCompanyIDS: string[];
|
||||
|
||||
@Field()
|
||||
default: string;
|
||||
}
|
||||
|
||||
@InputType()
|
||||
@@ -39,8 +35,8 @@ export class CreateUserInput {
|
||||
@Field()
|
||||
phone: string;
|
||||
|
||||
@Field(() => CollectionTokenInput)
|
||||
collectionTokens: CollectionTokenInput;
|
||||
@Field(() => CreateCollectionTokenInput)
|
||||
collectionTokens: CreateCollectionTokenInput;
|
||||
|
||||
@Field(() => ID)
|
||||
person: string;
|
||||
@@ -59,4 +55,5 @@ export class CreateUserInput {
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
isNotificationSend?: boolean;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
import { InputType, Field, ID } from '@nestjs/graphql';
|
||||
|
||||
@InputType()
|
||||
export class UpdateCollectionTokenItemInput {
|
||||
@Field({ nullable: true })
|
||||
prefix?: string;
|
||||
|
||||
@Field({ nullable: true })
|
||||
token?: string;
|
||||
}
|
||||
|
||||
@InputType()
|
||||
export class UpdateCollectionTokenInput {
|
||||
@Field(() => [UpdateCollectionTokenItemInput], { nullable: true })
|
||||
tokens?: UpdateCollectionTokenItemInput[];
|
||||
|
||||
@Field({ nullable: true })
|
||||
default?: string;
|
||||
@Field()
|
||||
defaultSelection: string;
|
||||
|
||||
@Field(() => [String])
|
||||
selectedBuildIDS: string[];
|
||||
|
||||
@Field(() => [String])
|
||||
selectedCompanyIDS: string[];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@InputType()
|
||||
export class UpdateUserInput {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user