created enum for LogDirection (in, out or unknown) added extra parameters to TimeLog to provide sufficient data on the log event.

renamed TimeLog to TimeLogDb, to create a database Entity.
This commit is contained in:
chris.watts90@outlook.com 2017-02-08 22:19:58 +00:00
parent e2859f12f8
commit 3d64fc90ff
2 changed files with 24 additions and 4 deletions

View File

@ -4,8 +4,19 @@ namespace Interfaces
{
public class TimeLog
{
public DateTimeOffset EventTime { get; set; }
public int Id { get; set; }
public int UserId { get; set; }
public bool Direction { get; set; }
public int IdentifierId { get; set; }
public LogDirection Direction { get; set; }
public DateTimeOffset EventTime { get; set; }
public int CalendarWeek { get; set; }
public int Year { get; set; }
}
public enum LogDirection
{
UNKNOWN = 0,
IN = 1,
OUT = 2
}
}

View File

@ -3,13 +3,22 @@ using SQLite.Net.Attributes;
namespace SQLiteRepository
{
public sealed class TimeLog
public sealed class TimeLogDB
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public int UserId_FK { get; set; }
public int IdentifierId { get; set; }
public bool InOut { get; set; }
public LogDirectionDB Direction { get; set; }
public DateTimeOffset SwipeEventDateTime { get; set; }
public int CalendarWeek { get; set; }
public int Year { get; set; }
}
public enum LogDirectionDB
{
UNKNOWN = 0,
IN = 1,
OUT = 2
}
}