Skip to main content
The PersonDocument entity represents the association between a person and their documents in the Well system. It serves as a Many-to-Many linking table allowing a person to have multiple documents and a document to be associated with multiple people.

Table structure

Table name: person_documents

Main fields

NameTypeRequiredConstraintsAllowed ValuesDescriptionExample
idstring, UUID, πŸ”’ systemβœ… YesUnique identifier (read-only)–Unique identifier of the person-document relationship”person-document-uuid-123”
personPeople (UUID)βœ… YesForeign key reference–Reference to the person”person-uuid-456”
documentDocument (UUID)βœ… YesForeign key reference–Reference to the document”document-uuid-789”
created_atstring (ISO 8601) πŸ”’ system–auto timestamp–Creation timestamp”2023-01-01T12:00:00Z”
updated_atstring (ISO 8601) πŸ”’ system–auto timestamp–Last updated timestamp”2024-01-01T12:00:00Z”
deleted_atstring | null πŸ”’ systemβšͺ Nonullable ISO 8601–Deletion timestamp (soft delete)β€œ2024-01-01T12:00:00Z”

Relations

Many-to-One relations

  • People: The person who owns the document
  • Document: The associated document

Relationship schema

PersonDocument (N) ←→ (1) People
PersonDocument (N) ←→ (1) Document

# Enables Many-to-Many relationship:
People (N) ←→ (N) Document via PersonDocument
⌘I