using System;
using System.Collections.Generic;
using Abp.Domain.Entities;
using Abp.Domain.Values;

namespace YGNT.QuestionLibrary.Test
{
    public class User : Entity
    {
        public string Name { get; set; }

        public string Phone { get; set; }


        public Address Address { get; set; }
    }

    public class Address : ValueObject
    {
        public Guid CityId { get; }

        public string Street { get; }

        public int Number { get; }

        public Address(
            Guid cityId,
            string street,
            int number)
        {
            CityId = cityId;
            Street = street;
            Number = number;
        }

        //Requires to implement this method to return properties.
        protected override IEnumerable<object> GetAtomicValues()
        {
            yield return Street;
            yield return CityId;
            yield return Number;
        }
    }
}