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:
parent
e2859f12f8
commit
3d64fc90ff
@ -4,8 +4,19 @@ namespace Interfaces
|
|||||||
{
|
{
|
||||||
public class TimeLog
|
public class TimeLog
|
||||||
{
|
{
|
||||||
public DateTimeOffset EventTime { get; set; }
|
public int Id { get; set; }
|
||||||
public int UserId { 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3,13 +3,22 @@ using SQLite.Net.Attributes;
|
|||||||
|
|
||||||
namespace SQLiteRepository
|
namespace SQLiteRepository
|
||||||
{
|
{
|
||||||
public sealed class TimeLog
|
public sealed class TimeLogDB
|
||||||
{
|
{
|
||||||
[PrimaryKey, AutoIncrement]
|
[PrimaryKey, AutoIncrement]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public int UserId_FK { get; set; }
|
public int UserId_FK { get; set; }
|
||||||
public int IdentifierId { get; set; }
|
public int IdentifierId { get; set; }
|
||||||
public bool InOut { get; set; }
|
public LogDirectionDB Direction { get; set; }
|
||||||
public DateTimeOffset SwipeEventDateTime { 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user