Add project
This commit is contained in:
18
Api/Database/Entities/BaseEntityGuid.cs
Normal file
18
Api/Database/Entities/BaseEntityGuid.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Api.Database.Entities;
|
||||
|
||||
public abstract class BaseEntityGuid
|
||||
{
|
||||
[Key]
|
||||
[Column("Id")]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public Guid Id { get; set; } = Guid.CreateVersion7();
|
||||
|
||||
[Column("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.Now;
|
||||
|
||||
[Column("LastModifiedAt")]
|
||||
public DateTime LastModifiedAt { get; set; } = DateTime.Now;
|
||||
}
|
||||
Reference in New Issue
Block a user