namespace JiDangJia.Contracts; public sealed record AppUpdateOffer(AppRelease? Release); public sealed record AppRelease(string Id,string PackageId,int VersionCode,string VersionName,int MinimumVersionCode,string Notes,long Size,string Sha256,string PublishedAt,bool Enabled) { public string DownloadPath=>"/api/updates/"+Id+"/apk"; public bool RequiredFor(int installed)=>installedversion)throw new ArgumentException("最低可用版本号应在 0 与新版本号之间,0 表示可稍后更新"); if(string.IsNullOrWhiteSpace(request.Notes)||request.Notes.Length>8000)throw new ArgumentException("更新说明请填写 1–8000 个字符"); } }