add some APIs

This commit is contained in:
2023-07-13 12:10:30 +08:00
parent 32464cb494
commit 8b759c94ec
34 changed files with 1211 additions and 1889 deletions

View File

@ -18,16 +18,29 @@ public class PhotoItem
[Required]
public int Id { get; set; }
/// <summary>
/// 关联人 id
/// </summary>
[Column("uid")]
[ForeignKey(nameof(Owner))]
[Required]
public required int OwnerId { get; set; }
/// <summary>
/// 关联人
/// </summary>
[JsonIgnore]
public UserItem? Owner { get; set; }
/// <summary>
/// 关联花草 id
/// </summary>
[Column("fid")]
[ForeignKey(nameof(Flower))]
[Required]
public int FlowerId { get; set; }
public int? FlowerId { get; set; }
/// <summary>
/// 关联花草
/// 关联花草
/// </summary>
[JsonIgnore]
public FlowerItem? Flower { get; set; }
@ -37,8 +50,7 @@ public class PhotoItem
/// </summary>
[Column("rid")]
[ForeignKey(nameof(Record))]
[Required]
public int RecordId { get; set; }
public int? RecordId { get; set; }
/// <summary>
/// 关联的事件
@ -73,7 +85,7 @@ public class PhotoItem
[Column("dateupload")]
[Required]
[JsonPropertyName("dateUpload")]
public long DateUploadUnixTime { get; set; }
public required long DateUploadUnixTime { get; set; }
/// <summary>
/// 上传时间