CompanyFraudRuleExemptions


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 gen_random_uuid()
CompanyId uuid 2147483647 null
Companies.id CompanyFraudRuleExemptions_CompanyId_fkey C
rule enum_FraudDetectionRule 2147483647 null
expiresAt timestamptz 35,6 √ null
reason text 2147483647 null
FraudCaseFileId uuid 2147483647 √ null
FraudCaseFiles.id CompanyFraudRuleExemptions_FraudCaseFileId_fkey N
GrantedById uuid 2147483647 √ null
Users.id CompanyFraudRuleExemptions_GrantedById_fkey N
createdAt timestamptz 35,6 now()
updatedAt timestamptz 35,6 now()
revokedAt timestamptz 35,6 √ null
RevokedById uuid 2147483647 √ null
Users.id CompanyFraudRuleExemptions_RevokedById_fkey N
revocationReason text 2147483647 √ null

Indexes

Constraint Name Type Sort Column(s)
CompanyFraudRuleExemptions_pkey Primary key Asc id
CompanyFraudRuleExemptions_active_lookup Must be unique Asc/Asc rule + CompanyId

Check Constraints

Constraint Name Constraint
CompanyFraudRuleExemptions_reason_check ((length(btrim(reason)) > 0))
CompanyFraudRuleExemptions_revocation_check (((("revokedAt" IS NULL) AND ("RevokedById" IS NULL) AND ("revocationReason" IS NULL)) OR (("revokedAt" IS NOT NULL) AND (length(btrim("revocationReason")) > 0))))

Relationships