using System.Text.Json.Serialization;
using e_suite.Database.Core.Models;
using eSuite.Core.Miscellaneous;

namespace e_suite.API.Common.models;

public class ReadFormInstance : IGeneralId
{
    [JsonPropertyName("id")]
    public long Id { get; set; }

    [JsonPropertyName("guid")]
    public Guid Guid { get; set; }

    [JsonPropertyName("templateId")]
    public GeneralIdRef TemplateId { get; set; } = null!;

    [JsonPropertyName("version")]
    public long Version { get; set; }

    [JsonPropertyName("name")]
    public string Name { get; set; } = string.Empty;

    [JsonPropertyName("definition")]
    public string Definition { get; set; } = string.Empty;

    [JsonPropertyName("customFieldValues")]
    public List<CustomFieldValues> CustomFieldValues { get; set; } = [];

    [JsonPropertyName("customFieldDefinitions")]
    public List<CustomFieldDefinition> CustomFieldDefinitions { get; set; } = null!;

    [JsonPropertyName("updatedVersion")]
    public long UpdatedVersion { get; set; }
}