Skip to content

Destinet Real Estate Model Documentation

Welcome to the documentation for the real estate models in Destinet.

Overview

This documentation describes a modern, modular object model system designed to handle all aspects of real estate data - from individual properties to large housing projects, departments, and employees.

Blog

Read the latest blog post

What's New?

We've built a clean, maintainable architecture that:

  • Works with real estate systems (Vitec, or future systems)
  • Uses international English naming with clear documentation
  • Modular architecture - One class per file following C# best practices
  • Shared components - Reusable classes (Address, Image, Showing, etc.)
  • Comprehensive models - Estate, Project, Department, Employee
  • Type safety with integer enums from source systems
  • Full XML documentation for IntelliSense support

Quick Start

Working with Properties

// Creating a new estate listing
var estate = new Estate
{
    Id = "3221523",
    AssignmentNum = "110250256",
    Heading = "Lekker 3-roms leilighet i sentrum",
    DepartmentId = 3005093,
    Origin = "Vitec",

    // Classification (int enums from Vitec)
    EstateBaseType = 1,           // Detached/Residential
    AssignmentTypeGroup = 1,      // Sale
    Ownership = 1,                // Cooperative
    Status = 2,                   // ForSale

    Address = new Address
    {
        Street = "Storgata 10",
        ZipCode = "0155",
        City = "Oslo",
        Municipality = "Oslo"
    },

    GeoCoordinates = new GeoCoordinates
    {
        Latitude = 59.9139m,
        Longitude = 10.7522m
    },

    // Property details
    NoOfRooms = 3,
    NoOfBedRooms = 2,
    NoOfBathRooms = 1,

    EstateSize = new EstateSize
    {
        PRom = 70.0m,  // P-ROM (Primary room area)
        Bra = 95.5m    // BRA (Total usable area)
    },

    EstatePrice = new EstatePrice
    {
        PriceSuggestion = 4500000,
        CollectiveDebt = 250000
    },

    // Brokers
    BrokersIdWithRoles = new List<BrokerWithRole>
    {
        new BrokerWithRole { EmployeeId = "3006722", BrokerRole = 1 }
    }
};

Working with Projects

// Creating a new housing project
var project = new Project
{
    Id = "PROJ-2024-001",
    Name = "Sørbyhaugen",
    Developer = "Veidekke Entreprenør AS",
    TotalUnits = 120,

    Address = new Address
    {
        Street = "Sørbyveien 10",
        ZipCode = "7031",
        City = "Trondheim"
    },

    // Department and employee references
    DepartmentId = "3005093",
    PrimaryAgentId = "3006722",

    Phases = new List<Phase>
    {
        new Phase { Id = "FASE-1", Name = "Fase 1", TotalUnits = 50 }
    },

    Buildings = new List<Building>
    {
        new Building { Id = "BYGG-A", Name = "Bygg A", PhaseId = "FASE-1" }
    }
};

Model Documentation

Estate Model

Individual property listings - apartments, houses, commercial properties.

Project Model

New construction projects with multiple phases, buildings, and units.

  • Overview - Introduction to housing projects
  • Field Reference - Complete field documentation
  • Supports multi-phase projects with complex building structures
  • Connects to individual Estate units via references

Department Model

Real estate departments and offices.

Employee Model

Individual real estate employees/brokers and their details.

Shared Classes

Reusable components used across all models.

Implementation Guides

Architecture Highlights

Modular Design

/models
  /shared/          → Reusable classes (Address, Image, Showing, etc.)
  /estate/          → Estate + related classes (BrokerWithRole, EstateSize, etc.)
  /project/         → Project + Phase + Building classes
  /department/      → Department class
  /employee/        → Employee class

Data Relationships

Estate ─────┬──→ Address (shared)
            ├──→ GeoCoordinates (shared)
            ├──→ Matrikkel[] (shared)
            ├──→ EnergyRating (shared)
            ├──→ EstateSize
            ├──→ EstatePrice
            ├──→ PartOwnership
            ├──→ ImageCollection (shared)
            ├──→ DocumentCollection (shared)
            ├──→ PropertyLink[] (shared)
            ├──→ Showing[] (shared)
            ├──→ DescriptionSection[] (shared)
            ├──→ ExternalPlatformUrls (shared)
            ├──→ DepartmentId → Department
            ├──→ BrokersIdWithRoles[] → Employee references
            └──→ ProjectId → Project (optional reference)

Project ────┬──→ Address (shared)
            ├──→ GeoCoordinates (shared)
            ├──→ Phase[]
            ├──→ Building[] ──→ Address (shared)
            ├──→ ImageCollection (shared)
            ├──→ DocumentCollection (shared)
            ├──→ DescriptionSection[] (shared)
            ├──→ ExternalPlatformUrls (shared)
            ├──→ DepartmentId → Department
            ├──→ PrimaryAgentId → Employee
            └──→ AdditionalAgentIds[] → Employee references

Department ─┬──→ Address (shared)
            ├──→ ImageCollection (shared)
            ├──→ ManagingDirectorIds[] → Employee references
            ├──→ DepartmentManagerIds[] → Employee references
            └──→ ResponsibleBrokerIds[] → Employee references

Employee ───┬──→ ImageCollection (shared)
            └──→ DepartmentIds[] → Department references

Key Design Principles

  1. References Over Embedding - Department and Employee data is referenced by ID, not embedded
  2. Shared Classes - Address, Image, and other common classes are reused
  3. Integer Enums - Property types, statuses stored as int enums from source system (Vitec)
  4. Multi-Endpoint Population - Images, Documents, Links fetched from separate endpoints
  5. Normalized Architecture - Update once, reflect everywhere

Contributing

This documentation is maintained alongside the codebase. If you find errors or have suggestions, please contact the development team.


Last Updated: November 4, 2025