using SQLite;

namespace MauiAppStock.Models
{
    public class MouvementStock
    {
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }
        
        public int PieceId { get; set; }
        
        public DateTime DateMouvement { get; set; }
        
        public TypeMouvement Type { get; set; }
        
        public int Quantite { get; set; }  // Number of parts moved
        
        public string? Commentaire { get; set; }
        
        [Ignore]
        public string NomPiece { get; set; }

        [Ignore]
        public bool HasComment => !string.IsNullOrWhiteSpace(Commentaire);
    }
    
    public enum TypeMouvement
    {
        EntreeStock,      // Parts entering stock (purchase)
        SortieReparation // Parts used for repair
    }
} 