mirror of
https://github.com/sphildreth/roadie
synced 2024-11-29 23:50:21 +00:00
37 lines
No EOL
956 B
C#
37 lines
No EOL
956 B
C#
using Roadie.Library.Enums;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Roadie.Library.Data
|
|
{
|
|
public abstract class EntityBase
|
|
{
|
|
[Column("createdDate")] [Required] public DateTime CreatedDate { get; set; }
|
|
|
|
[Column("id")]
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
public virtual bool? IsLocked { get; set; }
|
|
|
|
[Column("lastUpdated")]
|
|
public DateTime? LastUpdated { get; set; }
|
|
|
|
[Column("RoadieId")]
|
|
[Required]
|
|
public Guid RoadieId { get; set; }
|
|
|
|
[Column("status")]
|
|
public Statuses? Status { get; set; }
|
|
|
|
public EntityBase()
|
|
{
|
|
RoadieId = Guid.NewGuid();
|
|
Status = Statuses.Incomplete;
|
|
CreatedDate = DateTime.UtcNow;
|
|
IsLocked = false;
|
|
}
|
|
}
|
|
} |