33 lines
755 B
C#
33 lines
755 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace WebVentaCoche.Models
|
|
{
|
|
public class Address
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
[Required, StringLength(100)]
|
|
public string Street { get; set; }
|
|
|
|
[Required, StringLength(50)]
|
|
public string City { get; set; }
|
|
|
|
[StringLength(50)]
|
|
public string State { get; set; }
|
|
|
|
[Required, StringLength(20)]
|
|
public string ZipCode { get; set; }
|
|
|
|
[Required, StringLength(50)]
|
|
public string Country { get; set; }
|
|
|
|
[Required]
|
|
public string UserId { get; set; }
|
|
|
|
[ForeignKey(nameof(UserId))]
|
|
public User User { get; set; }
|
|
}
|
|
}
|