change app directory

This commit is contained in:
2023-07-19 21:01:19 +08:00
parent 8b759c94ec
commit 02ac33fc07
56 changed files with 781 additions and 535 deletions

View File

@ -0,0 +1,41 @@
using SQLite;
namespace Blahblah.FlowerApp.Data.Model;
[Table("flowers")]
public class FlowerItem
{
[Column("fid"), PrimaryKey, NotNull]
public int Id { get; set; }
[Column("uid"), NotNull]
public int OwnerId { get; set; }
[Column("category"), NotNull]
public int Category { get; set; }
[Column("Name"), NotNull]
public string Name { get; set; } = null!;
[Column("datebuy"), NotNull]
public long DateBuyUnixTime { get; set; }
public DateTimeOffset DateBuy => DateTimeOffset.FromUnixTimeMilliseconds(DateBuyUnixTime);
[Column("cost")]
public decimal? Cost { get; set; }
[Column("purchase")]
public string? PurchaseFrom { get; set; }
[Column("memo")]
public string? Memo { get; set; }
[Column("latitude")]
public double? Latitude { get; set; }
[Column("longitude")]
public double? Longitude { get; set; }
public int? Distance { get; set; }
}

View File

@ -0,0 +1,36 @@
using SQLite;
namespace Blahblah.FlowerApp.Data.Model;
[Table("photos")]
public class PhotoItem
{
[Column("pid"), PrimaryKey, NotNull]
public int Id { get; set; }
[Column("uid"), NotNull]
public int OwnerId { get; set; }
[Column("fid"), NotNull]
public int FlowerId { get; set; }
[Column("rid"), NotNull]
public int RecordId { get; set; }
[Column("filetype"), NotNull]
public string FileType { get; set; } = null!;
[Column("filename"), NotNull]
public string FileName { get; set; } = null!;
[Column("path"), NotNull]
public string Path { get; set; } = null!;
[Column("dateupload"), NotNull]
public long DateUploadUnixTime { get; set; }
public DateTimeOffset DateUpload => DateTimeOffset.FromUnixTimeMilliseconds(DateUploadUnixTime);
[Column("url")]
public string Url { get; set; } = null!;
}

View File

@ -0,0 +1,38 @@
using SQLite;
namespace Blahblah.FlowerApp.Data.Model;
public class RecordItem
{
[Column("rid"), PrimaryKey, NotNull]
public int Id { get; set; }
[Column("uid"), NotNull]
public int OwnerId { get; set; }
[Column("fid"), NotNull]
public int FlowerId { get; set; }
[Column("event"), NotNull]
public int EventType { get; set; }
[Column("date"), NotNull]
public long DateUnixTime { get; set; }
public DateTimeOffset Date => DateTimeOffset.FromUnixTimeMilliseconds(DateUnixTime);
[Column("byuid")]
public int? ByUserId { get; set; }
[Column("byname")]
public string? ByUserName { get; set; }
[Column("memo")]
public string? Memo { get; set; }
[Column("latitude")]
public double? Latitude { get; set; }
[Column("longitude")]
public double? Longitude { get; set; }
}

View File

@ -0,0 +1,40 @@
using SQLite;
namespace Blahblah.FlowerApp.Data.Model;
public class UserItem
{
[Column("uid"), PrimaryKey, AutoIncrement]
public int Id { get; set; }
[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!;
[Column("level"), NotNull]
public int Level { get; set; }
[Column("regdate"), NotNull]
public long RegisterDateUnixTime { get; set; }
public DateTimeOffset RegisterDate => DateTimeOffset.FromUnixTimeMilliseconds(RegisterDateUnixTime);
//[Column("activedate")]
//public long? ActiveDateUnixTime { get; set; }
//public DateTimeOffset? ActiveDate => ActiveDateUnixTime == null ? null : DateTimeOffset.FromUnixTimeMilliseconds(ActiveDateUnixTime.Value);
[Column("email")]
public string? Email { get; set; }
[Column("mobile")]
public string? Mobile { get; set; }
[Column("avatar")]
public byte[]? Avatar { get; set; }
}