Files
TakeoutSaaS.TenantApi/src/Application/TakeoutSaaS.Application/App/Stores/Dto/StoreHolidayDto.cs

75 lines
1.7 KiB
C#

using System.Text.Json.Serialization;
using TakeoutSaaS.Domain.Stores.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.App.Stores.Dto;
/// <summary>
/// 门店临时时段 DTO。
/// </summary>
public sealed record StoreHolidayDto
{
/// <summary>
/// 节假日 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
/// <summary>
/// 租户 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
/// <summary>
/// 门店 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long StoreId { get; init; }
/// <summary>
/// 开始日期。
/// </summary>
public DateTime Date { get; init; }
/// <summary>
/// 结束日期(可选)。
/// </summary>
public DateTime? EndDate { get; init; }
/// <summary>
/// 是否全天。
/// </summary>
public bool IsAllDay { get; init; }
/// <summary>
/// 开始时间。
/// </summary>
public TimeSpan? StartTime { get; init; }
/// <summary>
/// 结束时间。
/// </summary>
public TimeSpan? EndTime { get; init; }
/// <summary>
/// 覆盖类型。
/// </summary>
public OverrideType OverrideType { get; init; }
/// <summary>
/// 是否闭店(兼容)。
/// </summary>
public bool IsClosed { get; init; }
/// <summary>
/// 说明。
/// </summary>
public string? Reason { get; init; }
/// <summary>
/// 创建时间。
/// </summary>
public DateTime CreatedAt { get; init; }
}