roadie/Roadie.Api.Library/Data/Request.cs

25 lines
623 B
C#
Raw Normal View History

2018-11-02 22:20:36 +00:00
using Roadie.Library.Identity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Roadie.Library.Data
{
[Table("request")]
2019-07-03 16:21:29 +00:00
public class Request : EntityBase
2018-11-02 22:20:36 +00:00
{
[Column("description")]
[MaxLength(500)]
[Required]
public string Description { get; set; }
2019-11-28 17:38:26 +00:00
[NotMapped]
public new bool? IsLocked { get; set; }
2018-11-02 22:20:36 +00:00
2019-11-28 17:38:26 +00:00
[ForeignKey(nameof(UserId))]
[InverseProperty("Requests")]
public virtual User User { get; set; }
[Column("userId")]
public int? UserId { get; set; }
2018-11-02 22:20:36 +00:00
}
}