﻿namespace Estates.Data
{
    using System;
    using Interfaces;

    class Offer : IOffer
    {
        public Offer(OfferType type)
        {
            this.Type = type;
        }

        public Offer(OfferType type, IEstate estate)
        {
            this.Type = type;
            this.Estate = estate;
        }

        public OfferType Type { get; set; }

        public IEstate Estate { get; set; }

        public override string ToString()
        {
            return string.Format("{0}: Estate = {1}, Location = {2}", this.Type, this.Estate.Name,this.Estate.Location);
        }
    }
}