forked from gongxuegit/tiku-backend.net
feat: enforce tenant isolation and shared question bank
This commit is contained in:
28
Tiku.Api/Contracts/TenantFrontendConfigDtos.cs
Normal file
28
Tiku.Api/Contracts/TenantFrontendConfigDtos.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json;
|
||||
using Tiku.Application.Tenancy;
|
||||
using Tiku.Domain.Common;
|
||||
|
||||
namespace Tiku.Api.Contracts;
|
||||
|
||||
public sealed class SaveTenantFrontendConfigDraftDto
|
||||
{
|
||||
public JsonElement Branding { get; set; } = JsonDefaults.Object();
|
||||
public JsonElement Theme { get; set; } = JsonDefaults.Object();
|
||||
public JsonElement Features { get; set; } = JsonDefaults.Object();
|
||||
public JsonElement Navigation { get; set; } = JsonDefaults.Array();
|
||||
public JsonElement HomeModules { get; set; } = JsonDefaults.Array();
|
||||
|
||||
public TenantFrontendConfigDraft ToDraft() => new(
|
||||
Branding,
|
||||
Theme,
|
||||
Features,
|
||||
Navigation,
|
||||
HomeModules);
|
||||
}
|
||||
|
||||
public sealed class PublishTenantFrontendConfigDto
|
||||
{
|
||||
[Range(1, int.MaxValue)]
|
||||
public int ExpectedVersion { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user