using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System.ComponentModel.DataAnnotations.Schema;

namespace Marco.Pms.Model.DocumentManager
{
    public class AttachmentVersionMapping : TenantRelation
    {
        public Guid Id { get; set; }
        public Guid ParentAttachmentId { get; set; }

        [ValidateNever]
        [ForeignKey("ParentAttachmentId")]
        public DocumentAttachment? ParentAttachment { get; set; }
        public int Version { get; set; } = 1;

        public Guid ChildAttachmentId { get; set; }
        [ValidateNever]
        [ForeignKey("ChildAttachmentId")]
        public DocumentAttachment? ChildAttachment { get; set; }
    }
}
