2017-04-17 06:22:48 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using BuildFeed.Local;
|
|
|
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
|
|
|
|
|
|
namespace BuildFeed.Model
|
|
|
|
|
{
|
|
|
|
|
[BsonIgnoreExtraElements]
|
|
|
|
|
public class BuildDetails
|
|
|
|
|
{
|
|
|
|
|
[Required]
|
2017-11-14 04:45:32 +08:00
|
|
|
|
[Range(1, int.MaxValue)]
|
2017-04-17 06:22:48 +08:00
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_MajorVersion))]
|
|
|
|
|
public uint MajorVersion { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_MinorVersion))]
|
|
|
|
|
public uint MinorVersion { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
2017-11-14 04:45:32 +08:00
|
|
|
|
[Range(1, int.MaxValue)]
|
2017-04-17 06:22:48 +08:00
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_BuildNumber))]
|
|
|
|
|
public uint Number { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_Revision))]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = true)]
|
|
|
|
|
public uint? Revision { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_LabString))]
|
|
|
|
|
public string Lab { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_BuildTime))]
|
2017-05-14 06:38:30 +08:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = true,
|
|
|
|
|
ApplyFormatInEditMode = true,
|
2017-04-17 06:22:48 +08:00
|
|
|
|
DataFormatString = "{0:yyMMdd-HHmm}")]
|
|
|
|
|
public DateTime? BuildTime { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_SourceType))]
|
|
|
|
|
[EnumDataType(typeof(TypeOfSource))]
|
|
|
|
|
public TypeOfSource SourceType { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_SourceDetails))]
|
|
|
|
|
public string SourceDetails { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_LeakDate))]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = true, ApplyFormatInEditMode = true)]
|
|
|
|
|
public DateTime? LeakDate { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|