flower-story/Server/Controller/CommentApiController.structs.cs
2023-08-09 17:34:18 +08:00

45 lines
913 B
C#

using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Blahblah.FlowerStory.Server.Controller;
/// <summary>
/// 评论参数
/// </summary>
public record CommentParameter
{
/// <summary>
/// 事件唯一 id
/// </summary>
[Required]
public required int RecordId { get; init; }
/// <summary>
/// 内容
/// </summary>
[Required]
public required string Text { get; init; }
/// <summary>
/// 评论分类 id
/// </summary>
public int? TypeId { get; init; }
/// <summary>
/// 操作人姓名
/// </summary>
public string? ByUser { get; init; }
/// <summary>
/// 纬度
/// </summary>
[JsonPropertyName("lat")]
public double? Latitude { get; init; }
/// <summary>
/// 经度
/// </summary>
[JsonPropertyName("lon")]
public double? Longitude { get; set; }
}