mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
allow modifieddate to be null
This commit is contained in:
parent
5753eb1382
commit
a59dc92259
1 changed files with 2 additions and 4 deletions
|
|
@ -13,15 +13,13 @@ public abstract class BaseEntity
|
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
//TODO: Implement http://stackoverflow.com/a/38102266/2343739 so DefaultValue takes effect in db automatically
|
||||
//For now, manually execute on new tables: InitializeNewTableBaseEntityDefaults.sql
|
||||
[DefaultValue("CURRENT_TIMESTAMP")]
|
||||
public DateTime AddedDateUtc { get; set; }
|
||||
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||||
[DefaultValue("CURRENT_TIMESTAMP")]
|
||||
public DateTime ModifiedDateUtc { get; set; }
|
||||
public DateTime? ModifiedDateUtc { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue