Fleshed out entity classes and created command to create student
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text;
|
||||
|
||||
namespace BrightGlimmer.Domain
|
||||
{
|
||||
public class Entity
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime ModifiedDate { get; set; }
|
||||
[Key]
|
||||
public Guid Id { get; private set; }
|
||||
[JsonIgnore]
|
||||
public bool IsDeleted { get; protected set; }
|
||||
[JsonIgnore]
|
||||
public DateTime CreatedDate { get; protected set; }
|
||||
[JsonIgnore]
|
||||
public DateTime ModifiedDate { get; protected set; }
|
||||
|
||||
public Entity()
|
||||
{
|
||||
@@ -17,6 +23,15 @@ namespace BrightGlimmer.Domain
|
||||
CreatedDate = DateTime.UtcNow;
|
||||
ModifiedDate = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Delete()
|
||||
{
|
||||
IsDeleted = true;
|
||||
}
|
||||
|
||||
protected void MarkModified()
|
||||
{
|
||||
ModifiedDate = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user