DepartmentProject/DepartmentPortal/Common/CoreDatabase/Models/BaseEntity.cs

28 lines
607 B
C#
Raw Normal View History

2022-03-18 22:55:48 +04:00
using System;
using System.Runtime.Serialization;
namespace CoreDatabase.Models
{
/// <summary>
/// Базовый набор для сущности
/// </summary>
[DataContract]
public class BaseEntity : IdEntity
{
[DataMember]
public DateTime DateCreate { get; set; }
[DataMember]
public DateTime? DateDelete { get; set; }
[DataMember]
public bool IsDeleted { get; set; }
public BaseEntity() : base()
{
DateCreate = DateTime.Now;
DateDelete = null;
IsDeleted = false;
}
}
}