Skip to content

Data Definition Document: Community Properties

Domain: Community (governance, occupancy, registry, financials) Logical Sub-Domain: Properties (Assets & Occupancy) Physical Packages: @sd/mod-community/assets, @sd/mod-community/occupancy Related Documents: Process Blueprint Context: This document defines the Data Structures for the Physical Graph and Resident Tenure. Source: packages/modules/community/src/{assets,occupancy}/schema.ts

0. Entity Relationship Diagram (ERD)

erDiagram
    ASSET ||--o{ ASSET : "contains (parent/child)"
    ASSET ||--o{ OCCUPANCY : "houses"
    USER ||--o{ OCCUPANCY : "holds"

    ASSET {
        string id PK
        string identifier "Unit Number"
        enum type "unit, building, amenity"
        json attributes "sqFt, beds"
    }

    OCCUPANCY {
        string id PK
        string unitId FK
        string identityId FK
        enum role "resident_owner, tenant"
        enum status "active, historic"
        date start
        date end
    }

1. Primary Entities

Entity: Asset

A physical object or space tracked by the system.

Field Type Required Description
id string Yes Unique ID.
identifier string Yes Canonical Code (SD-B-301).
type string Yes Enum: unit, building, floor, amenity.
parentId string No ID of the container asset.
attributes json No Physical specs (sqFt, bedrooms).
status string Yes active, maintenance, decommissioned.

Entity: Occupancy

A period of time a person resides in a space.

Field Type Required Description
id string Yes Unique ID.
unitId string Yes The physical Asset.
identityId string Yes The Registry Member.
role string Yes resident_owner, tenant_long, short_term_guest.
status string Yes active, historic, pending.
accessLevel string Yes full (Owner), restricted (Tenant).
effectiveDates range Yes Start and End timestamps.
leaseId string No Link to Contract if applicable.

4. Changelog

Date Author Description Reference
2026-01-24 Antigravity Initial creation Implementation Plan