Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. namespace Trabalho_Pratico_base_dados.Models
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.ComponentModel.DataAnnotations;
  7.  
  8. public partial class Utilizadores
  9. {
  10. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
  11. public Utilizadores()
  12. {
  13. this.Comentarios = new HashSet<Comentarios>();
  14. this.Compras = new HashSet<Compras>();
  15. this.Mensagens = new HashSet<Mensagens>();
  16. this.Mensagens1 = new HashSet<Mensagens>();
  17. this.Produtos = new HashSet<Produtos>();
  18. }
  19.  
  20. public int id { get; set; }
  21.  
  22. [Required(ErrorMessage = "Campo Obrigatório")]
  23. [DisplayName("Nome")]
  24. public string nome { get; set; }
  25.  
  26. [Required(ErrorMessage = "Campo Obrigatório")]
  27. [EmailAddress] // Usar para html.EditorFor
  28. //[DataType(DataType.EmailAddress)] // Usar para html.TextboxFor
  29. [DisplayName("Email")]
  30. public string email { get; set; }
  31.  
  32. [Required(ErrorMessage = "Campo Obrigatório")]
  33. [DataType(DataType.Date)]
  34. [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
  35. [DisplayName("Data de Nascimento")]
  36. public System.DateTime data_nascimento { get; set; }
  37.  
  38. [Required(ErrorMessage = "Campo Obrigatório")]
  39. [DisplayName("Localidade")]
  40. public string localidade { get; set; }
  41.  
  42. [Required(ErrorMessage = "Campo Obrigatório")]
  43. [StringLength(20, ErrorMessage = "O nickname não pode exceder os 20 caracteres")]
  44. [DisplayName("Nickname")]
  45. public string nickname { get; set; }
  46.  
  47. [Required(ErrorMessage = "Campo Obrigatório")]
  48. [DataType(DataType.Password)]
  49. [DisplayName("Password")]
  50. public string password { get; set; }
  51.  
  52. [DataType(DataType.Password)]
  53. [DisplayName("Confirmar Password")]
  54. [Compare("password")]
  55. public string ConfirmarPassword { get; set; }
  56.  
  57. public int estado { get; set; }
  58. public int tipo { get; set; }
  59.  
  60. [Required(ErrorMessage = "Campo Obrigatório")]
  61. [DisplayName("Codigo Postal")]
  62. public string codigo_postal { get; set; }
  63.  
  64. public string img { get; set; }
  65.  
  66. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
  67. public virtual ICollection<Comentarios> Comentarios { get; set; }
  68. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
  69. public virtual ICollection<Compras> Compras { get; set; }
  70. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
  71. public virtual ICollection<Mensagens> Mensagens { get; set; }
  72. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
  73. public virtual ICollection<Mensagens> Mensagens1 { get; set; }
  74. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
  75. public virtual ICollection<Produtos> Produtos { get; set; }
  76. }
  77.  
  78. public class ResetDaPassword
  79. {
  80.  
  81. public int id { get; set; }
  82.  
  83. [Required(ErrorMessage = "Campo Obrigatório")]
  84. [DataType(DataType.Password)]
  85. [DisplayName("Password Antiga")]
  86. public string oldPassword { get; set; }
  87.  
  88. [Required(ErrorMessage = "Campo Obrigatório")]
  89. [DataType(DataType.Password)]
  90. [DisplayName("Password")]
  91. public string password { get; set; }
  92.  
  93. [DataType(DataType.Password)]
  94. [DisplayName("Confirmar Password")]
  95. [Compare("password")]
  96. public string ConfirmarPassword { get; set; }
  97. }
  98.  
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement