mirror of
https://github.com/guilhermewerner/gerencia-projetos
synced 2025-06-16 06:55:00 +00:00
Initial commit
This commit is contained in:
33
GerenciaProjetos/Models/Desenvolvedor.cs
Normal file
33
GerenciaProjetos/Models/Desenvolvedor.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GerenciaProjetos.Models
|
||||
{
|
||||
public class Desenvolvedor
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
[Required(ErrorMessage = "Este campo é obrigatório.")]
|
||||
[RegularExpression("^[a-zA-Z ]*$", ErrorMessage = "Esse valor não é permitido.")]
|
||||
public string Nome { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
[Required(ErrorMessage = "Este campo é obrigatório.")]
|
||||
[RegularExpression(@"^([a-z0-9_\.\+-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$", ErrorMessage = "Por favor insira um endereço de e-mail válido.")]
|
||||
[DataType(DataType.EmailAddress)]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Este campo é obrigatório.")]
|
||||
[StringLength(45, MinimumLength = 8, ErrorMessage = "A senha deve ter pelo menos 8 caracteres.")]
|
||||
[DataType(DataType.Password)]
|
||||
public string Senha { get; set; }
|
||||
|
||||
public bool EAdmin { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user