yavsc/src/Yavsc.Server/Models/Relationship/Contact.cs

31 lines
828 B
C#
Raw Normal View History

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2016-08-03 23:25:57 +02:00
using Newtonsoft.Json;
2019-09-04 01:25:36 +01:00
using Yavsc.Attributes.Validation;
2017-01-19 12:59:49 +01:00
namespace Yavsc.Models.Relationship
{
2019-05-08 01:35:10 +01:00
public class Contact: IContact
{
2019-09-04 01:25:36 +01:00
[YaRequired()]
public string UserId { get; set; }
2019-09-04 01:25:36 +01:00
[YaRequired()]
public string OwnerId { get; set; }
2019-05-07 14:01:23 +01:00
public string Name { get; set; }
public string EMail { get; set; }
2019-05-08 01:35:10 +01:00
public long AddressId { get ; set; }
[ForeignKey("AddressId")]
public virtual PostalAddress PostalAddress { get; set; }
2019-05-07 14:01:23 +01:00
2016-09-23 12:32:57 +02:00
[ForeignKeyAttribute("OwnerId"),NotMapped]
public virtual ApplicationUser Owner { get; set; }
2016-09-23 12:32:57 +02:00
[ForeignKeyAttribute("UserId"),NotMapped]
public virtual ApplicationUser User { get; set; }
}
}