implement Phase 1-2
This commit is contained in:
parent
41573b3c4f
commit
b976cf3124
23 changed files with 1291 additions and 79 deletions
28
backend/WordVersioning.Api/Models/VersionDtos.cs
Normal file
28
backend/WordVersioning.Api/Models/VersionDtos.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace WordVersioning.Api.Models;
|
||||
|
||||
/// <summary>body ของ POST /api/documents/{documentId}/versions (multipart/form-data)</summary>
|
||||
public class UploadVersionRequest
|
||||
{
|
||||
[Required]
|
||||
public IFormFile File { get; set; } = null!;
|
||||
|
||||
/// <summary>GUID ที่ client generate ต่อ version — ใช้เป็นส่วนหนึ่งของ object key</summary>
|
||||
[Required]
|
||||
public string ClientVersionId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>JSON object map tag→text จาก content controls (FR-11 — Phase 3 จะใช้ sync เต็มรูปแบบ)</summary>
|
||||
public string? Fields { get; set; }
|
||||
}
|
||||
|
||||
public record UploadVersionResponse(Guid VersionId, int VersionNumber);
|
||||
|
||||
/// <summary>item ของ version history — fields คือ snapshot ที่ parse แล้ว (ถ้ามี)</summary>
|
||||
public record VersionListItem(
|
||||
Guid VersionId,
|
||||
int VersionNumber,
|
||||
DateTimeOffset CreatedAt,
|
||||
string CreatedByUserId,
|
||||
string ContentHash,
|
||||
object? Fields);
|
||||
Loading…
Add table
Add a link
Reference in a new issue