using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FMSAdmin.Entities {
    public partial class BemsNoticePriceBase {
        public BemsNoticePriceBase() {
            BemsNoticePriceDetail = new HashSet<BemsNoticePriceDetail>();
        }

        [Key]
        public int SiteId { get; set; }
        [Key]
        public short FuelTypeId { get; set; }
        [Key]
        [Column(TypeName = "date")]
        public DateTime ApplyDate { get; set; }
        [Key]
        public short ContractType { get; set; }
        public int? PrimaryPrice { get; set; }
        public int? SecondaryPrice { get; set; }

        [ForeignKey("SiteId,FuelTypeId,ApplyDate")]
        public virtual BemsNoticePrice BemsNoticePrice { get; set; }
        [ForeignKey("FuelTypeId,ContractType")]
        public virtual BemsNoticePriceContractType BemsNoticePriceContractType { get; set; }
        [InverseProperty("BemsNoticePriceBase")]
        public virtual ICollection<BemsNoticePriceDetail> BemsNoticePriceDetail { get; set; }
    }
}
