Appearance
dbo.primeAttachment
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeAttachment.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | id | uniqueidentifier | no | Primary key / unique identifier for this record | |
| 2 | description | text(16) | yes | Free-text description | |
| 3 | file_name | varchar(255) | no | Original file name of the uploaded attachment | |
| 4 | attachmentTypeId | uniqueidentifier | yes | Foreign key to primeAttachmentType | |
| 5 | attachmentStatus | varchar(50) | no | Status of the attachment upload/processing | |
| 6 | mimeType | varchar(50) | no | MIME content type of the file | |
| 7 | size | int | yes | File size in bytes | |
| 8 | url | text(16) | yes | URL/link to the resource | |
| 9 | objectId | uniqueidentifier | yes | Identifier of the related object this record applies to | |
| 10 | objectType | varchar(50) | no | Type of the related object this record applies to (e.g. Job, Contact) | |
| 11 | createdAt | datetime | yes | Timestamp the record was created | |
| 12 | createdBy | varchar(100) | yes | User/system that created the record | |
| 13 | version | int | yes | Optimistic-concurrency row version number |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__primeAtt__3213E83F2D83DD90 | CLUSTERED | yes | yes | id | ||
| IX_primeAttachment_attachmentTypeId_objectId | NONCLUSTERED | attachmentTypeId, objectId | ||||
| IX_primeAttachment_attachmentTypeId | NONCLUSTERED | attachmentTypeId, file_name | createdAt, objectId, objectType |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.primeAttachment.attachmentTypeId | dbo.primeAttachmentType.id | high |
| dbo.primeAttachment.objectId | dbo.primeJobs.Id | medium |
Referenced by
Procedures: dbo.spPrimeGetAttachmentInformation, dbo.spPrimeGetJobAttachments, dbo.spPrimeUpsertAttachments

