feat: 门店员工与排班管理上线

This commit is contained in:
2025-12-04 09:32:03 +08:00
parent 1a5209a8b1
commit 19422df0f1
31 changed files with 1265 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
using TakeoutSaaS.Application.App.Stores.Dto;
using TakeoutSaaS.Domain.Merchants.Entities;
using TakeoutSaaS.Domain.Stores.Entities;
namespace TakeoutSaaS.Application.App.Stores;
@@ -96,4 +97,41 @@ public static class StoreMapping
QrCodeUrl = table.QrCodeUrl,
CreatedAt = table.CreatedAt
};
/// <summary>
/// 映射排班 DTO。
/// </summary>
/// <param name="shift">排班实体。</param>
/// <returns>DTO。</returns>
public static StoreEmployeeShiftDto ToDto(StoreEmployeeShift shift) => new()
{
Id = shift.Id,
TenantId = shift.TenantId,
StoreId = shift.StoreId,
StaffId = shift.StaffId,
ShiftDate = shift.ShiftDate,
StartTime = shift.StartTime,
EndTime = shift.EndTime,
RoleType = shift.RoleType,
Notes = shift.Notes,
CreatedAt = shift.CreatedAt
};
/// <summary>
/// 映射门店员工 DTO。
/// </summary>
/// <param name="staff">员工实体。</param>
/// <returns>DTO。</returns>
public static StoreStaffDto ToDto(MerchantStaff staff) => new()
{
Id = staff.Id,
TenantId = staff.TenantId,
MerchantId = staff.MerchantId,
StoreId = staff.StoreId,
Name = staff.Name,
Phone = staff.Phone,
Email = staff.Email,
RoleType = staff.RoleType,
Status = staff.Status
};
}