mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add display attributes to person model.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
@@ -10,15 +11,21 @@ namespace Cicm.Database.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string Surname { get; set; }
|
public string Surname { get; set; }
|
||||||
public virtual Iso31661Numeric CountryOfBirth { get; set; }
|
[DisplayName("Country of birth")]
|
||||||
public DateTime BirthDate { get; set; }
|
public virtual Iso31661Numeric CountryOfBirth { get; set; }
|
||||||
public DateTime? DeathDate { get; set; }
|
[DisplayName("Birth date")]
|
||||||
public string Webpage { get; set; }
|
[DataType(DataType.Date)]
|
||||||
public string Twitter { get; set; }
|
public DateTime BirthDate { get; set; }
|
||||||
public string Facebook { get; set; }
|
[DisplayName("Date of death")]
|
||||||
public Guid Photo { get; set; }
|
[DataType(DataType.Date)]
|
||||||
public int? DocumentPersonId { get; set; }
|
public DateTime? DeathDate { get; set; }
|
||||||
|
[Url]
|
||||||
|
public string Webpage { get; set; }
|
||||||
|
public string Twitter { get; set; }
|
||||||
|
public string Facebook { get; set; }
|
||||||
|
public Guid Photo { get; set; }
|
||||||
|
public int? DocumentPersonId { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string FullName => $"{Name} {Surname}";
|
public string FullName => $"{Name} {Surname}";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||||
<Version>3.0.99.860</Version>
|
<Version>3.0.99.863</Version>
|
||||||
<Company>Canary Islands Computer Museum</Company>
|
<Company>Canary Islands Computer Museum</Company>
|
||||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||||
<Product>Canary Islands Computer Museum Website</Product>
|
<Product>Canary Islands Computer Museum Website</Product>
|
||||||
|
|||||||
Reference in New Issue
Block a user