The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
/* @license Enterprise */
import { Field, InputType } from '@nestjs/graphql';
import {
IsBoolean,
IsNotEmpty,
IsOptional,
IsString,
IsUUID,
} from 'class-validator';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
@InputType()
export class CreateValidationRuleInput {
@IsUUID()
@IsNotEmpty()
@Field(() => UUIDScalarType)
objectMetadataId: string;
@IsUUID()
@IsOptional()
@Field(() => UUIDScalarType, { nullable: true })
errorFieldMetadataId?: string | null;
@IsString()
@IsNotEmpty()
@Field()
name: string;
@IsString()
@IsOptional()
@Field(() => String, { nullable: true })
description?: string | null;
@IsString()
@IsOptional()
@Field(() => String, { nullable: true })
icon?: string | null;
@IsString()
@Field()
expression: string;
@IsString()
@Field()
message: string;
@IsBoolean()
@IsOptional()
@Field({ nullable: true })
isActive?: boolean;
}