2026-08-19 10:54:55 +07:00
|
|
|
namespace WordVersioning.Api.Services;
|
|
|
|
|
|
|
|
|
|
/// <summary>Config การเชื่อม MinIO — bind จาก section "MinIO" ใน appsettings/env
|
|
|
|
|
/// (rule: ห้าม hardcode — deploy ได้โดยไม่แก้โค้ด เช่น MinIO__Endpoint)</summary>
|
|
|
|
|
public class MinioOptions
|
|
|
|
|
{
|
|
|
|
|
public const string SectionName = "MinIO";
|
|
|
|
|
|
2026-09-01 10:51:14 +07:00
|
|
|
/// <summary>host:port ไม่รวม scheme (เช่น localhost:39000 หรือ minio:9000)</summary>
|
|
|
|
|
public string Endpoint { get; set; } = "localhost:39000";
|
2026-08-19 10:54:55 +07:00
|
|
|
|
|
|
|
|
public string AccessKey { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string SecretKey { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public bool UseSSL { get; set; }
|
|
|
|
|
|
|
|
|
|
public string VersionsBucket { get; set; } = "docx-versions";
|
|
|
|
|
|
|
|
|
|
public string TemplatesBucket { get; set; } = "docx-templates";
|
2026-08-19 23:06:57 +07:00
|
|
|
|
2026-09-10 11:49:16 +07:00
|
|
|
/// <summary>FR-16 — จำนวนวันที่ไฟล์ร่าง (object ใต้ prefix `drafts/` ของ VersionsBucket) ถูกลบโดย
|
|
|
|
|
/// lifecycle rule (ผู้ใช้เปิดผ่าน presigned URL ในไม่กี่นาทีแรก หลังจากนั้นเป็นขยะ)</summary>
|
|
|
|
|
public int DraftRetentionDays { get; set; } = 1;
|
2026-08-19 10:54:55 +07:00
|
|
|
}
|