// src/Elecciones.Database/Entities/ResumenVoto.cs
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Elecciones.Database.Entities;

public class ResumenVoto
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int Id { get; set; }

    [Required]
    public int AmbitoGeograficoId { get; set; }

    [Required]
    public int CategoriaId { get; set; }

    [Required]
    public string AgrupacionPoliticaId { get; set; } = null!;

    [ForeignKey("AgrupacionPoliticaId")]
    public AgrupacionPolitica AgrupacionPolitica { get; set; } = null!;

    [Required]
    public long Votos { get; set; }

    [Required]
    public decimal VotosPorcentaje { get; set; }
    
    public int EleccionId { get; set; }
}