tiny server.

This commit is contained in:
2023-05-23 08:37:20 +08:00
parent 78a5d8d3fa
commit c8bf017a70
50 changed files with 1242 additions and 32 deletions

View File

@ -0,0 +1,32 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Blahblah.FlowerStory.Server.Data.Model;
[Table("flowers")]
public class FlowerItem
{
[Column("fid"), Key, Required]
public int Id { get; set; }
[Column("categoryid"), Required]
public int CategoryId { get; set; }
[Column("name"), Required]
public required string Name { get; set; }
[Column("datebuy"), Required]
public long DateBuyUnixTime { get; set; }
[Column("cost", TypeName = "real")]
public decimal? Cost { get; set; }
[Column("purchase")]
public string? Purchase { get; set; }
[Column("photo")]
public byte[]? Photo { get; set; }
[NotMapped]
public DateTimeOffset DateBuy => DateTimeOffset.FromUnixTimeMilliseconds(DateBuyUnixTime);
}