ソースを参照

added Entity dataservice

Qiao Hui 1 年間 前
コミット
096cea86a1
1 ファイル変更75 行追加0 行削除
  1. 75 0
      src/FisAppQueryModule/entities/EntityData.ts

+ 75 - 0
src/FisAppQueryModule/entities/EntityData.ts

@@ -0,0 +1,75 @@
+import { ArgsType,    Field,   Int,  ObjectType } from '@nestjs/graphql';
+import {   SummaryResponse } from './DescendentDataServiceArgument.entity';
+import { EntityData as EntityDataType } from '../message/fisappmessagejsutility/interface/export';
+import { CustomFilter } from './CustomFilter.validate';
+import { CustomReturnFormatType } from './CustomReturnFormatType.validate';
+import { Validate } from 'class-validator'
+import { StatusResponse } from './StatusResponse';
+
+
+export const thisClassName = "EntityDataDataService";
+
+@ObjectType()
+@ArgsType() 
+export class EntityDataArgument {
+
+    className: string = thisClassName;
+
+    
+    @Field({ nullable: true })
+    @Validate(CustomFilter)
+    filter?: string; 
+
+    @Field({ nullable: true })
+    @Validate(CustomReturnFormatType)
+    returnFormatType?: string;
+ 
+}
+
+
+@ObjectType()
+@ArgsType() 
+export class EntityDataMessage {
+
+    @Field(type => [EntityData]) 
+    data?: EntityData[]; 
+}
+
+
+@ObjectType()
+@ArgsType() 
+export class EntityData implements EntityDataType{
+    @Field(type=> Int,{ nullable: false})
+    entityId: number;
+    
+    @Field({ nullable: false})
+    entityType: string;
+
+    @Field(type=> Int, { nullable: false})
+    entityProfId: number;
+
+    @Field({ nullable: true})
+    entityCode: string; 
+
+    @Field({ nullable: true})
+    entityShortName: string;
+
+    @Field({ nullable: true})
+    entityDeleted:string;
+
+}
+
+
+@ObjectType()
+@ArgsType() 
+export class LeaveHistoryUnion {
+
+    @Field(type=> SummaryResponse, { nullable: true})
+    SummaryResponse?:SummaryResponse;
+
+    @Field(type=> StatusResponse, { nullable: true})
+    StatusResponse?:StatusResponse;
+
+    @Field(type=> EntityDataMessage, { nullable: true})
+    LeaveHistoryMessage?:EntityDataMessage
+}