// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FloraMultiPlatformFrontend.Data.Entities;

[Table("AverageTags")]
public class AverageTag
{
    [Key]
    public int Id { get; set; }

    public int TagId { get; set; }

    [Column(TypeName = "decimal(18,6)")]
    public decimal Average { get; set; }

    public int AdvanceNumber { get; set; }

    public DateTime CreatedAt { get; set; }
}

[Table("AdvanceRings")]
public class AdvanceRing
{
    [Key]
    public int Id { get; set; }

    public int AdvanceNumber { get; set; }

    public DateTime AdvanceStart { get; set; }

    public DateTime AdvanceEnd { get; set; }

    public int RingNumber { get; set; }

    [Column(TypeName = "decimal(18,6)")]
    public decimal Chainage { get; set; }
}

[Table("AValueData")]
public class AValueData
{
    [Key]
    [Column("RowId")]
    public int Id { get; set; }

    [Column("ID")]
    public int TagId { get; set; }

    public double TagValue { get; set; }

    public DateTime TagTime { get; set; }
}

[Table("AdvanceTimes")]
public class AdvanceTime
{
    [Key]
    public int Id { get; set; }

    public int AdvanceNumber { get; set; }

    public DateTime AdvanceStart { get; set; }

    public DateTime AdvanceEnd { get; set; }
}

[Table("CachedStateErrors")]
public class CachedStateError
{
    [Key]
    [Column("RowId")]
    public int Id { get; set; }

    public string MachineCode { get; set; } = string.Empty;

    [Column("ID")]
    public int TagId { get; set; }

    public DateTime TagTime { get; set; }

    public bool TagValue { get; set; }
}

[Table("CachedSurveyorData")]
public class CachedSurveyorData
{
    [Key]
    [Column("RowId")]
    public int Id { get; set; }

    public string MachineCode { get; set; } = string.Empty;

    public string TableName { get; set; } = string.Empty;

    [Column("ID")]
    public int TagId { get; set; }

    public DateTime TagTime { get; set; }

    public double TagValue { get; set; }
}
