feat: finalize core modules and gateway

This commit is contained in:
2025-11-23 18:53:12 +08:00
parent 429d4fb747
commit ae273e510a
115 changed files with 4695 additions and 223 deletions

View File

@@ -0,0 +1,54 @@
using System.ComponentModel.DataAnnotations;
namespace TakeoutSaaS.Module.Storage.Options;
/// <summary>
/// 腾讯云 COS 访问配置。
/// </summary>
public sealed class TencentCosOptions
{
/// <summary>
/// SecretId。
/// </summary>
[Required]
public string SecretId { get; set; } = string.Empty;
/// <summary>
/// SecretKey。
/// </summary>
[Required]
public string SecretKey { get; set; } = string.Empty;
/// <summary>
/// 存储地域(如 ap-guangzhou
/// </summary>
[Required]
public string Region { get; set; } = string.Empty;
/// <summary>
/// 存储桶名称(含 AppId如 takeout-bucket-123456
/// </summary>
[Required]
public string Bucket { get; set; } = string.Empty;
/// <summary>
/// COS 自定义域名或 API Endpoint可选未配置则根据 Region 生成默认域名。
/// </summary>
public string? Endpoint { get; set; }
/// <summary>
/// CDN 域名(可选),用于生成加速访问地址。
/// </summary>
[Url]
public string? CdnBaseUrl { get; set; }
/// <summary>
/// 是否使用 HTTPS。
/// </summary>
public bool UseHttps { get; set; } = true;
/// <summary>
/// 是否强制使用 PathStyle 访问COS 默认可使用虚拟主机形式。
/// </summary>
public bool ForcePathStyle { get; set; }
}