mirror of
https://github.com/guilhermewerner/gerencia-projetos
synced 2025-06-16 23:15:05 +00:00
Initial commit
This commit is contained in:
29
GerenciaProjetos/Models/Bug.cs
Normal file
29
GerenciaProjetos/Models/Bug.cs
Normal file
@ -0,0 +1,29 @@
|
||||
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 Bug
|
||||
{
|
||||
[Key, Column(Order = 1)]
|
||||
public int DesenvolvedorId { get; set; }
|
||||
public Desenvolvedor Desenvolvedor { get; set; }
|
||||
|
||||
[Key, Column(Order = 2)]
|
||||
public int RequisitoId { get; set; }
|
||||
public Requisito Requisito { get; set; }
|
||||
|
||||
public string Prioridade { get; set; }
|
||||
|
||||
public DateTime DataCadastro { get; set; }
|
||||
|
||||
public int CriadorId { get; set; }
|
||||
public Desenvolvedor Criador { get; set; }
|
||||
|
||||
public bool FoiResolvido { get; set; }
|
||||
}
|
||||
}
|
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; }
|
||||
}
|
||||
}
|
20
GerenciaProjetos/Models/DesenvolvedorProjeto.cs
Normal file
20
GerenciaProjetos/Models/DesenvolvedorProjeto.cs
Normal file
@ -0,0 +1,20 @@
|
||||
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 DesenvolvedorProjeto
|
||||
{
|
||||
[Key, Column(Order = 1)]
|
||||
public int DesenvolvedorId { get; set; }
|
||||
public Desenvolvedor Desenvolvedor { get; set; }
|
||||
|
||||
[Key, Column(Order = 2)]
|
||||
public int ProjetoId { get; set; }
|
||||
public Projeto Projeto { get; set; }
|
||||
}
|
||||
}
|
23
GerenciaProjetos/Models/DesenvolvedorRequisito.cs
Normal file
23
GerenciaProjetos/Models/DesenvolvedorRequisito.cs
Normal file
@ -0,0 +1,23 @@
|
||||
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 DesenvolvedorRequisito
|
||||
{
|
||||
[Key, Column(Order = 1)]
|
||||
public int DesenvolvedorId { get; set; }
|
||||
public Desenvolvedor Desenvolvedor { get; set; }
|
||||
|
||||
[Key, Column(Order = 2)]
|
||||
public int RequisitoId { get; set; }
|
||||
public Requisito Requisito { get; set; }
|
||||
|
||||
[DataType(DataType.Time)]
|
||||
public TimeSpan TempoGasto { get; set; }
|
||||
}
|
||||
}
|
11
GerenciaProjetos/Models/ErrorViewModel.cs
Normal file
11
GerenciaProjetos/Models/ErrorViewModel.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace GerenciaProjetos.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
28
GerenciaProjetos/Models/Projeto.cs
Normal file
28
GerenciaProjetos/Models/Projeto.cs
Normal file
@ -0,0 +1,28 @@
|
||||
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 Projeto
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
[Required(ErrorMessage = "Este campo é obrigatório.")]
|
||||
public string Nome { get; set; }
|
||||
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime DataEntrega { get; set; }
|
||||
|
||||
[MaxLength(45)]
|
||||
[Required(ErrorMessage = "Este campo é obrigatório.")]
|
||||
public string Solicitante { get; set; }
|
||||
|
||||
public IEnumerable<Requisito> Requisitos { get; set; }
|
||||
}
|
||||
}
|
35
GerenciaProjetos/Models/Requisito.cs
Normal file
35
GerenciaProjetos/Models/Requisito.cs
Normal file
@ -0,0 +1,35 @@
|
||||
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 Requisito
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
[Required(ErrorMessage = "Este campo é obrigatório.")]
|
||||
public string Descricao { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Observacoes { get; set; }
|
||||
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime DataCadastro { get; set; }
|
||||
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime DataEntrega { get; set; }
|
||||
|
||||
public bool EFuncional { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Este campo é obrigatório.")]
|
||||
public int ProjetoId { get; set; }
|
||||
|
||||
public Projeto Projeto { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user