using SQLite;
using System.Text.Json.Serialization;

namespace salesbook.Shared.Core.Entity;

[Table("stb_activity")]
public class StbActivity
{
    [PrimaryKey, Column("activity_id"), JsonPropertyName("activityId")]
    public string? ActivityId { get; set; }

    [Column("activity_result_id"), JsonPropertyName("activityResultId")]
    public string? ActivityResultId { get; set; }

    [Column("activity_type_id"), JsonPropertyName("activityTypeId")]
    public string? ActivityTypeId { get; set; }

    [Column("data_ins_act"), JsonPropertyName("dataInsAct")]
    public DateTime DataInsAct { get; set; } = DateTime.Now;

    [Column("activity_description"), JsonPropertyName("activityDescription")]
    public string? ActivityDescription { get; set; }

    [Column("parent_activity_id"), JsonPropertyName("parentActivityId")]
    public string? ParentActivityId { get; set; }

    [Column("tipo_anag"), JsonPropertyName("tipoAnag")]
    public string? TipoAnag { get; set; }

    [Column("cod_anag"), JsonPropertyName("codAnag")]
    public string? CodAnag { get; set; }

    [Column("cod_jcom"), JsonPropertyName("codJcom")]
    public string? CodJcom { get; set; }

    [Column("cod_jfas"), JsonPropertyName("codJfas")]
    public string? CodJfas { get; set; }

    [Column("estimated_date"), JsonPropertyName("estimatedDate")]
    public DateTime? EstimatedDate { get; set; }

    [Column("estimated_time"), JsonPropertyName("estimatedTime")]
    public DateTime? EstimatedTime { get; set; }

    [Column("alarm_date"), JsonPropertyName("alarmDate")]
    public DateTime? AlarmDate { get; set; }

    [Column("alarm_time"), JsonPropertyName("alarmTime")]
    public DateTime? AlarmTime { get; set; }

    [Column("effective_date"), JsonPropertyName("effectiveDate")]
    public DateTime? EffectiveDate { get; set; }

    [Column("effective_time"), JsonPropertyName("effectiveTime")]
    public DateTime? EffectiveTime { get; set; }

    [Column("result_description"), JsonPropertyName("resultDescription")]
    public string? ResultDescription { get; set; }

    [Column("estimated_enddate"), JsonPropertyName("estimatedEnddate")]
    public DateTime? EstimatedEnddate { get; set; }

    [Column("estimated_endtime"), JsonPropertyName("estimatedEndtime")]
    public DateTime? EstimatedEndtime { get; set; }

    [Column("effective_enddate"), JsonPropertyName("effectiveEnddate")]
    public DateTime? EffectiveEnddate { get; set; }

    [Column("effective_endtime"), JsonPropertyName("effectiveEndtime")]
    public DateTime? EffectiveEndtime { get; set; }

    [Column("user_creator"), JsonPropertyName("userCreator")]
    public string? UserCreator { get; set; }

    [Column("user_name"), JsonPropertyName("userName")]
    public string? UserName { get; set; }

    [Column("perc_comp"), JsonPropertyName("percComp")]
    public double? PercComp { get; set; } = 0;

    [Column("estimated_hours"), JsonPropertyName("estimatedHours")]
    public double? EstimatedHours { get; set; } = 0;

    [Column("cod_mart"), JsonPropertyName("codMart")]
    public string? CodMart { get; set; }

    [Column("partita_mag"), JsonPropertyName("partitaMag")]
    public string? PartitaMag { get; set; }

    [Column("matricola"), JsonPropertyName("matricola")]
    public string? Matricola { get; set; }

    [Column("priorita"), JsonPropertyName("priorita")]
    public int? Priorita { get; set; } = 0;

    [Column("activity_play_counter"), JsonPropertyName("activityPlayCounter")]
    public double? ActivityPlayCounter { get; set; } = 0;

    [Column("activity_event"), JsonPropertyName("activityEvent")]
    public string? ActivityEvent { get; set; }

    [Column("guarantee"), JsonPropertyName("guarantee")]
    public string? Guarantee { get; set; }

    [Column("note"), JsonPropertyName("note")]
    public string? Note { get; set; }

    [Column("rfid"), JsonPropertyName("rfid")]
    public string? Rfid { get; set; }

    [Column("id_lotto"), JsonPropertyName("idLotto")]
    public int? IdLotto { get; set; }

    [Column("persona_rif"), JsonPropertyName("personaRif")]
    public string? PersonaRif { get; set; }

    [Column("hr_num"), JsonPropertyName("hrNum")]
    public int? HrNum { get; set; }

    [Column("gestione"), JsonPropertyName("gestione")]
    public string? Gestione { get; set; }

    [Column("data_ord"), JsonPropertyName("dataOrd")]
    public DateTime? DataOrd { get; set; }

    [Column("num_ord"), JsonPropertyName("numOrd")]
    public int? NumOrd { get; set; }

    [Column("id_step"), JsonPropertyName("idStep")]
    public int? IdStep { get; set; }

    [Column("id_riga"), JsonPropertyName("idRiga")]
    public int? IdRiga { get; set; }

    [Column("ora_ins_act"), JsonPropertyName("oraInsAct")]
    public DateTime? OraInsAct { get; set; }

    [Column("indice_gradimento"), JsonPropertyName("indiceGradimento")]
    public decimal? IndiceGradimento { get; set; } = 0;

    [Column("note_gradimento"), JsonPropertyName("noteGradimento")]
    public string? NoteGradimento { get; set; }

    [Column("flag_risolto"), JsonPropertyName("flagRisolto")]
    public string? FlagRisolto { get; set; } = "N";

    [Column("flag_tipologia"), JsonPropertyName("flagTipologia")]
    public string? FlagTipologia { get; set; }

    [Ignore, JsonPropertyName("oreRapportino")]
    public decimal? OreRapportino { get; set; }

    [Column("user_modifier"), JsonPropertyName("userModifier")]
    public string? UserModifier { get; set; }

    [Column("ora_mod_act"), JsonPropertyName("oraModAct")]
    public DateTime? OraModAct { get; set; } = DateTime.Now;

    [Column("ora_view_act"), JsonPropertyName("oraViewAct")]
    public DateTime? OraViewAct { get; set; }

    [Column("cod_vdes"), JsonPropertyName("codVdes")]
    public string? CodVdes { get; set; }

    [Column("cod_cmac"), JsonPropertyName("codCmac")]
    public string? CodCmac { get; set; }

    [Column("wrike_id"), JsonPropertyName("wrikeId")]
    public string? WrikeId { get; set; }

    [Column("cod_mgrp"), JsonPropertyName("codMgrp")]
    public string? CodMgrp { get; set; }

    [Column("plan_id"), JsonPropertyName("planId")]
    public long? PlanId { get; set; }
}