51 lines
1.1 KiB
C#
51 lines
1.1 KiB
C#
using SQLite;
|
|
|
|
namespace Blahblah.FlowerStory.Data.Model;
|
|
|
|
[Table("records")]
|
|
public class RecordItem
|
|
{
|
|
[Column("rid"), PrimaryKey, AutoIncrement]
|
|
public int Id { get; set; }
|
|
|
|
[Column("fid")]
|
|
public int FlowerId { get; set; }
|
|
|
|
[Column("eid")]
|
|
public int EventId { get; set; }
|
|
|
|
private string eventName;
|
|
public string EventName
|
|
{
|
|
get
|
|
{
|
|
if (eventName == null)
|
|
{
|
|
string evtkey;
|
|
if (Constants.Events.TryGetValue(EventId, out var @event))
|
|
{
|
|
evtkey = @event.Name;
|
|
}
|
|
else
|
|
{
|
|
evtkey = Constants.EventUnknown;
|
|
}
|
|
eventName = LocalizationResource.GetText(evtkey);
|
|
}
|
|
return eventName;
|
|
}
|
|
}
|
|
|
|
[Column("date")]
|
|
public DateTimeOffset Date { get; set; }
|
|
|
|
[Column("byuid")]
|
|
public int? ByUserId { get; set; }
|
|
|
|
[Column("byname")]
|
|
public string ByUserName { get; set; }
|
|
|
|
[Column("memo")]
|
|
public string Memo { get; set; }
|
|
}
|