using System.Application.Entities; using MPKey = MessagePack.KeyAttribute; using MPObject = MessagePack.MessagePackObjectAttribute; namespace System.Application.Models { [MPObject] public class AppVersionDTO : IEntity, IExplicitHasValue { [MPKey(0)] public Guid Id { get; set; } /// /// 版本号 /// [MPKey(1)] public string? Version { get; set; } /// /// 哈希SHA256验证安装包,可选 /// [MPKey(2)] public string? SHA256 { get; set; } /// /// 本次更新描述 /// [MPKey(3)] public string? Description { get; set; } /// /// 下载链接 /// [MPKey(4)] public string? DownloadLink { get; set; } bool IExplicitHasValue.ExplicitHasValue() { return !string.IsNullOrWhiteSpace(Version) && !string.IsNullOrWhiteSpace(SHA256) && !string.IsNullOrWhiteSpace(Description) && !string.IsNullOrWhiteSpace(DownloadLink); } } }