ERD استخراجشده از مدلها
Mermaid ER diagram - روابط قطعی فقط در صورت استخراج مستقیم تکمیل میشوند.
erDiagram
USER {
string id
string email
string name
string passwordHash
string status
number failedLoginCount
datetime lockedUntil
datetime lastLoginAt
string refreshTokenHash
string phoneNumber
}
ROLE {
string id
string name
string description
boolean isSystem
datetime createdAt
datetime updatedAt
string users
string permissions
string projectUsers
}
PERMISSION {
string id
string key
string name
string description
string group
string riskLevel
boolean isSystem
datetime createdAt
datetime updatedAt
string roles
}
USERPERMISSION {
string userId
string permissionId
string effect
datetime createdAt
datetime updatedAt
string user
string permission
}
USERROLE {
string userId
string roleId
string user
string role
}
ROLEPERMISSION {
string roleId
string permissionId
string role
string permission
}
PROJECT {
string id
string name
string slug
string description
string status
string environment
string tags
boolean allowInternalHttpChecks
string ownerUserId
string owner
}
PROJECTUSER {
string id
string projectId
string userId
string roleId
string projectRoleId
string assignedByUserId
string status
datetime createdAt
datetime updatedAt
string project
}
PROJECTROLE {
string id
string name
string description
boolean isSystem
datetime createdAt
datetime updatedAt
string permissions
string members
}
PROJECTROLEPERMISSION {
string projectRoleId
string permissionId
string projectRole
string permission
}
PROJECTDOMAIN {
string id
string projectId
string name
string url
number type
string environment
string previewDevice
boolean isActive
number expectedStatusCode
string healthPath
}
HTTPCHECK {
string id
string projectId
string name
string description
string rawCurl
string method
string url
string headers
string queryParams
string body
}
HTTPCHECKRUN {
string id
string checkId
string projectId
datetime startedAt
datetime finishedAt
number durationMs
string status
number statusCode
string responseHeaders
string responseBodyPreview
}
SERVER {
string id
string projectId
string name
string ipAddress
string hostname
string environment
string description
boolean isActive
number pingIntervalMinutes
number alertAfterFailures
}
User
Prisma model | جدول/collection: User
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
email | String | بله | - | unique | - |
name | String | بله | - | - | - |
passwordHash | String | بله | - | - | - |
status | UserStatus | بله | active | - | - |
failedLoginCount | Int | بله | 0 | - | - |
lockedUntil | DateTime? | خیر | - | - | - |
lastLoginAt | DateTime? | خیر | - | - | - |
refreshTokenHash | String? | خیر | - | - | - |
phoneNumber | String? | خیر | - | - | - |
smsNotificationsEnabled | Boolean | بله | false | - | - |
emailVerifiedAt | DateTime? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
roles | UserRole[] | بله | - | - | - |
ownedProjects | Project[] | بله | - | - | - |
projectMemberships | ProjectUser[] | بله | - | - | - |
assignedProjectMemberships | ProjectUser[] | بله | - | - | - |
auditLogs | AuditLog[] | بله | - | - | - |
manualCases | ManualTestCase[] | بله | - | - | - |
manualRuns | ManualTestCaseRun[] | بله | - | - | - |
createdSmsTemplates | SmsTemplate[] | بله | - | - | - |
updatedSmsTemplates | SmsTemplate[] | بله | - | - | - |
permissions | UserPermission[] | بله | - | - | - |
smsTestRuns | SmsTestRun[] | بله | - | - | - |
recipientSmsTestRuns | SmsTestRun[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:181- User
Role
Prisma model | جدول/collection: Role
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
name | String | بله | - | unique | - |
description | String? | خیر | - | - | - |
isSystem | Boolean | بله | false | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
users | UserRole[] | بله | - | - | - |
permissions | RolePermission[] | بله | - | - | - |
projectUsers | ProjectUser[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:214- Role
Permission
Prisma model | جدول/collection: Permission
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
key | String | بله | - | unique | - |
name | String? | خیر | - | - | - |
description | String? | خیر | - | - | - |
group | String? | خیر | - | - | - |
riskLevel | PermissionRiskLevel | بله | low | - | - |
isSystem | Boolean | بله | true | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
roles | RolePermission[] | بله | - | - | - |
users | UserPermission[] | بله | - | - | - |
projectRolePermissions | ProjectRolePermission[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:226- Permission
UserPermission
Prisma model | جدول/collection: UserPermission
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
userId | String | بله | - | - | - |
permissionId | String | بله | - | - | - |
effect | UserPermissionEffect | بله | allow | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
user | User | بله | - | - | - |
permission | Permission | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:241- UserPermission
UserRole
Prisma model | جدول/collection: UserRole
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
userId | String | بله | - | - | - |
roleId | String | بله | - | - | - |
user | User | بله | - | - | - |
role | Role | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:254- UserRole
RolePermission
Prisma model | جدول/collection: RolePermission
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
roleId | String | بله | - | - | - |
permissionId | String | بله | - | - | - |
role | Role | بله | - | - | - |
permission | Permission | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:265- RolePermission
Project
Prisma model | جدول/collection: Project
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
name | String | بله | - | - | - |
slug | String | بله | - | unique | - |
description | String? | خیر | - | - | - |
status | ProjectStatus | بله | active | - | - |
environment | Environment | بله | staging | - | - |
tags | String[] | بله | [] | - | - |
allowInternalHttpChecks | Boolean | بله | false | - | - |
ownerUserId | String? | خیر | - | - | - |
owner | User? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
users | ProjectUser[] | بله | - | - | - |
domains | ProjectDomain[] | بله | - | - | - |
httpChecks | HttpCheck[] | بله | - | - | - |
httpCheckRuns | HttpCheckRun[] | بله | - | - | - |
servers | Server[] | بله | - | - | - |
serverPingRuns | ServerPingRun[] | بله | - | - | - |
scenarios | Scenario[] | بله | - | - | - |
scenarioRuns | ScenarioRun[] | بله | - | - | - |
manualTestCases | ManualTestCase[] | بله | - | - | - |
manualTestCaseRuns | ManualTestCaseRun[] | بله | - | - | - |
notificationRules | NotificationRule[] | بله | - | - | - |
notificationEvents | NotificationEvent[] | بله | - | - | - |
smsTemplateBindings | SmsTemplateBinding[] | بله | - | - | - |
smsTemplates | SmsTemplate[] | بله | - | - | - |
smsTestRuns | SmsTestRun[] | بله | - | - | - |
auditLogs | AuditLog[] | بله | - | - | - |
previewSnapshots | FrontendPreviewSnapshot[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:274- Project
ProjectUser
Prisma model | جدول/collection: ProjectUser
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String | بله | - | - | - |
userId | String | بله | - | - | - |
roleId | String? | خیر | - | - | - |
projectRoleId | String? | خیر | - | - | - |
assignedByUserId | String? | خیر | - | - | - |
status | ProjectMemberStatus | بله | active | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
project | Project | بله | - | - | - |
user | User | بله | - | - | - |
role | Role? | خیر | - | - | - |
projectRole | ProjectRole? | خیر | - | - | - |
assignedBy | User? | خیر | - | - | - |
منابع کد
backend/prisma/schema.prisma:310- ProjectUser
ProjectRole
Prisma model | جدول/collection: ProjectRole
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
name | String | بله | - | unique | - |
description | String? | خیر | - | - | - |
isSystem | Boolean | بله | false | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
permissions | ProjectRolePermission[] | بله | - | - | - |
members | ProjectUser[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:333- ProjectRole
ProjectRolePermission
Prisma model | جدول/collection: ProjectRolePermission
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
projectRoleId | String | بله | - | - | - |
permissionId | String | بله | - | - | - |
projectRole | ProjectRole | بله | - | - | - |
permission | Permission | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:344- ProjectRolePermission
ProjectDomain
Prisma model | جدول/collection: ProjectDomain
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String | بله | - | - | - |
name | String | بله | - | - | - |
url | String | بله | - | - | - |
type | DomainType | بله | - | - | - |
environment | Environment | بله | - | - | - |
previewDevice | PreviewDevice | بله | auto | - | - |
isActive | Boolean | بله | true | - | - |
expectedStatusCode | Int | بله | 200 | - | - |
healthPath | String? | خیر | - | - | - |
notes | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
project | Project | بله | - | - | - |
snapshots | FrontendPreviewSnapshot[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:354- ProjectDomain
HttpCheck
Prisma model | جدول/collection: HttpCheck
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String | بله | - | - | - |
name | String | بله | - | - | - |
description | String? | خیر | - | - | - |
rawCurl | String? | خیر | - | - | - |
method | String | بله | "GET" | - | - |
url | String | بله | - | - | - |
headers | Json | بله | "{}" | - | - |
queryParams | Json | بله | "{}" | - | - |
body | String? | خیر | - | - | - |
authConfig | Json | بله | "{}" | - | - |
timeoutMs | Int | بله | 10000 | - | - |
retryCount | Int | بله | 0 | - | - |
scheduleType | ScheduleType | بله | manual | - | - |
intervalMinutes | Int? | خیر | - | - | - |
dailyTime | String? | خیر | - | - | - |
cronExpression | String? | خیر | - | - | - |
expectedStatusCode | Int | بله | 200 | - | - |
expectedBodyContains | String? | خیر | - | - | - |
expectedJsonPath | String? | خیر | - | - | - |
expectedJsonValue | String? | خیر | - | - | - |
maxResponseTimeMs | Int? | خیر | - | - | - |
isActive | Boolean | بله | true | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
project | Project | بله | - | - | - |
runs | HttpCheckRun[] | بله | - | - | - |
scenarioSteps | ScenarioStep[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:376- HttpCheck
HttpCheckRun
Prisma model | جدول/collection: HttpCheckRun
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
checkId | String | بله | - | - | - |
projectId | String | بله | - | - | - |
startedAt | DateTime | بله | now( | - | - |
finishedAt | DateTime? | خیر | - | - | - |
durationMs | Int? | خیر | - | - | - |
status | RunStatus | بله | - | - | - |
statusCode | Int? | خیر | - | - | - |
responseHeaders | Json | بله | "{}" | - | - |
responseBodyPreview | String? | خیر | - | - | - |
errorMessage | String? | خیر | - | - | - |
assertionResults | Json | بله | "[]" | - | - |
triggeredBy | String | بله | - | - | - |
triggeredByUserId | String? | خیر | - | - | - |
failureType | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
check | HttpCheck | بله | - | - | - |
project | Project | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:412- HttpCheckRun
Server
Prisma model | جدول/collection: Server
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String | بله | - | - | - |
name | String | بله | - | - | - |
ipAddress | String | بله | - | - | - |
hostname | String? | خیر | - | - | - |
environment | Environment | بله | - | - | - |
description | String? | خیر | - | - | - |
isActive | Boolean | بله | true | - | - |
pingIntervalMinutes | Int | بله | 5 | - | - |
alertAfterFailures | Int | بله | 3 | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
project | Project | بله | - | - | - |
runs | ServerPingRun[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:438- Server
ServerPingRun
Prisma model | جدول/collection: ServerPingRun
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
serverId | String | بله | - | - | - |
projectId | String | بله | - | - | - |
startedAt | DateTime | بله | now( | - | - |
finishedAt | DateTime? | خیر | - | - | - |
status | PingStatus | بله | - | - | - |
latencyMs | Int? | خیر | - | - | - |
packetLoss | Float? | خیر | - | - | - |
checkType | String | بله | "ICMP" | - | - |
errorMessage | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
server | Server | بله | - | - | - |
project | Project | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:460- ServerPingRun
Scenario
Prisma model | جدول/collection: Scenario
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String | بله | - | - | - |
name | String | بله | - | - | - |
description | String? | خیر | - | - | - |
priority | Priority | بله | medium | - | - |
status | ScenarioStatus | بله | draft | - | - |
scheduleType | ScheduleType | بله | manual | - | - |
intervalMinutes | Int? | خیر | - | - | - |
dailyTime | String? | خیر | - | - | - |
cronExpression | String? | خیر | - | - | - |
isActive | Boolean | بله | false | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
project | Project | بله | - | - | - |
steps | ScenarioStep[] | بله | - | - | - |
runs | ScenarioRun[] | بله | - | - | - |
smsTemplates | SmsTemplate[] | بله | - | - | - |
smsTestRuns | SmsTestRun[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:481- Scenario
ScenarioStep
Prisma model | جدول/collection: ScenarioStep
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
scenarioId | String | بله | - | - | - |
order | Int | بله | - | - | - |
name | String | بله | - | - | - |
httpCheckId | String | بله | - | - | - |
continueOnFailure | Boolean | بله | false | - | - |
delayBeforeMs | Int | بله | 0 | - | - |
variableExtractionConfig | Json | بله | "{}" | - | - |
assertionOverrides | Json | بله | "{}" | - | - |
notes | String? | خیر | - | - | - |
scenario | Scenario | بله | - | - | - |
httpCheck | HttpCheck | بله | - | - | - |
stepRuns | ScenarioStepRun[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:507- ScenarioStep
ScenarioRun
Prisma model | جدول/collection: ScenarioRun
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
scenarioId | String | بله | - | - | - |
projectId | String | بله | - | - | - |
startedAt | DateTime | بله | now( | - | - |
finishedAt | DateTime? | خیر | - | - | - |
durationMs | Int? | خیر | - | - | - |
status | ScenarioRunStatus | بله | - | - | - |
triggeredBy | String | بله | - | - | - |
triggeredByUserId | String? | خیر | - | - | - |
summary | Json | بله | "{}" | - | - |
createdAt | DateTime | بله | now( | - | - |
scenario | Scenario | بله | - | - | - |
project | Project | بله | - | - | - |
stepResults | ScenarioStepRun[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:526- ScenarioRun
ScenarioStepRun
Prisma model | جدول/collection: ScenarioStepRun
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
scenarioRunId | String | بله | - | - | - |
scenarioStepId | String | بله | - | - | - |
httpCheckRunId | String? | خیر | - | - | - |
order | Int | بله | - | - | - |
status | RunStatus | بله | - | - | - |
durationMs | Int? | خیر | - | - | - |
assertionResults | Json | بله | "[]" | - | - |
errorMessage | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
scenarioRun | ScenarioRun | بله | - | - | - |
scenarioStep | ScenarioStep | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:548- ScenarioStepRun
ManualTestCase
Prisma model | جدول/collection: ManualTestCase
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String | بله | - | - | - |
title | String | بله | - | - | - |
description | String? | خیر | - | - | - |
preconditions | String? | خیر | - | - | - |
steps | String | بله | - | - | - |
expectedResult | String | بله | - | - | - |
priority | Priority | بله | medium | - | - |
type | ManualTestType | بله | functional | - | - |
status | ManualTestStatus | بله | draft | - | - |
assignedToUserId | String? | خیر | - | - | - |
tags | String[] | بله | [] | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
project | Project | بله | - | - | - |
assignedTo | User? | خیر | - | - | - |
runs | ManualTestCaseRun[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:565- ManualTestCase
ManualTestCaseRun
Prisma model | جدول/collection: ManualTestCaseRun
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
testCaseId | String | بله | - | - | - |
projectId | String | بله | - | - | - |
executedByUserId | String | بله | - | - | - |
executedAt | DateTime | بله | now( | - | - |
result | ManualResult | بله | - | - | - |
actualResult | String? | خیر | - | - | - |
notes | String? | خیر | - | - | - |
evidenceAttachments | Json | بله | "[]" | - | - |
relatedBugUrl | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
testCase | ManualTestCase | بله | - | - | - |
project | Project | بله | - | - | - |
executedBy | User | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:590- ManualTestCaseRun
NotificationChannel
Prisma model | جدول/collection: NotificationChannel
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
name | String | بله | - | - | - |
type | NotificationChannelType | بله | - | - | - |
config | Json | بله | - | - | - |
isActive | Boolean | بله | true | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
deletedAt | DateTime? | خیر | - | - | - |
deliveries | NotificationDelivery[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:611- NotificationChannel
NotificationRule
Prisma model | جدول/collection: NotificationRule
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String? | خیر | - | - | - |
eventType | String | بله | - | - | - |
severity | NotificationSeverity | بله | warning | - | - |
recipientRoles | String[] | بله | [] | - | - |
recipientProjectRoles | String[] | بله | [] | - | - |
recipientUsers | String[] | بله | [] | - | - |
channels | String[] | بله | [] | - | - |
smsEnabled | Boolean | بله | false | - | - |
smsTemplateId | String? | خیر | - | - | - |
sendRecoveryNotifications | Boolean | بله | true | - | - |
isActive | Boolean | بله | true | - | - |
throttleMinutes | Int | بله | 15 | - | - |
quietHours | Json | بله | "{}" | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
project | Project? | خیر | - | - | - |
منابع کد
backend/prisma/schema.prisma:623- NotificationRule
NotificationEvent
Prisma model | جدول/collection: NotificationEvent
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String? | خیر | - | - | - |
eventType | String | بله | - | - | - |
severity | NotificationSeverity | بله | - | - | - |
title | String | بله | - | - | - |
message | String | بله | - | - | - |
payload | Json | بله | "{}" | - | - |
createdAt | DateTime | بله | now( | - | - |
project | Project? | خیر | - | - | - |
deliveries | NotificationDelivery[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:646- NotificationEvent
NotificationDelivery
Prisma model | جدول/collection: NotificationDelivery
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
eventId | String | بله | - | - | - |
channelId | String? | خیر | - | - | - |
channelType | NotificationChannelType? | خیر | - | - | - |
provider | String? | خیر | - | - | - |
recipient | String | بله | - | - | - |
recipientUserId | String? | خیر | - | - | - |
recipientPhoneMasked | String? | خیر | - | - | - |
renderedMessagePreview | String? | خیر | - | - | - |
status | NotificationDeliveryStatus | بله | pending | - | - |
attempts | Int | بله | 0 | - | - |
providerMessageId | String? | خیر | - | - | - |
providerStatusCode | String? | خیر | - | - | - |
providerStatusText | String? | خیر | - | - | - |
requestJsonMasked | Json? | خیر | - | - | - |
responseJsonMasked | Json? | خیر | - | - | - |
errorMessage | String? | خیر | - | - | - |
attemptedAt | DateTime? | خیر | - | - | - |
deliveredAt | DateTime? | خیر | - | - | - |
sentAt | DateTime? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
event | NotificationEvent | بله | - | - | - |
channel | NotificationChannel? | خیر | - | - | - |
منابع کد
backend/prisma/schema.prisma:663- NotificationDelivery
SmsProviderConfig
Prisma model | جدول/collection: SmsProviderConfig
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
provider | SmsProviderType | بله | kavenegar | - | - |
name | String | بله | - | - | - |
apiKeyEncrypted | String | بله | - | - | - |
senderNumber | String? | خیر | - | - | - |
baseUrl | String | بله | "https://api.kavenegar.com/v1" | - | - |
isActive | Boolean | بله | false | - | - |
timeoutMs | Int | بله | 10000 | - | - |
retryCount | Int | بله | 1 | - | - |
lastTestResult | Json? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:696- SmsProviderConfig
SmsTemplate
Prisma model | جدول/collection: SmsTemplate
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
key | String | بله | - | - | - |
name | String | بله | - | - | - |
description | String? | خیر | - | - | - |
eventType | String | بله | - | - | - |
scope | SmsTemplateScope | بله | global | - | - |
projectId | String? | خیر | - | - | - |
scenarioId | String? | خیر | - | - | - |
locale | String | بله | "en" | - | - |
body | String | بله | - | - | - |
variablesSchemaJson | Json | بله | "{}" | - | - |
samplePayloadJson | Json | بله | "{}" | - | - |
isActive | Boolean | بله | false | - | - |
isSystemDefault | Boolean | بله | false | - | - |
version | Int | بله | 1 | - | - |
createdByUserId | String? | خیر | - | - | - |
updatedByUserId | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
createdBy | User? | خیر | - | - | - |
updatedBy | User? | خیر | - | - | - |
project | Project? | خیر | - | - | - |
scenario | Scenario? | خیر | - | - | - |
bindings | SmsTemplateBinding[] | بله | - | - | - |
smsTestRuns | SmsTestRun[] | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:714- SmsTemplate
SmsTestRun
Prisma model | جدول/collection: SmsTestRun
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
testType | SmsTestRunType | بله | - | - | - |
eventType | String? | خیر | - | - | - |
projectId | String? | خیر | - | - | - |
scenarioId | String? | خیر | - | - | - |
templateId | String? | خیر | - | - | - |
initiatedByUserId | String | بله | - | - | - |
recipientUserId | String? | خیر | - | - | - |
manualPhoneMasked | String? | خیر | - | - | - |
mode | SmsTestRunMode | بله | dry_run | - | - |
status | SmsTestRunStatus | بله | - | - | - |
renderedMessagePreview | String? | خیر | - | - | - |
requestJsonMasked | Json? | خیر | - | - | - |
responseJsonMasked | Json? | خیر | - | - | - |
resultJson | Json | بله | "{}" | - | - |
warningsJson | Json | بله | "[]" | - | - |
errorMessage | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
project | Project? | خیر | - | - | - |
scenario | Scenario? | خیر | - | - | - |
template | SmsTemplate? | خیر | - | - | - |
initiatedBy | User | بله | - | - | - |
recipientUser | User? | خیر | - | - | - |
منابع کد
backend/prisma/schema.prisma:749- SmsTestRun
SmsTemplateBinding
Prisma model | جدول/collection: SmsTemplateBinding
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String? | خیر | - | - | - |
eventType | String | بله | - | - | - |
severity | NotificationSeverity? | خیر | - | - | - |
smsTemplateId | String | بله | - | - | - |
isActive | Boolean | بله | true | - | - |
priority | Int | بله | 100 | - | - |
createdAt | DateTime | بله | now( | - | - |
updatedAt | DateTime | بله | - | - | - |
project | Project? | خیر | - | - | - |
smsTemplate | SmsTemplate | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:785- SmsTemplateBinding
AuditLog
Prisma model | جدول/collection: AuditLog
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
actorUserId | String? | خیر | - | - | - |
actorType | ActorType | بله | system | - | - |
action | String | بله | - | - | - |
entityType | String | بله | - | - | - |
entityId | String? | خیر | - | - | - |
projectId | String? | خیر | - | - | - |
beforeJson | Json? | خیر | - | - | - |
afterJson | Json? | خیر | - | - | - |
metadataJson | Json? | خیر | - | - | - |
ipAddress | String? | خیر | - | - | - |
userAgent | String? | خیر | - | - | - |
createdAt | DateTime | بله | now( | - | - |
actor | User? | خیر | - | - | - |
project | Project? | خیر | - | - | - |
منابع کد
backend/prisma/schema.prisma:804- AuditLog
AppSetting
Prisma model | جدول/collection: AppSetting
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
key | String | بله | - | unique | - |
value | Json | بله | - | - | - |
isSecret | Boolean | بله | false | - | - |
description | String? | خیر | - | - | - |
updatedAt | DateTime | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:828- AppSetting
Attachment
Prisma model | جدول/collection: Attachment
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
fileName | String | بله | - | - | - |
mimeType | String | بله | - | - | - |
sizeBytes | Int | بله | - | - | - |
storageKey | String | بله | - | - | - |
createdAt | DateTime | بله | now( | - | - |
منابع کد
backend/prisma/schema.prisma:837- Attachment
FrontendPreviewSnapshot
Prisma model | جدول/collection: FrontendPreviewSnapshot
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
id | String | بله | cuid( | id | - |
projectId | String | بله | - | - | - |
domainId | String | بله | - | - | - |
url | String | بله | - | - | - |
status | String | بله | - | - | - |
imageUrl | String? | خیر | - | - | - |
metadata | Json | بله | "{}" | - | - |
createdAt | DateTime | بله | now( | - | - |
project | Project | بله | - | - | - |
domain | ProjectDomain | بله | - | - | - |
منابع کد
backend/prisma/schema.prisma:846- FrontendPreviewSnapshot
LogoutDto
DTO / Schema | جدول/collection: نیازمند بررسی انسانی
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
refreshToken | string | خیر | - | - | - |
منابع کد
backend/src/auth/auth.dto.ts:32- LogoutDto
UpdateUserDto
DTO / Schema | جدول/collection: نیازمند بررسی انسانی
| Field | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
email | string | خیر | - | - | - |
منابع کد
backend/src/users/users.dto.ts:27- UpdateUserDto