Add initial database context and first entity
This commit is contained in:
29
Component/Entry/Repository/Entry.cs
Normal file
29
Component/Entry/Repository/Entry.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Diary.Component.Entry.Repository
|
||||
{
|
||||
[Table("Entries", Schema = "Diary")]
|
||||
public class Entry
|
||||
{
|
||||
[Key]
|
||||
public int EnrtyID { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column(TypeName="Date")]
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime ValidFrom { get; set; }
|
||||
public DateTime? ValidTo { get; set; }
|
||||
|
||||
public string Note { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user