home page for App

This commit is contained in:
2023-07-27 22:07:24 +08:00
parent 02ac33fc07
commit befbc7fc9b
40 changed files with 1175 additions and 398 deletions

View File

@ -0,0 +1,29 @@
using SQLite;
namespace Blahblah.FlowerApp.Data.Model;
[Table("definitions")]
public class DefinitionItem
{
[Column("did"), PrimaryKey, AutoIncrement]
public int Id { get; set; }
/// <summary>
/// - 0: category
/// - 1: event
/// </summary>
[Column("type"), NotNull]
public int DefinitionType { get; set; }
[Column("id"), NotNull]
public int DefinitionId { get; set; }
[Column("name"), NotNull]
public string Name { get; set; } = null!;
[Column("description")]
public string? Description { get; set; }
[Column("unique")]
public bool? Unique { get; set; }
}

View File

@ -20,8 +20,6 @@ public class FlowerItem
[Column("datebuy"), NotNull]
public long DateBuyUnixTime { get; set; }
public DateTimeOffset DateBuy => DateTimeOffset.FromUnixTimeMilliseconds(DateBuyUnixTime);
[Column("cost")]
public decimal? Cost { get; set; }
@ -37,5 +35,9 @@ public class FlowerItem
[Column("longitude")]
public double? Longitude { get; set; }
[Ignore]
public PhotoItem[]? Photos { get; set; }
[Ignore]
public int? Distance { get; set; }
}

View File

@ -0,0 +1,22 @@
using SQLite;
namespace Blahblah.FlowerApp.Data.Model;
[Table("params")]
public class ParamItem
{
[Column("pid"), PrimaryKey, AutoIncrement]
public int Id { get; set; }
[Column("uid")]
public int? OwnerId { get; set; }
[Column("code"), NotNull]
public string Code { get; set; } = null!;
[Column("value"), NotNull]
public string Value { get; set; } = null!;
[Column("description")]
public string? Description { get; set; }
}

View File

@ -29,8 +29,12 @@ public class PhotoItem
[Column("dateupload"), NotNull]
public long DateUploadUnixTime { get; set; }
public DateTimeOffset DateUpload => DateTimeOffset.FromUnixTimeMilliseconds(DateUploadUnixTime);
[Column("url")]
public string Url { get; set; } = null!;
[Column("width")]
public int? Width { get; set; }
[Column("height")]
public int? Height { get; set; }
}

View File

@ -19,8 +19,6 @@ public class RecordItem
[Column("date"), NotNull]
public long DateUnixTime { get; set; }
public DateTimeOffset Date => DateTimeOffset.FromUnixTimeMilliseconds(DateUnixTime);
[Column("byuid")]
public int? ByUserId { get; set; }

View File

@ -4,15 +4,15 @@ namespace Blahblah.FlowerApp.Data.Model;
public class UserItem
{
[Column("uid"), PrimaryKey, AutoIncrement]
[Column("uid"), PrimaryKey, NotNull]
public int Id { get; set; }
[Column("token"), Indexed, NotNull]
public string Token { get; set; } = null!;
[Column("id"), NotNull]
public string UserId { get; set; } = null!;
[Column("token"), NotNull]
public string Token { get; set; } = null!;
[Column("name"), NotNull]
public string Name { get; set; } = null!;
@ -22,8 +22,6 @@ public class UserItem
[Column("regdate"), NotNull]
public long RegisterDateUnixTime { get; set; }
public DateTimeOffset RegisterDate => DateTimeOffset.FromUnixTimeMilliseconds(RegisterDateUnixTime);
//[Column("activedate")]
//public long? ActiveDateUnixTime { get; set; }