Ee pessal, I'm developing a project at practice level even without end client, just to improve my knowledge in ASP.NET using MVC. Well, this project would be for a workshop, I created 4 tables CLIENT, REPAIR, FISH AND OFFICIAL. Basically show a list of customers and when I click on details I will show: -functional who did service -Install in the workshop -data output -priced parts with their prices total repair value etc. etc.
I've done the tables here, but wanted to know if I could improve them. Thanks for any hint of improvement or suggestion.
[Table("Conserto")]
public class Conserto
{
public int Id { get; set; }
public int FuncionarioID { get; set; }
public int ClienteID { get; set; }
public DateTime DataEntrada { get; set; }
public DateTime DataConserto { get; set; }
public string PecasUltilizadas { get; set; }
public string Descricao { get; set; }
public decimal ValorMaoObra { get; set; }
public decimal ValorTotalConserto { get; set; }
[ForeignKey("ClienteID")]
public virtual Cliente Cliente { get; set; }//conserto tem um cliente
public virtual ICollection<Pecas> Pecas { get; set; }//conserto tem N peças
public virtual ICollection<Funcionario> Funcionario { get; set; }//conserto tem um funcionario
}
[Table("Funcionario")]
public class Funcionario
{
public int Id { get; set; }
public string Nome { get; set; }
}
[Table("Cliente")]
public class Cliente
{
public int Id { get; set; }
public string Nome { get; set; }
public string CPF { get; set; }
public string Endereco { get; set; }
public string Telefone { get; set; }
public string CarroMarca { get; set; }
public string CarroNome { get; set; }
public string CarroModelo { get; set; }
public string DescricaoDefeito { get; set; }
public DateTime CarroAno { get; set; }
}
[Table("Pecas")]
public class Pecas
{
public int Id { get; set; }
public string Nome { get; set; }
public decimal ValorUnitatio { get; set; }
}