tiny server.
This commit is contained in:
29
Server/Data/Model/RecordItem.cs
Normal file
29
Server/Data/Model/RecordItem.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Blahblah.FlowerStory.Server.Data.Model;
|
||||
|
||||
[Table("records")]
|
||||
public class RecordItem
|
||||
{
|
||||
[Column("rid"), Key, Required]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("eid"), Required]
|
||||
public int EventId { get; set; }
|
||||
|
||||
[Column("date"), Required]
|
||||
public long DateUnixTime { get; set; }
|
||||
|
||||
[Column("byuid")]
|
||||
public int? ByUserId { get; set; }
|
||||
|
||||
[Column("byname")]
|
||||
public string? ByUserName { get; set; }
|
||||
|
||||
[Column("photo")]
|
||||
public byte[]? Photo { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset Date => DateTimeOffset.FromUnixTimeMilliseconds(DateUnixTime);
|
||||
}
|
Reference in New Issue
Block a user