Skip to content

Project Model Overview

The Project is a master entity in the Destinet model, representing a new construction project (e.g., apartment complexes or row houses). Data for this entity is stored in its own collection/table.

Individual units (apartments/houses) within the project are linked to this model via the ProjectId field in the Estate model.

Design Principles


1. Focus on Project Hierarchy

The model is designed to structure complex projects through nested elements, representing the physical and sales organization:

  • Phases: Represents sales or construction stages.
  • Buildings: Represents individual buildings within those phases.

2. Clear Accountability and Timeline Tracking

The model stores essential information to identify the project's ownership and progress:

  • Developer and DeveloperWebsite track responsibility.
  • ConstructionStarted, ConstructionStartDate, and ExpectedCompletionDate provide timeline status.
  • Employee/Department IDs link the project directly to the responsible brokerage and primary employee.

3. Usage of Shared Classes

The model reuses central, shared classes for standardized data fields, aligning with the architectural principle of modularity:

  • Address (for the project's main location).
  • GeoCoordinates (for map display).
  • Image (for project and phase renderings).
  • PropertyDocument (for sales prospectus and documentation).
  • DescriptionSection (for structured marketing content).
  • ExternalPlatformUrls (for external platform URLs).

4. Flexible Content Storage

The use of dynamic structures allows for flexible management of varied marketing content:

  • Features: A Dictionary<string, string> to store key amenities/facilities like "Elevator", "Underground Parking", "Balcony Size".
  • DescriptionSections: For structuring marketing text about location, amenities, and similar details.

Core Structure


public class Project
{
    // Identification and Details
    public string Id { get; set; }
    public string? ParentProjectId { get; set; }
    public string Name { get; set; }
    public int? Status { get; set; }
    public DateTime? CreatedDate { get; set; }
    public DateTime? LastModifiedOrigin { get; set; }
    public DateTime? LastModifiedLocal { get; set; }

    // Developer & Seller
    public string? SellerId { get; set; }
    public string? Developer { get; set; }
    public string? DeveloperWebsite { get; set; }

    // Description
    public string? Description { get; set; }
    public List<DescriptionSection>? DescriptionSections { get; set; }
    public string? Website { get; set; }

    // Location
    public Address? Address { get; set; }
    public GeoCoordinates? Coordinates { get; set; }

    // Timeline & Construction
    public DateTime? ExpectedCompletionDate { get; set; }
    public bool? ConstructionStarted { get; set; }
    public DateTime? ConstructionStartDate { get; set; }
    public ProjectLifecycleStatus? LifecycleStatus { get; set; }

    // Units & Capacity
    public int? TotalUnits { get; set; }

    // Structure
    public List<Phase>? Phases { get; set; }
    public List<Building>? Buildings { get; set; }

    // Media & Links
    public ExternalPlatformUrls? ExternalPlatformUrls { get; set; }
    public ImageCollection? Images { get; set; }
    public DocumentCollection? Documents { get; set; }

    // Features
    public Dictionary<string, string>? Features { get; set; }

    // Agent/Department References
    public string? DepartmentId { get; set; }
    public string? PrimaryAgentId { get; set; }
    public List<string>? AdditionalAgentIds { get; set; }

    // External System Integration
    public string? Origin { get; set; }
    public Dictionary<string, object>? CustomData { get; set; }
}

Nested Classes


Phase

Represents a sales or construction stage.

public class Phase
{
    public string Id { get; set; }
    public string Name { get; set; }
    public int? PhaseNumber { get; set; }
    public string Status { get; set; }
    public int? TotalUnits { get; set; }
    public int? AvailableUnits { get; set; }
    public DateTime? ExpectedStartDate { get; set; }
    public DateTime? ExpectedCompletionDate { get; set; }
    public string Description { get; set; }
    public ImageCollection Images { get; set; }
    public DocumentCollection Documents { get; set; }
}

Building

Represents an individual building structure within a project.

public class Building
{
    public string Id { get; set; }
    public string Name { get; set; }
    public string PhaseId { get; set; }       // Link to Phase
    public string BuildingType { get; set; }
    public int? NumberOfFloors { get; set; }
    public int? NumberOfEntrances { get; set; }
    public int? TotalUnits { get; set; }
    public int? AvailableUnits { get; set; }
    public string Status { get; set; }
    public DateTime? ExpectedCompletionDate { get; set; }
    public string Description { get; set; }
    public Address Address { get; set; }      // Specific address
    public ImageCollection Images { get; set; }
    public DocumentCollection Documents { get; set; }
}

For detailed documentation of Phase and Building classes with complete property tables, examples, and use cases, see Project Classes.

Relationship to Other Models

Project → Department (Many-to-One)

// Projects reference the department handling them
project.DepartmentId = "3005093";

// Find all projects for a department
var departmentProjects = projects.Where(p => p.DepartmentId == "3005093");

Project → Employee (Many-to-Many)

// Projects reference employees
project.PrimaryAgentId = "3006722";
project.AdditionalAgentIds = new List<string> { "3006723", "3006724" };

// Find all projects for an employee
var employeeProjects = projects.Where(p =>
    p.PrimaryAgentId == "3006722" ||
    p.AdditionalAgentIds.Contains("3006722")
);

Project → Estate (One-to-Many)

// Individual units/estates reference the project
estate.ProjectId = "PROJ-2024-001";

// Find all units in a project
var projectUnits = estates.Where(e => e.ProjectId == "PROJ-2024-001");

Shared Classes

These classes are shared across Estate, Project, Department, Employee, and other models. Full documentation is available in the Shared Classes section.

Next Steps