using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using isnd.Data.Packages;
using isnd.Data.Packages.Catalog;

namespace isnd.Data.Historic
{
    public class PackageVersionCommit
    {
        public long CommitId { get; set; }

        [StringLength(1024)]
        public string PackageId { get; set; }

        [StringLength(256)]
        public string FullString { get; set; }

        [StringLength(256)]

        public string PackageType { get; set; }
        
        [ForeignKey("CommitId")]
        public virtual Commit Commit { get; set; }
        
        [ForeignKey("PackageId")]
        public virtual Package Package { get; set; }
        
        [ForeignKey("PackageId,FullString,PackageType")]
        public virtual PackageVersion PackageVersion { get; set; }
    }
}