2017-01-13 16:31:40 +01:00
|
|
|
|
using System.Collections.Generic;
|
2016-05-17 18:22:18 +02:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
2017-05-02 13:10:23 +02:00
|
|
|
|
namespace Yavsc.Models.Workflow
|
2016-06-14 03:37:57 +02:00
|
|
|
|
{
|
2017-03-02 11:35:38 +01:00
|
|
|
|
using System;
|
2017-01-19 12:59:49 +01:00
|
|
|
|
using Models.Relationship;
|
2017-05-27 16:22:58 +02:00
|
|
|
|
using Yavsc.Workflow;
|
2017-03-02 11:35:38 +01:00
|
|
|
|
|
2017-02-21 20:49:07 +01:00
|
|
|
|
public class PerformerProfile : IPerformerProfile {
|
2016-05-17 18:22:18 +02:00
|
|
|
|
|
|
|
|
|
|
[Key]
|
2016-07-27 10:55:44 +02:00
|
|
|
|
public string PerformerId { get; set; }
|
2017-01-20 00:51:02 +01:00
|
|
|
|
[ForeignKey("PerformerId")]
|
2016-05-17 18:22:18 +02:00
|
|
|
|
public virtual ApplicationUser Performer { get; set; }
|
|
|
|
|
|
|
2017-01-13 16:31:40 +01:00
|
|
|
|
[InverseProperty("User")]
|
|
|
|
|
|
[Display(Name="Activity")]
|
|
|
|
|
|
public virtual List<UserActivity> Activity { get; set; }
|
2016-05-17 18:22:18 +02:00
|
|
|
|
|
|
|
|
|
|
[Required,StringLength(14),Display(Name="SIREN"),
|
|
|
|
|
|
RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")]
|
|
|
|
|
|
public string SIREN { get; set; }
|
|
|
|
|
|
|
2016-07-27 10:55:44 +02:00
|
|
|
|
public long OrganizationAddressId { get; set; }
|
2016-05-17 18:22:18 +02:00
|
|
|
|
|
2016-07-27 10:55:44 +02:00
|
|
|
|
[Required,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
|
|
|
|
|
|
public virtual Location OrganizationAddress { get; set; }
|
2016-05-17 18:22:18 +02:00
|
|
|
|
|
|
|
|
|
|
[Display(Name="Accept notifications on client query")]
|
|
|
|
|
|
public bool AcceptNotifications { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Display(Name="Accept notifications from non-VIP users")]
|
|
|
|
|
|
public bool AcceptPublicContact { get; set; }
|
|
|
|
|
|
|
2017-01-16 17:38:56 +01:00
|
|
|
|
[Display(Name="Use my geo-localization, and give me clients near by me")]
|
|
|
|
|
|
public bool UseGeoLocalizationToReduceDistanceWithClients { get; set; }
|
2016-05-17 18:22:18 +02:00
|
|
|
|
|
|
|
|
|
|
[Display(Name="Web site")]
|
|
|
|
|
|
public string WebSite { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Display(Name="Active")]
|
|
|
|
|
|
public bool Active { get; set; }
|
2017-05-02 13:10:23 +02:00
|
|
|
|
|
2017-03-02 11:35:38 +01:00
|
|
|
|
[Obsolete("Implement and use a new specialization setting")]
|
2017-02-28 14:52:33 +01:00
|
|
|
|
[Display(Name="Maximal Daily Cost (euro/day)"),DisplayFormat(DataFormatString="{0:C}")]
|
2016-05-17 18:22:18 +02:00
|
|
|
|
public int? MaxDailyCost { get; set; }
|
|
|
|
|
|
|
2017-03-02 11:35:38 +01:00
|
|
|
|
[Obsolete("Implement and use a new specialization setting")]
|
2017-02-28 14:52:33 +01:00
|
|
|
|
[Display(Name="Minimal Daily Cost (euro/day)"),DisplayFormat(DataFormatString="{0:C}")]
|
2016-05-17 18:22:18 +02:00
|
|
|
|
public int? MinDailyCost { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Display(Name="Rate from clients")]
|
|
|
|
|
|
public int Rate { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[NotMapped]
|
|
|
|
|
|
public bool DoesBlog { get {
|
2017-01-15 19:49:17 +01:00
|
|
|
|
return Performer?.Posts?.Count > 0 ;
|
2016-05-17 18:22:18 +02:00
|
|
|
|
} }
|
2017-05-02 13:10:23 +02:00
|
|
|
|
|
2016-05-17 18:22:18 +02:00
|
|
|
|
}
|
2017-05-02 13:10:23 +02:00
|
|
|
|
}
|