Using YaStringLength and YaRequired
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Bank
|
||||
{
|
||||
@ -14,7 +15,7 @@ namespace Yavsc.Models.Bank
|
||||
/// </summary>
|
||||
/// <value>The BI.</value>
|
||||
[DisplayName("Code BIC")]
|
||||
[StringLength(15)]
|
||||
[YaStringLength(15)]
|
||||
public string BIC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -22,7 +23,7 @@ namespace Yavsc.Models.Bank
|
||||
/// </summary>
|
||||
/// <value>The IBA.</value>
|
||||
[DisplayName("Code IBAN")]
|
||||
[StringLength(33)]
|
||||
[YaStringLength(33)]
|
||||
public string IBAN { get; set; }
|
||||
|
||||
|
||||
@ -31,7 +32,7 @@ namespace Yavsc.Models.Bank
|
||||
/// </summary>
|
||||
/// <value>The bank code.</value>
|
||||
[DisplayName("Code Banque")]
|
||||
[StringLength(5)]
|
||||
[YaStringLength(5)]
|
||||
public string BankCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -39,7 +40,7 @@ namespace Yavsc.Models.Bank
|
||||
/// </summary>
|
||||
/// <value>The wicket code.</value>
|
||||
[DisplayName("Code Guichet")]
|
||||
[StringLength(5)]
|
||||
[YaStringLength(5)]
|
||||
public string WicketCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -47,7 +48,7 @@ namespace Yavsc.Models.Bank
|
||||
/// </summary>
|
||||
/// <value>The account number.</value>
|
||||
[DisplayName("Numéro de compte")]
|
||||
[StringLength(15)]
|
||||
[YaStringLength(15)]
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Abstract.Identity.Security;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Interfaces;
|
||||
using Yavsc.Models.Access;
|
||||
using Yavsc.Models.Relationship;
|
||||
@ -17,19 +18,19 @@ namespace Yavsc.Models.Blog
|
||||
[Display(Name="Identifiant du post")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Display(Name="Contenu")][StringLength(56224)]
|
||||
[Display(Name="Contenu")][YaStringLength(56224)]
|
||||
public string Content { get; set; }
|
||||
|
||||
[Display(Name="Photo")][StringLength(1024)]
|
||||
[Display(Name="Photo")][YaStringLength(1024)]
|
||||
public string Photo { get; set; }
|
||||
|
||||
[StringLength(8)]
|
||||
[YaStringLength(8)]
|
||||
public string Lang { get; set; }
|
||||
|
||||
[Display(Name="Indice de qualité")]
|
||||
public int Rate { get; set; }
|
||||
|
||||
[Display(Name="Titre")][StringLength(1024)]
|
||||
[Display(Name="Titre")][YaStringLength(1024)]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Display(Name="Identifiant de l'auteur")]
|
||||
|
@ -13,7 +13,7 @@ namespace Yavsc.Models.Blog
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[StringLength(1024)]
|
||||
[YaStringLength(1024)]
|
||||
public string Content { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("PostId")][JsonIgnore]
|
||||
|
@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Abstract.Chat;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Chat
|
||||
{
|
||||
@ -13,7 +14,7 @@ namespace Yavsc.Models.Chat
|
||||
public string Topic { get; set; }
|
||||
|
||||
[Key]
|
||||
[StringLengthAttribute(ChatHubConstants.MaxChanelName, MinimumLength=3)]
|
||||
[YaStringLength(ChatHubConstants.MaxChanelName, MinimumLength=3)]
|
||||
public string Name { get; set;}
|
||||
|
||||
public string OwnerId { get; set; }
|
||||
|
@ -13,6 +13,7 @@ using Microsoft.Extensions.Localization;
|
||||
using Yavsc.ViewModels.PayPal;
|
||||
using Yavsc.Models.HairCut;
|
||||
using Yavsc.Abstract.Identity;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Haircut
|
||||
{
|
||||
@ -65,8 +66,7 @@ namespace Yavsc.Models.Haircut
|
||||
set;
|
||||
}
|
||||
|
||||
[Display(Name = "Informations complémentaires"),
|
||||
StringLengthAttribute(512)]
|
||||
[Display(Name = "Informations complémentaires"), YaStringLength(512)]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[pas d'informations complémentaires]")]
|
||||
public string AdditionalInfo { get; set; }
|
||||
|
||||
|
@ -9,10 +9,10 @@ namespace Yavsc.Models.IT.Evolution
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[StringLength(256)]
|
||||
[YaStringLength(256)]
|
||||
public string ShortName { get; set; }
|
||||
|
||||
[StringLength(10*1024)]
|
||||
[YaStringLength(10*1024)]
|
||||
public string Description { get; set; }
|
||||
|
||||
public FeatureStatus Status { get; set; }
|
||||
|
@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using Yavsc.Abstract.IT;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Billing;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.Server.Models.IT.SourceCode;
|
||||
@ -23,7 +24,7 @@ namespace Yavsc.Server.Models.IT
|
||||
/// As a side effect, there's no project without valid git reference in db.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
@ -32,7 +33,7 @@ namespace Yavsc.Server.Models.IT
|
||||
public virtual List<ProjectBuildConfiguration> Configurations { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public long GitId { get; set; }
|
||||
|
||||
[ForeignKey("GitId")]
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Server.Models.IT
|
||||
{
|
||||
@ -12,7 +13,7 @@ namespace Yavsc.Server.Models.IT
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string Name { get; set; }
|
||||
|
||||
public long ProjectId { get; set; }
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Server.Models.IT.SourceCode
|
||||
@ -9,16 +10,16 @@ namespace Yavsc.Server.Models.IT.SourceCode
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string Path { get; set; }
|
||||
|
||||
[StringLength(2048)]
|
||||
[YaStringLength(2048)]
|
||||
public string Url { get; set; }
|
||||
|
||||
[StringLength(512)]
|
||||
[YaStringLength(512)]
|
||||
public string Branch { get; set; }
|
||||
|
||||
[StringLength(1024)]
|
||||
[YaStringLength(1024)]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
|
@ -25,17 +25,18 @@ using System.ComponentModel.DataAnnotations;
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
using Models.Relationship;
|
||||
/// <summary>
|
||||
/// Event pub.
|
||||
/// </summary>
|
||||
public class CircleEvent: BaseEvent
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
/// <summary>
|
||||
/// Event pub.
|
||||
/// </summary>
|
||||
public class CircleEvent: BaseEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the circles.
|
||||
/// </summary>
|
||||
/// <value>The circles.</value>
|
||||
[Required(ErrorMessageResourceName="Circles"),
|
||||
Display(Name="Circles")]
|
||||
[YaRequired, Display(Name="Circles")]
|
||||
public virtual List<Circle> Circles{ get; set; }
|
||||
|
||||
public override string CreateBody()
|
||||
|
@ -1,17 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public class DimissClicked
|
||||
{
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[ForeignKey("UserId")]
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public long NotificationId { get; set; }
|
||||
|
||||
[ForeignKey("NotificationId")]
|
||||
|
@ -2,6 +2,7 @@ using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Abstract.Streaming;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Streaming
|
||||
{
|
||||
@ -18,29 +19,29 @@ namespace Yavsc.Models.Streaming
|
||||
/// a title for this flow
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[StringLength(255)]
|
||||
[YaStringLength(255)]
|
||||
[Display(Name="TitleLabel", ResourceType=typeof(LiveFlow))]
|
||||
public string Title { get; set; }
|
||||
|
||||
// a little description
|
||||
[StringLength(1023)]
|
||||
[YaStringLength(1023)]
|
||||
[Display(Name="PitchLabel", ResourceType=typeof(LiveFlow))]
|
||||
public string Pitch { get; set; }
|
||||
|
||||
// The stream type
|
||||
[StringLength(127)]
|
||||
[YaStringLength(127)]
|
||||
[Display(Name="MediaTypeLabel", ResourceType=typeof(LiveFlow))]
|
||||
public string MediaType { get; set; }
|
||||
|
||||
// A name where to save this stream, relative to user's files root
|
||||
[StringLength(255)]
|
||||
[YaStringLength(255)]
|
||||
[Display(Name="DifferedFileNameLabel", ResourceType=typeof(LiveFlow))]
|
||||
public string DifferedFileName { get; set; }
|
||||
|
||||
[Display(Name="SequenceNumberLabel", ResourceType=typeof(LiveFlow))]
|
||||
public int SequenceNumber { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
[Display(Name="OwnerIdLabel", ResourceType=typeof(LiveFlow))]
|
||||
public string OwnerId {get; set; }
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Musical
|
||||
{
|
||||
@ -9,7 +10,7 @@ namespace Yavsc.Models.Musical
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
|
||||
[MaxLength(255),Required]
|
||||
[MaxLength(255), YaRequired]
|
||||
public string Name { get ; set; }
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Musical
|
||||
@ -9,7 +10,7 @@ namespace Yavsc.Models.Musical
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public long InstrumentId { get; set; }
|
||||
|
||||
[ForeignKey("InstrumentId")]
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Musical
|
||||
{
|
||||
@ -15,7 +16,7 @@ namespace Yavsc.Models.Musical
|
||||
|
||||
public int Rate { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public long TendencyId {get; set; }
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,15 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Musical {
|
||||
|
||||
|
||||
|
||||
public class MusicalTendency {
|
||||
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
|
||||
[MaxLength(255),Required]
|
||||
[MaxLength(255),YaRequired]
|
||||
public string Name { get ; set; }
|
||||
|
||||
}
|
||||
|
@ -6,13 +6,14 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace Yavsc.Models.Payment {
|
||||
using Yavsc;
|
||||
using Relationship;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
public class PayPalPayment : IBaseTrackedEntity
|
||||
{
|
||||
[Required,Key]
|
||||
[YaRequired,Key]
|
||||
public string CreationToken { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string ExecutorId { get; set; }
|
||||
[ForeignKey("ExecutorId")]
|
||||
public virtual ApplicationUser Executor { get; set; }
|
||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
@ -13,10 +14,10 @@ namespace Yavsc.Models.Relationship
|
||||
|
||||
public bool Public { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId"),JsonIgnore,NotMapped]
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
@ -8,13 +9,13 @@ namespace Yavsc.Models.Relationship
|
||||
public partial class CircleMember
|
||||
{
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public long CircleId { get; set; }
|
||||
|
||||
[ForeignKey("CircleId")]
|
||||
public virtual Circle Circle { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string MemberId { get; set; }
|
||||
|
||||
[ForeignKey("MemberId")]
|
||||
|
@ -1,15 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class Contact: IContact
|
||||
{
|
||||
[Required()]
|
||||
[YaRequired()]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[Required()]
|
||||
[YaRequired()]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
@ -12,7 +13,7 @@ namespace Yavsc.Models.Relationship
|
||||
/// <summary>
|
||||
/// The longitude.
|
||||
/// </summary>
|
||||
[Required(),Display(Name="Longitude")]
|
||||
[YaRequired(),Display(Name="Longitude")]
|
||||
[Range(-180, 360.0)]
|
||||
|
||||
public double Longitude { get; set; }
|
||||
@ -21,7 +22,7 @@ namespace Yavsc.Models.Relationship
|
||||
///
|
||||
/// The latitude.
|
||||
/// </summary>
|
||||
[Required(),Display(Name="Latitude")]
|
||||
[YaRequired(),Display(Name="Latitude")]
|
||||
[Range(-90, 90 )]
|
||||
public double Latitude { get; set; }
|
||||
|
||||
@ -30,7 +31,7 @@ namespace Yavsc.Models.Relationship
|
||||
public class Location : Position, ILocation {
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required(),
|
||||
[YaRequired(),
|
||||
Display(Name="Address"),
|
||||
MaxLength(512)]
|
||||
public string Address { get; set; }
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
@ -8,7 +9,7 @@ namespace Yavsc.Models.Relationship
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required()]
|
||||
[YaRequired()]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -9,22 +9,23 @@ namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using Yavsc.Models.Market;
|
||||
using Yavsc;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
public class Activity : IBaseTrackedEntity, IActivity
|
||||
{
|
||||
|
||||
[StringLength(512), Required, Key]
|
||||
[YaStringLength(512), YaRequired, Key]
|
||||
[Display(Name = "Code")]
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[StringLength(512), Required()]
|
||||
[YaStringLength(512), YaRequired()]
|
||||
[Display(Name = "Nom")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[StringLength(512)]
|
||||
[YaStringLength(512)]
|
||||
[Display(Name = "Code du parent")]
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
|
@ -5,6 +5,8 @@ using Newtonsoft.Json;
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using Yavsc;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
public class CommandForm : ICommandForm
|
||||
{
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@ -14,7 +16,7 @@ namespace Yavsc.Models.Workflow
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string ActivityCode { get; set; }
|
||||
|
||||
[ForeignKey("ActivityCode"),JsonIgnore]
|
||||
|
@ -7,6 +7,7 @@ namespace Yavsc.Models.Workflow
|
||||
using System;
|
||||
using Models.Relationship;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Workflow;
|
||||
|
||||
public class PerformerProfile : IPerformerProfile {
|
||||
@ -20,13 +21,13 @@ namespace Yavsc.Models.Workflow
|
||||
[Display(Name="Activity"), JsonIgnore]
|
||||
public virtual List<UserActivity> Activity { get; set; }
|
||||
|
||||
[Required,StringLength(14),Display(Name="SIREN"),
|
||||
[YaRequired,YaStringLength(14),Display(Name="SIREN"),
|
||||
RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")]
|
||||
public string SIREN { get; set; }
|
||||
|
||||
public long OrganizationAddressId { get; set; }
|
||||
|
||||
[Required,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
|
||||
[YaRequired,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
|
||||
public virtual Location OrganizationAddress { get; set; }
|
||||
|
||||
[Display(Name="Accept notifications on client query")]
|
||||
|
@ -6,6 +6,7 @@ using Yavsc.Models.Market;
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using Models.Relationship;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
/// <summary>
|
||||
/// A date, between two persons
|
||||
@ -17,21 +18,21 @@ namespace Yavsc.Models.Workflow
|
||||
/// Event date
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required(),Display(Name="EventDate")]
|
||||
[YaRequired(),Display(Name="EventDate")]
|
||||
public DateTime EventDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Location identifier
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public long LocationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A Location for this event
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required(ErrorMessage="SpecifyPlace"),Display(Name="Location"),ForeignKey("LocationId")]
|
||||
[YaRequired(ErrorMessage="SpecifyPlace"),Display(Name="Location"),ForeignKey("LocationId")]
|
||||
public Location Location { get; set; }
|
||||
|
||||
}
|
||||
|
@ -1,18 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
public class UserActivity
|
||||
{
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[ForeignKey("UserId")]
|
||||
public virtual PerformerProfile User { get; set; }
|
||||
|
||||
[Required]
|
||||
[YaRequired]
|
||||
public string DoesCode { get; set; }
|
||||
|
||||
[ForeignKey("DoesCode")]
|
||||
|
Reference in New Issue
Block a user