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