This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
OutlookAddin/src/OutlookAddin.Core/Models/CaseEntity.cs
T
PointStar b6624a924f feat(save-attachments): show case#, court#, status in candidate picker
Replace the single-line ListBox with a DataGrid (case number, name,
court case number, status) so users disambiguate same-named cases
(e.g. two "שלומוב זויה" cases). Hydrates each search hit via
GET /Case/{id}?select=id,name,number,status,cCourtCaseNumber in
parallel so columns populate without an extra click. CourtCaseNumber
is mapped to the EspoCRM custom field cCourtCaseNumber.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 15:51:15 +03:00

50 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using MarcusLaw.OutlookAddin.Core.Json;
namespace MarcusLaw.OutlookAddin.Core.Models
{
public sealed class CaseEntity
{
[JsonPropertyName("id")]
public string Id { get; set; } = string.Empty;
[JsonPropertyName("name")]
public string? Name { get; set; }
// EspoCRM serializes the case number as a JSON number on some
// installs (auto-increment column) and as a string on others
// (custom case-code formatter). Accept both.
[JsonPropertyName("number")]
[JsonConverter(typeof(FlexibleStringConverter))]
public string? Number { get; set; }
[JsonPropertyName("status")]
public string? Status { get; set; }
// Marcus-Law custom field on Case — court file/docket number.
// Field name guessed from EspoCRM "c-prefixed PascalCase" convention;
// adjust if the admin used a different name.
[JsonPropertyName("cCourtCaseNumber")]
[JsonConverter(typeof(FlexibleStringConverter))]
public string? CourtCaseNumber { get; set; }
[JsonPropertyName("accountId")]
public string? AccountId { get; set; }
[JsonPropertyName("contactsIds")]
public List<string> ContactsIds { get; set; } = new List<string>();
[JsonPropertyName("createdAt")]
public DateTimeOffset? CreatedAt { get; set; }
// Set by Marcus-Law's NetworkStorageIntegration hook on first
// Document save. Empty until a document has been written through
// EspoCRM. When empty we compute it client-side from number +
// primary contact name.
[JsonPropertyName("networkStorageFolderPath")]
public string? NetworkStorageFolderPath { get; set; }
}
}