| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using UnivateProperties_API.Containers.Timeshare;
using UnivateProperties_API.Model.ProcessFlow;
using UnivateProperties_API.Model.Region;
using UnivateProperties_API.Model.Users;
namespace UnivateProperties_API.Model.Timeshare
{
    public class TimeshareWeek : BaseEntity
    {
        TimeshareWeek()
        {
        }
        TimeshareWeek(WeekDto week)
        {
            ReferedByAgent = week.ReferedByAgent;
            AgentAsRep = false;
            ResortCode = week.Resort.ResortCode;
            ResortName = week.Resort.ResortName;
            RegionId = week.Region.Id;
            Bedrooms = week.Bedrooms;
            MaxSleep = week.MaxSleep;
            UnitNumber = week.UnitNumber;
        }
        #region Properties
        public bool ReferedByAgent { get; set; }
        [ForeignKey("Agent")]
        public int? AgentId { get; set; }
        [ForeignKey("Agency")]
        public int? AgencyId { get; set; }
        [ForeignKey("Owner")]
        public int OwnerId { get; set; }
        public bool AgentAsRep { get; set; }
        public bool OtherResort { get; set; }
        public string OtherResortName { get; set; }
        public string ResortCode { get; set; }
        public string ResortName { get; set; }
        [ForeignKey("Region")]
        public int RegionId { get; set; }
        public string Season { get; set; }
        public string Module { get; set; }
        public int Bedrooms { get; set; }
        public int MaxSleep { get; set; }
        public string UnitNumber { get; set; }
        public string WeekNumber { get; set; }
        public double LevyAmount { get; set; }
        public bool CurrentYearBanked { get; set; }
        public string BankedWith { get; set; }
        public bool LeviesPaidInFull { get; set; }
        public bool WeekPlacedForRental { get; set; }
        public double OriginalPurchasePrice { get; set; }
        public DateTime OriginalPurchaseDate { get; set; }
        public DateTime ArrivalDate { get; set; }
        public DateTime DepartureDate { get; set; }
        
        public double SellPrice { get; set; }
        public double AgentCommision { get; set; }
        public string Mandate { get; set; }
        [ForeignKey("Status")]
        public int StatusId { get; set; }
        #endregion
        #region Navigation
        public virtual Status Status { get; set; }
        public virtual Province Region { get; set; }
        public virtual Individual Owner { get; set; }
        public virtual Agent Agent { get; set; }
        public virtual Agency Agency { get; set; }
        public virtual ICollection<BidItem> BidItems { get; set; }
        public virtual ICollection<ProcessFlow.ProcessFlow> ProcessFlows { get; set; } 
        #endregion Navigation
    }
}
 |