Using YaStringLength and YaRequired
This commit is contained in:
parent
7d9495e326
commit
9457ba71d1
62 changed files with 396 additions and 150 deletions
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue