change app directory
This commit is contained in:
41
FlowerApp/Data/Model/FlowerItem.cs
Normal file
41
FlowerApp/Data/Model/FlowerItem.cs
Normal 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; }
|
||||
}
|
36
FlowerApp/Data/Model/PhotoItem.cs
Normal file
36
FlowerApp/Data/Model/PhotoItem.cs
Normal 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!;
|
||||
}
|
38
FlowerApp/Data/Model/RecordItem.cs
Normal file
38
FlowerApp/Data/Model/RecordItem.cs
Normal 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; }
|
||||
}
|
40
FlowerApp/Data/Model/UserItem.cs
Normal file
40
FlowerApp/Data/Model/UserItem.cs
Normal 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; }
|
||||
}
|
Reference in New Issue
Block a user