-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add option to add condition types
- Loading branch information
Showing
43 changed files
with
1,036 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
libs/api/rule/data-access/src/lib/dto/user-create-rule-condition.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Field, InputType } from '@nestjs/graphql' | ||
import { Prisma } from '@prisma/client' | ||
import { GraphQLJSON } from 'graphql-scalars' | ||
import { RuleConditionType } from '../entity/rule-condition-type.enum' | ||
|
||
@InputType() | ||
export class UserCreateRuleConditionInput { | ||
@Field() | ||
ruleId!: string | ||
@Field(() => RuleConditionType) | ||
type!: RuleConditionType | ||
@Field({ nullable: true }) | ||
tokenId?: string | null | ||
@Field({ nullable: true }) | ||
account?: string | null | ||
@Field({ nullable: true }) | ||
amount?: string | null | ||
@Field(() => GraphQLJSON, { nullable: true }) | ||
config?: Prisma.InputJsonValue | null | ||
@Field(() => GraphQLJSON, { nullable: true }) | ||
filters?: Prisma.InputJsonValue | null | ||
} |
17 changes: 17 additions & 0 deletions
17
libs/api/rule/data-access/src/lib/dto/user-update-rule-condition-input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Field, InputType } from '@nestjs/graphql' | ||
import { Prisma } from '@prisma/client' | ||
import { GraphQLJSON } from 'graphql-scalars' | ||
|
||
@InputType() | ||
export class UserUpdateRuleConditionInput { | ||
@Field({ nullable: true }) | ||
tokenId?: string | null | ||
@Field({ nullable: true }) | ||
account?: string | null | ||
@Field({ nullable: true }) | ||
amount?: string | null | ||
@Field(() => GraphQLJSON, { nullable: true }) | ||
config?: Prisma.InputJsonValue | null | ||
@Field(() => GraphQLJSON, { nullable: true }) | ||
filters?: Prisma.InputJsonValue | null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.