mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Set date datatypes in model.
This commit is contained in:
@@ -52,7 +52,8 @@ namespace Cicm.Database.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Founded { get; set; }
|
public DateTime? Founded { get; set; }
|
||||||
[Url]
|
[Url]
|
||||||
[StringLength(255)]
|
[StringLength(255)]
|
||||||
@@ -62,6 +63,7 @@ namespace Cicm.Database.Models
|
|||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string Facebook { get; set; }
|
public string Facebook { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Sold { get; set; }
|
public DateTime? Sold { get; set; }
|
||||||
public int? SoldToId { get; set; }
|
public int? SoldToId { get; set; }
|
||||||
[StringLength(80)]
|
[StringLength(80)]
|
||||||
@@ -105,6 +107,6 @@ namespace Cicm.Database.Models
|
|||||||
: Sold.Value.ToShortDateString();
|
: Sold.Value.ToShortDateString();
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public CompanyDescription Description => Descriptions.FirstOrDefault();
|
public CompanyDescription Description => Descriptions?.FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,6 +53,7 @@ namespace Cicm.Database.Models
|
|||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string ModelCode { get; set; }
|
public string ModelCode { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Introduced { get; set; }
|
public DateTime? Introduced { get; set; }
|
||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string Package { get; set; }
|
public string Package { get; set; }
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ namespace Cicm.Database.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public MachineType Type { get; set; }
|
public MachineType Type { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Introduced { get; set; }
|
public DateTime? Introduced { get; set; }
|
||||||
public int? FamilyId { get; set; }
|
public int? FamilyId { get; set; }
|
||||||
[StringLength(50)]
|
[StringLength(50)]
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ namespace Cicm.Database.Models
|
|||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string ModelCode { get; set; }
|
public string ModelCode { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Introduced { get; set; }
|
public DateTime? Introduced { get; set; }
|
||||||
[DisplayName("Instruction set")]
|
[DisplayName("Instruction set")]
|
||||||
public int? InstructionSetId { get; set; }
|
public int? InstructionSetId { get; set; }
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ namespace Cicm.Database.Models
|
|||||||
[StringLength(45)]
|
[StringLength(45)]
|
||||||
public string ModelCode { get; set; }
|
public string ModelCode { get; set; }
|
||||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||||
|
[DataType(DataType.Date)]
|
||||||
public DateTime? Introduced { get; set; }
|
public DateTime? Introduced { get; set; }
|
||||||
[DisplayName("PCM voices")]
|
[DisplayName("PCM voices")]
|
||||||
[Range(1, int.MaxValue)]
|
[Range(1, int.MaxValue)]
|
||||||
|
|||||||
Reference in New Issue
Block a user