From 577ea8dfce95a67c05253d810f69436e655589fe Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 21 Sep 2025 02:14:44 +0800 Subject: [PATCH 01/21] add role permission module. --- .../Dashboard/DashboardService.cs | 2 +- .../Administrator/AdminService.cs | 417 +++++++++++++++++- .../Administrator/IAdminService.cs | 36 ++ .../SystemManagement/Menu/MenuService.cs | 166 ++++++- .../Permission/IPermissionAppService.cs | 18 + .../Permission/PermissionAppService.cs | 102 +++++ .../SystemManagement/Role/IRoleAppService.cs | 29 ++ .../SystemManagement/Role/RoleAppService.cs | 224 +++++++++- .../BaseDto/MenuDto.cs | 5 + .../AssignUserPermissionsInputDto.cs | 20 + .../GrantRolePermissionsInputDto.cs | 21 + .../Dto/Permission/ReadPermissionDtos.cs | 61 +++ .../Permission/UserRolePermissionOutputDto.cs | 35 ++ .../Dto/Role/AssignRoleUsersInputDto.cs | 20 + .../Dto/Role/AssignUserRolesInputDto.cs | 20 + .../SystemManagement/Permission.cs | 84 ++++ .../DatabaseInitializer.cs | 103 ++++- .../EntityBuilder.cs | 161 ++++++- .../Authorization/PermissionsAuthorization.cs | 157 +++++++ .../Administrator/AdminController.cs | 66 +++ .../Permission/PermissionController.cs | 33 ++ .../SystemManagement/Role/RoleController.cs | 52 +++ EOM.TSHotelManagement.WebApi/Startup.cs | 18 +- version.txt | Bin 16 -> 16 bytes 24 files changed, 1815 insertions(+), 35 deletions(-) create mode 100644 EOM.TSHotelManagement.Application/SystemManagement/Permission/IPermissionAppService.cs create mode 100644 EOM.TSHotelManagement.Application/SystemManagement/Permission/PermissionAppService.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Core/SystemManagement/Permission.cs create mode 100644 EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs create mode 100644 EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Permission/PermissionController.cs diff --git a/EOM.TSHotelManagement.Application/Dashboard/DashboardService.cs b/EOM.TSHotelManagement.Application/Dashboard/DashboardService.cs index 7ada8e1..b3268b5 100644 --- a/EOM.TSHotelManagement.Application/Dashboard/DashboardService.cs +++ b/EOM.TSHotelManagement.Application/Dashboard/DashboardService.cs @@ -353,7 +353,7 @@ namespace EOM.TSHotelManagement.Application dto.TotalProducts = (int)sellThings.Sum(a => a.Stock); dto.RecentRecords = spendRepository.AsQueryable() - .Where(a => a.IsDelete != 1) + .Where(a => a.IsDelete != 1 && a.ConsumptionType == SpendType.Product.Code) .OrderByDescending(a => a.ConsumptionTime) .Take(3) .Select(a => new TempInventoryRecord diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index 1f27014..2bf49e8 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -1,17 +1,17 @@ /* * MIT License *Copyright (c) 2021 易开元(Easy-Open-Meta) - + *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: - + *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. - + *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -21,14 +21,16 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using jvncorelib.EncryptorLib; -using jvncorelib.EntityLib; -using SqlSugar; -using System.Security.Claims; + using EOM.TSHotelManagement.Common.Contract; + using EOM.TSHotelManagement.Common.Core; + using EOM.TSHotelManagement.Common.Util; + using EOM.TSHotelManagement.EntityFramework; + using jvncorelib.EncryptorLib; + using jvncorelib.EntityLib; + using SqlSugar; + using System.Security.Claims; + using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; + using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; namespace EOM.TSHotelManagement.Application { @@ -47,6 +49,25 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository adminTypeRepository; + /// + /// 用户-角色 + /// + private readonly GenericRepository userRoleRepository; + + /// + /// 角色-权限 + /// + private readonly GenericRepository rolePermissionRepository; + + /// + /// 权限 + /// + private readonly GenericRepository permissionRepository; +/// +/// 角色 +/// +private readonly GenericRepository roleRepository; + /// /// 数据保护 /// @@ -70,10 +91,23 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public AdminService(GenericRepository adminRepository, GenericRepository adminTypeRepository, DataProtectionHelper dataProtectionProvider, EncryptLib encrypt, JWTHelper jWTHelper) + public AdminService( + GenericRepository adminRepository, + GenericRepository adminTypeRepository, + GenericRepository userRoleRepository, + GenericRepository rolePermissionRepository, + GenericRepository permissionRepository, + GenericRepository roleRepository, + DataProtectionHelper dataProtectionProvider, + EncryptLib encrypt, + JWTHelper jWTHelper) { this.adminRepository = adminRepository; this.adminTypeRepository = adminTypeRepository; + this.userRoleRepository = userRoleRepository; + this.rolePermissionRepository = rolePermissionRepository; + this.permissionRepository = permissionRepository; + this.roleRepository = roleRepository; this.dataProtector = dataProtectionProvider; this.encrypt = encrypt; this.jWTHelper = jWTHelper; @@ -199,7 +233,7 @@ namespace EOM.TSHotelManagement.Application { try { - var haveSuperAdmin = adminRepository.IsAny(a => a.IsSuperAdmin == createAdministratorInputDto.IsSuperAdmin && a.IsDelete != 1); + var haveSuperAdmin = adminRepository.IsAny(a => a.IsSuperAdmin == 1 && a.IsDelete != 1); if (haveSuperAdmin) { return new BaseResponse { Message = LocalizationHelper.GetLocalizedString("Super Administrator already exists", "超级管理员已存在"), Code = BusinessStatusCode.InternalServerError }; @@ -365,5 +399,362 @@ namespace EOM.TSHotelManagement.Application } return new BaseResponse(); } + + /// + /// 为用户分配角色(全量覆盖) + /// + /// + /// + public BaseResponse AssignUserRoles(AssignUserRolesInputDto input) + { + if (input == null || input.UserNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码")); + } + + try + { + // 校验用户是否存在且未删除 + var userExists = adminRepository.IsAny(a => a.Number == input.UserNumber && a.IsDelete != 1); + if (!userExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("User not found", "用户不存在")); + } + + // 软删除当前用户下所有有效的角色绑定 + var existing = userRoleRepository.AsQueryable() + .Where(x => x.UserNumber == input.UserNumber && x.IsDelete != 1) + .Select(x => new UserRole { UserNumber = x.UserNumber, RoleNumber = x.RoleNumber, IsDelete = 1 }) + .ToList(); + + foreach (var ur in existing) + { + userRoleRepository.SoftDelete(ur); + } + + // 过滤、去重、忽略空白 + var roles = (input.RoleNumbers ?? new List()) + .Where(r => !r.IsNullOrEmpty()) + .Select(r => r.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 插入新的角色绑定 + foreach (var role in roles) + { + var entity = new UserRole + { + UserNumber = input.UserNumber, + RoleNumber = role, + IsDelete = 0 + }; + userRoleRepository.Insert(entity); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Assign roles success", "分配角色成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Assign roles failed: {ex.Message}", $"分配角色失败:{ex.Message}")); + } + } + + /// + /// 读取指定用户已分配的角色编码集合 + /// + /// 用户编码 + /// 角色编码集合(RoleNumber 列表) + public ListOutputDto ReadUserRoles(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var roleNumbers = userRoleRepository.AsQueryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToList(); + + roleNumbers = roleNumbers?.Where(r => !r.IsNullOrEmpty())?.Distinct(StringComparer.OrdinalIgnoreCase)?.ToList() ?? new List(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = roleNumbers, + TotalCount = roleNumbers.Count + } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + } + + /// + /// 读取指定用户的“角色-权限”明细(来自 RolePermission 关联,并联到 Permission 得到权限码与名称) + /// + /// 用户编码 + /// 明细列表(包含 RoleNumber、PermissionNumber、PermissionName、MenuKey) + public ListOutputDto ReadUserRolePermissions(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + // 1) 用户 -> 角色 + var roleNumbers = userRoleRepository.AsQueryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToList(); + + roleNumbers = roleNumbers? + .Where(r => !r.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList() ?? new List(); + + if (roleNumbers.Count == 0) + { + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + + // 2) 角色 -> 权限编码(RolePermission) + var rolePermList = rolePermissionRepository.AsQueryable() + .Where(rp => rp.IsDelete != 1 && roleNumbers.Contains(rp.RoleNumber)) + .Select(rp => new { rp.RoleNumber, rp.PermissionNumber }) + .ToList(); + + var permNumbers = rolePermList + .Select(x => x.PermissionNumber) + .Where(x => !x.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 3) 权限详情(Permission) + var permInfo = new Dictionary(StringComparer.OrdinalIgnoreCase); + if (permNumbers.Count > 0) + { + var info = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && permNumbers.Contains(p.PermissionNumber)) + .Select(p => new { p.PermissionNumber, p.PermissionName, p.MenuKey }) + .ToList(); + + foreach (var p in info) + { + permInfo[p.PermissionNumber] = (p.PermissionName, p.MenuKey ?? string.Empty); + } + } + + // 4) 组装输出 + var resultItems = rolePermList.Select(x => + { + permInfo.TryGetValue(x.PermissionNumber, out var meta); + return new UserRolePermissionOutputDto + { + RoleNumber = x.RoleNumber, + PermissionNumber = x.PermissionNumber, + PermissionName = meta.Name, + MenuKey = meta.MenuKey + }; + }).ToList(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = resultItems, + TotalCount = resultItems.Count + } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + } + + /// + /// 为指定用户分配“直接权限”(通过专属角色 R-USER-{UserNumber} 写入 RolePermission,全量覆盖) + /// + public BaseResponse AssignUserPermissions(AssignUserPermissionsInputDto input) + { + if (input == null || input.UserNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码")); + } + + try + { + // 校验用户是否存在且未删除 + var userExists = adminRepository.IsAny(a => a.Number == input.UserNumber && a.IsDelete != 1); + if (!userExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("User not found", "用户不存在")); + } + + var userRoleNumber = $"R-USER-{input.UserNumber}"; + + // 确保专属角色存在 + var existsRole = roleRepository.IsAny(r => r.RoleNumber == userRoleNumber && r.IsDelete != 1); + if (!existsRole) + { + var role = new Role + { + RoleNumber = userRoleNumber, + RoleName = $"用户{input.UserNumber}直接权限", + RoleDescription = $"用户{input.UserNumber}直接权限", + IsDelete = 0 + }; + roleRepository.Insert(role); + } + + // 软删除当前专属角色下所有有效的角色-权限绑定 + var existing = rolePermissionRepository.AsQueryable() + .Where(x => x.RoleNumber == userRoleNumber && x.IsDelete != 1) + .Select(x => new RolePermission { RoleNumber = x.RoleNumber, PermissionNumber = x.PermissionNumber, IsDelete = 1 }) + .ToList(); + + foreach (var rp in existing) + { + rolePermissionRepository.SoftDelete(rp); + } + + // 过滤、去重、忽略空白 + var perms = (input.PermissionNumbers ?? new List()) + .Where(p => !p.IsNullOrEmpty()) + .Select(p => p.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + if (perms.Count > 0) + { + // 仅保留系统中存在的权限码 + var validPerms = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && perms.Contains(p.PermissionNumber)) + .Select(p => p.PermissionNumber) + .ToList(); + + foreach (var pnum in validPerms) + { + var entity = new RolePermission + { + RoleNumber = userRoleNumber, + PermissionNumber = pnum, + IsDelete = 0 + }; + rolePermissionRepository.Insert(entity); + } + } + + // 确保用户与专属角色绑定存在 + var hasBinding = userRoleRepository.IsAny(ur => ur.UserNumber == input.UserNumber && ur.RoleNumber == userRoleNumber && ur.IsDelete != 1); + if (!hasBinding) + { + userRoleRepository.Insert(new UserRole + { + UserNumber = input.UserNumber, + RoleNumber = userRoleNumber, + IsDelete = 0 + }); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Assign direct permissions success", "分配直接权限成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Assign direct permissions failed: {ex.Message}", $"分配直接权限失败:{ex.Message}")); + } + } + + /// + /// 读取指定用户的“直接权限”(仅来自专属角色 R-USER-{UserNumber} 的权限编码列表) + /// + public ListOutputDto ReadUserDirectPermissions(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var roleNumber = $"R-USER-{userNumber}"; + var list = rolePermissionRepository.AsQueryable() + .Where(rp => rp.RoleNumber == roleNumber && rp.IsDelete != 1) + .Select(rp => rp.PermissionNumber) + .ToList(); + + list = list?.Where(x => !x.IsNullOrEmpty())?.Distinct(StringComparer.OrdinalIgnoreCase)?.ToList() ?? new List(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData { Items = list, TotalCount = list.Count } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + } } } diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs index 03bb441..2600bc0 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs @@ -22,6 +22,7 @@ * */ using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; namespace EOM.TSHotelManagement.Application { @@ -90,5 +91,40 @@ namespace EOM.TSHotelManagement.Application /// /// BaseResponse DelAdminType(DeleteAdministratorTypeInputDto deleteAdministratorTypeInputDto); + + /// + /// 为用户分配角色(全量覆盖) + /// + /// + /// + BaseResponse AssignUserRoles(AssignUserRolesInputDto input); + + /// + /// 读取指定用户已分配的角色编码集合 + /// + /// 用户编码 + /// 角色编码集合(RoleNumber 列表) + ListOutputDto ReadUserRoles(string userNumber); + + /// + /// 读取指定用户的“角色-权限”明细(来自 RolePermission 关联,并联到 Permission 得到权限码与名称) + /// + /// 用户编码 + /// 明细列表(包含 RoleNumber、PermissionNumber、PermissionName、MenuKey) + ListOutputDto ReadUserRolePermissions(string userNumber); + + /// + /// 为指定用户分配“直接权限”(通过专属角色 R-USER-{UserNumber} 写入 RolePermission,全量覆盖) + /// + /// 用户编号与权限编码集合 + /// + BaseResponse AssignUserPermissions(Common.Contract.SystemManagement.Dto.Permission.AssignUserPermissionsInputDto input); + + /// + /// 读取指定用户的“直接权限”(仅来自专属角色 R-USER-{UserNumber} 的权限编码列表) + /// + /// 用户编码 + /// 权限编码集合(PermissionNumber 列表) + ListOutputDto ReadUserDirectPermissions(string userNumber); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs index 1affeed..724a189 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs @@ -44,16 +44,30 @@ namespace EOM.TSHotelManagement.Application /// JWT助手 /// private readonly JWTHelper jWTHelper; + private readonly GenericRepository permissionRepository; + private readonly GenericRepository rolePermissionRepository; + private readonly GenericRepository userRoleRepository; + private readonly GenericRepository administratorRepository; /// /// /// /// /// - public MenuService(GenericRepository menuRepository, JWTHelper jWTHelper) + public MenuService( + GenericRepository menuRepository, + JWTHelper jWTHelper, + GenericRepository permissionRepository, + GenericRepository rolePermissionRepository, + GenericRepository userRoleRepository, + GenericRepository administratorRepository) { this.menuRepository = menuRepository; this.jWTHelper = jWTHelper; + this.permissionRepository = permissionRepository; + this.rolePermissionRepository = rolePermissionRepository; + this.userRoleRepository = userRoleRepository; + this.administratorRepository = administratorRepository; } /// @@ -62,15 +76,143 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto BuildMenuAll(BaseInputDto baseInputDto) { - var token = baseInputDto.UserToken; + // 1) 读取所有未删除的菜单 + List allMenus = menuRepository.GetList(a => a.IsDelete != 1).OrderBy(a => a.Id).ToList(); - var number = jWTHelper.GetSerialNumber(token); + // 默认:空用户/无权限 -> 返回空树 + List filteredMenus = new(); + // 前端按钮权限:按菜单Key聚合的“用户拥有的权限编码”集合 + Dictionary> menuPermMap = null; - List allMenus = menuRepository.GetList(a => a.IsDelete != 1).OrderBy(a => a.Id).ToList(); + try + { + var token = baseInputDto?.UserToken; + var userNumber = string.Empty; - ListOutputDto result = BuildMenuTree(allMenus); + if (!string.IsNullOrWhiteSpace(token)) + { + try + { + userNumber = jWTHelper.GetSerialNumber(token); + } + catch + { + // token 无效则按无权限处理 + userNumber = string.Empty; + } + } + + // 超级管理员放行所有菜单 + var isSuperAdmin = false; + if (!string.IsNullOrWhiteSpace(userNumber)) + { + var admin = administratorRepository.GetFirst(a => a.Number == userNumber && a.IsDelete != 1); + isSuperAdmin = admin != null && admin.IsSuperAdmin == 1; + } + + if (isSuperAdmin) + { + filteredMenus = allMenus; + + // 超管:加载所有与菜单绑定的权限编码 + var allPermPairs = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && p.MenuKey != null) + .Select(p => new { p.MenuKey, p.PermissionNumber }) + .ToList(); + + menuPermMap = allPermPairs + .GroupBy(x => x.MenuKey!) + .ToDictionary(g => g.Key!, g => g.Select(x => x.PermissionNumber).Distinct().ToList()); + } + else if (!string.IsNullOrWhiteSpace(userNumber)) + { + // 2) 用户 -> 角色 + var roleNumbers = userRoleRepository.AsQueryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToList(); + + if (roleNumbers != null && roleNumbers.Count > 0) + { + // 3) 角色 -> 权限 + var permNumbers = rolePermissionRepository.AsQueryable() + .Where(rp => rp.IsDelete != 1 && roleNumbers.Contains(rp.RoleNumber)) + .Select(rp => rp.PermissionNumber) + .ToList(); + + if (permNumbers != null && permNumbers.Count > 0) + { + // 4) 权限 -> 绑定的菜单Key(Permission.MenuKey) + var permQuery = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && p.MenuKey != null && permNumbers.Contains(p.PermissionNumber)); + + var allowedKeys = new HashSet( + permQuery + .Select(p => p.MenuKey) + .ToList() + .Where(k => !string.IsNullOrWhiteSpace(k))! + ); + + // 同时按菜单Key聚合当前用户拥有的权限编码,供前端按钮级控制 + var userPermPairs = permQuery + .Select(p => new { p.MenuKey, p.PermissionNumber }) + .ToList(); + + menuPermMap = userPermPairs + .GroupBy(x => x.MenuKey!) + .ToDictionary(g => g.Key!, g => g.Select(x => x.PermissionNumber).Distinct().ToList()); + + // 5) 仅保留有权限的菜单,并补齐其父级(保证树连通) + var menuById = allMenus.ToDictionary(m => m.Id); + var menuByKey = allMenus.Where(m => !string.IsNullOrWhiteSpace(m.Key)) + .ToDictionary(m => m.Key!); + var allowedMenuIds = new HashSet(); + + foreach (var key in allowedKeys) + { + if (menuByKey.TryGetValue(key, out var menu)) + { + var current = menu; + while (current != null && !allowedMenuIds.Contains(current.Id)) + { + allowedMenuIds.Add(current.Id); + if (current.Parent.HasValue && menuById.TryGetValue(current.Parent.Value, out var parentMenu)) + { + current = parentMenu; + } + else + { + current = null; + } + } + } + } + + filteredMenus = allMenus.Where(m => allowedMenuIds.Contains(m.Id)).ToList(); + } + else + { + filteredMenus = new List(); + } + } + else + { + filteredMenus = new List(); + } + } + else + { + filteredMenus = new List(); + } + } + catch + { + // 异常情况下,回退为空树,避免泄露菜单 + filteredMenus = new List(); + } - return result; + // 6) 构建(过滤后的)菜单树(附带每个菜单Key下的用户权限编码集合) + return BuildMenuTree(filteredMenus, menuPermMap); } /// @@ -179,7 +321,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - private ListOutputDto BuildMenuTree(List menus) + private ListOutputDto BuildMenuTree(List menus, Dictionary> menuPermMap) { try { @@ -190,7 +332,7 @@ namespace EOM.TSHotelManagement.Application foreach (var menu in menus.Where(m => m.Parent == null)) { - var node = BuildTreeNode(menu, menuDict, processedIds); + var node = BuildTreeNode(menu, menuDict, processedIds, menuPermMap); if (node != null) rootNodes.Add(node); } @@ -219,7 +361,8 @@ namespace EOM.TSHotelManagement.Application private MenuDto BuildTreeNode( Menu menu, Dictionary menuDict, - HashSet processedIds) + HashSet processedIds, + Dictionary> menuPermMap) { processedIds.Add(menu.Id); @@ -229,6 +372,9 @@ namespace EOM.TSHotelManagement.Application Title = menu.Title, Path = menu.Path, Icon = menu.Icon, + Permissions = (menu.Key != null && menuPermMap != null && menuPermMap.TryGetValue(menu.Key, out var perms)) + ? perms + : new List(), Children = new List() }; @@ -238,7 +384,7 @@ namespace EOM.TSHotelManagement.Application foreach (var child in childMenus) { - var childNode = BuildTreeNode(child, menuDict, processedIds); + var childNode = BuildTreeNode(child, menuDict, processedIds, menuPermMap); if (childNode != null) { node.Children.Add(childNode); diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Permission/IPermissionAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Permission/IPermissionAppService.cs new file mode 100644 index 0000000..4b4ea63 --- /dev/null +++ b/EOM.TSHotelManagement.Application/SystemManagement/Permission/IPermissionAppService.cs @@ -0,0 +1,18 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; + +namespace EOM.TSHotelManagement.Application +{ + /// + /// 权限服务接口 + /// + public interface IPermissionAppService + { + /// + /// 查询权限列表(支持条件过滤与分页/忽略分页) + /// + /// 查询条件 + /// 权限列表 + ListOutputDto SelectPermissionList(ReadPermissionInputDto input); + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Permission/PermissionAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Permission/PermissionAppService.cs new file mode 100644 index 0000000..43bda29 --- /dev/null +++ b/EOM.TSHotelManagement.Application/SystemManagement/Permission/PermissionAppService.cs @@ -0,0 +1,102 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EntityLib; +using SqlSugar; + +namespace EOM.TSHotelManagement.Application +{ + /// + /// 权限服务实现 + /// + public class PermissionAppService : IPermissionAppService + { + private readonly GenericRepository permissionRepository; + + public PermissionAppService(GenericRepository permissionRepository) + { + this.permissionRepository = permissionRepository; + } + + /// + /// 查询权限列表(支持条件过滤与分页/忽略分页) + /// + public ListOutputDto SelectPermissionList(ReadPermissionInputDto input) + { + try + { + var where = Expressionable.Create(); + + if (!input.PermissionNumber.IsNullOrEmpty()) + { + where = where.And(x => x.PermissionNumber.Contains(input.PermissionNumber)); + } + if (!input.PermissionName.IsNullOrEmpty()) + { + where = where.And(x => x.PermissionName.Contains(input.PermissionName)); + } + if (!input.MenuKey.IsNullOrEmpty()) + { + where = where.And(x => x.MenuKey == input.MenuKey); + } + if (!input.Module.IsNullOrEmpty()) + { + where = where.And(x => x.Module == input.Module); + } + // 默认过滤已删除 + where = where.And(x => x.IsDelete != 1); + + var list = new List(); + var count = 0; + + if (!input.IgnorePaging && input.Page != 0 && input.PageSize != 0) + { + list = permissionRepository.AsQueryable() + .Where(where.ToExpression()) + .ToPageList(input.Page, input.PageSize, ref count); + } + else + { + list = permissionRepository.AsQueryable() + .Where(where.ToExpression()) + .ToList(); + count = list.Count; + } + + var outputItems = list.Select(p => new ReadPermissionOutputDto + { + PermissionNumber = p.PermissionNumber, + PermissionName = p.PermissionName, + Module = p.Module, + MenuKey = p.MenuKey, + Description = p.Description + }).ToList(); + + return new ListOutputDto + { + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = outputItems, + TotalCount = count + } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs index f5052da..bf5c31f 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs @@ -1,4 +1,6 @@ using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; namespace EOM.TSHotelManagement.Application { @@ -31,5 +33,32 @@ namespace EOM.TSHotelManagement.Application /// /// BaseResponse DeleteRole(DeleteRoleInputDto deleteRoleInputDto); + /// + /// 为角色授予权限(全量覆盖) + /// + /// + /// + BaseResponse GrantRolePermissions(GrantRolePermissionsInputDto input); + + /// + /// 读取指定角色已授予的权限编码集合 + /// + /// 角色编码 + /// 权限编码集合 + ListOutputDto ReadRolePermissions(string roleNumber); + + /// + /// 读取隶属于指定角色的管理员用户编码集合 + /// + /// 角色编码 + /// 管理员用户编码集合 + ListOutputDto ReadRoleUsers(string roleNumber); + + /// + /// 为角色分配管理员(全量覆盖) + /// + /// 包含角色编码与管理员编码集合 + /// 操作结果 + BaseResponse AssignRoleUsers(AssignRoleUsersInputDto input); } } diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs index fffe7fd..86fc1bf 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs @@ -1,4 +1,6 @@ using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; @@ -18,12 +20,26 @@ namespace EOM.TSHotelManagement.Application private readonly GenericRepository roleRepository; /// - /// + /// 角色-权限 仓储 + /// + private readonly GenericRepository rolePermissionRepository; + + /// + /// 用户-角色 仓储 + /// + private readonly GenericRepository userRoleRepository; + + /// + /// /// /// - public RoleAppService(GenericRepository roleRepository) + /// + /// + public RoleAppService(GenericRepository roleRepository, GenericRepository rolePermissionRepository, GenericRepository userRoleRepository) { this.roleRepository = roleRepository; + this.rolePermissionRepository = rolePermissionRepository; + this.userRoleRepository = userRoleRepository; } /// @@ -145,5 +161,209 @@ namespace EOM.TSHotelManagement.Application } return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Update Role Success", "更新角色成功")); } + + /// + /// 为角色授予权限(全量覆盖式) + /// + /// + /// + public BaseResponse GrantRolePermissions(GrantRolePermissionsInputDto input) + { + if (input == null || input.RoleNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("RoleNumber is required", "缺少角色编码")); + } + + try + { + // 校验角色是否存在且未删除 + var roleExists = roleRepository.IsAny(x => x.RoleNumber == input.RoleNumber && x.IsDelete != 1); + if (!roleExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("Role not found", "角色不存在")); + } + + // 软删除该角色现有有效的权限映射 + var existing = rolePermissionRepository.AsQueryable() + .Where(x => x.RoleNumber == input.RoleNumber && x.IsDelete != 1) + .Select(x => new RolePermission { RoleNumber = x.RoleNumber, PermissionNumber = x.PermissionNumber, IsDelete = 1 }) + .ToList(); + + foreach (var rp in existing) + { + rolePermissionRepository.SoftDelete(rp); + } + + // 过滤去重并忽略空白权限码 + var distinctPerms = (input.PermissionNumbers ?? new List()) + .Where(p => !p.IsNullOrEmpty()) + .Select(p => p.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 插入新的权限映射 + foreach (var perm in distinctPerms) + { + var entity = new RolePermission + { + RoleNumber = input.RoleNumber, + PermissionNumber = perm, + IsDelete = 0 + }; + rolePermissionRepository.Insert(entity); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Grant permissions success", "授予权限成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Grant permissions failed: {ex.Message}", $"授予权限失败:{ex.Message}")); + } + } + + /// + /// 读取指定角色已授予的权限编码集合 + /// + public ListOutputDto ReadRolePermissions(string roleNumber) + { + if (roleNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("RoleNumber is required", "缺少角色编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var list = rolePermissionRepository.AsQueryable() + .Where(rp => rp.RoleNumber == roleNumber && rp.IsDelete != 1) + .Select(rp => rp.PermissionNumber) + .ToList() ?? new List(); + + list = list.Where(x => !x.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData { Items = list, TotalCount = list.Count } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + } + + /// + /// 读取隶属于指定角色的管理员用户编码集合 + /// + public ListOutputDto ReadRoleUsers(string roleNumber) + { + if (roleNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("RoleNumber is required", "缺少角色编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var list = userRoleRepository.AsQueryable() + .Where(ur => ur.RoleNumber == roleNumber && ur.IsDelete != 1) + .Select(ur => ur.UserNumber) + .ToList() ?? new List(); + + list = list.Where(x => !x.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData { Items = list, TotalCount = list.Count } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + } + + /// + /// 为角色分配管理员(全量覆盖) + /// + public BaseResponse AssignRoleUsers(AssignRoleUsersInputDto input) + { + if (input == null || input.RoleNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("RoleNumber is required", "缺少角色编码")); + } + + try + { + // 校验角色是否存在且未删除 + var roleExists = roleRepository.IsAny(r => r.RoleNumber == input.RoleNumber && r.IsDelete != 1); + if (!roleExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("Role not found", "角色不存在")); + } + + // 软删除该角色当前所有有效的用户绑定 + var existing = userRoleRepository.AsQueryable() + .Where(ur => ur.RoleNumber == input.RoleNumber && ur.IsDelete != 1) + .Select(ur => new UserRole { RoleNumber = ur.RoleNumber, UserNumber = ur.UserNumber, IsDelete = 1 }) + .ToList(); + + foreach (var ur in existing) + { + userRoleRepository.SoftDelete(ur); + } + + // 过滤去重并忽略空白 + var users = (input.UserNumbers ?? new List()) + .Where(u => !u.IsNullOrEmpty()) + .Select(u => u.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 插入新的绑定 + foreach (var u in users) + { + var entity = new UserRole + { + RoleNumber = input.RoleNumber, + UserNumber = u, + IsDelete = 0 + }; + userRoleRepository.Insert(entity); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Assign users success", "分配用户成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Assign users failed: {ex.Message}", $"分配用户失败:{ex.Message}")); + } + } } } diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/MenuDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/MenuDto.cs index 6231229..4d44d71 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/MenuDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/MenuDto.cs @@ -25,6 +25,11 @@ /// public string Icon { get; set; } + /// + /// 该菜单下允许的权限编码集合(如:department.create / department.update 等) + /// + public List Permissions { get; set; } = new List(); + /// /// 子菜单 (Child Menus) /// diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs new file mode 100644 index 0000000..b26f7fa --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs @@ -0,0 +1,20 @@ +using EOM.TSHotelManagement.Common.Contract; + +namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission +{ + /// + /// 为指定用户分配“直接权限”(通过专属角色 R-USER-{UserNumber} 写入 RolePermission) + /// + public class AssignUserPermissionsInputDto : BaseInputDto + { + /// + /// 用户编码 + /// + public string UserNumber { get; set; } = null!; + + /// + /// 目标权限编码集合(全量覆盖) + /// + public List PermissionNumbers { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs new file mode 100644 index 0000000..43d270b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using EOM.TSHotelManagement.Common.Contract; + +namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission +{ + /// + /// 赋权请求入参(为角色授予一组权限码) + /// + public class GrantRolePermissionsInputDto : BaseInputDto + { + /// + /// 角色编码 + /// + public string RoleNumber { get; set; } + + /// + /// 权限编码集合(如:system:role:list、system:role:create) + /// + public List PermissionNumbers { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs new file mode 100644 index 0000000..691942b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs @@ -0,0 +1,61 @@ +using EOM.TSHotelManagement.Common.Contract; + +namespace EOM.TSHotelManagement.Common.Contract +{ + /// + /// 查询权限列表 入参 + /// + public class ReadPermissionInputDto : ListInputDto + { + /// + /// 权限编码(模糊) + /// + public string? PermissionNumber { get; set; } + + /// + /// 权限名称(模糊) + /// + public string? PermissionName { get; set; } + + /// + /// 所属菜单键(精确) + /// + public string? MenuKey { get; set; } + + /// + /// 所属模块(精确) + /// + public string? Module { get; set; } + } + + /// + /// 查询权限列表 出参 + /// + public class ReadPermissionOutputDto : BaseOutputDto + { + /// + /// 权限编码 + /// + public string PermissionNumber { get; set; } = null!; + + /// + /// 权限名称 + /// + public string PermissionName { get; set; } = string.Empty; + + /// + /// 所属模块 + /// + public string? Module { get; set; } + + /// + /// 所属菜单键(用于前端按菜单归类展示) + /// + public string? MenuKey { get; set; } + + /// + /// 描述 + /// + public string? Description { get; set; } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs new file mode 100644 index 0000000..b2db773 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs @@ -0,0 +1,35 @@ +using EOM.TSHotelManagement.Common.Contract; + +namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission +{ + /// + /// 用户的角色-权限明细(从 RolePermission 关联并联到 Permission) + /// + public class UserRolePermissionOutputDto : BaseOutputDto + { + /// + /// 角色编码 + /// + public string RoleNumber { get; set; } = null!; + + /// + /// 权限编码(Permission.PermissionNumber) + /// + public string PermissionNumber { get; set; } = null!; + + /// + /// 权限名称(Permission.PermissionName) + /// + public string? PermissionName { get; set; } + + /// + /// 菜单键(Permission.MenuKey),方便在前端按菜单归类展示 + /// + public string? MenuKey { get; set; } + + /// + /// 菜单名称,方便在前端按菜单归类展示 + /// + public string? MenuName { get; set; } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs new file mode 100644 index 0000000..b7ce485 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; + +namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role +{ + /// + /// 为角色分配管理员(全量覆盖式) + /// + public class AssignRoleUsersInputDto : BaseInputDto + { + /// + /// 角色编码 + /// + public string RoleNumber { get; set; } = null!; + + /// + /// 管理员用户编码集合(Administrator.Number) + /// + public List UserNumbers { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs new file mode 100644 index 0000000..4d1470c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; + +namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role +{ + /// + /// 为用户分配角色(全量覆盖式) + /// + public class AssignUserRolesInputDto : BaseInputDto + { + /// + /// 用户编码(即管理员表的 Number / SerialNumber) + /// + public string UserNumber { get; set; } = null!; + + /// + /// 角色编码集合 + /// + public List RoleNumbers { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Permission.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Permission.cs new file mode 100644 index 0000000..5be46d0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Permission.cs @@ -0,0 +1,84 @@ +using SqlSugar; + +namespace EOM.TSHotelManagement.Common.Core +{ + /// + /// 系统权限定义表 (Permission Definition) + /// + [SugarTable("permission", "系统权限定义表 (Permission Definition)")] + public class Permission : BaseEntity + { + /// + /// 编号 (ID) + /// + [SugarColumn(ColumnName = "id", IsIdentity = true, IsPrimaryKey = true, IsNullable = false, ColumnDescription = "编号 (ID)")] + public int Id { get; set; } + + /// + /// 权限编码(唯一,如 system:role:list) + /// + [SugarColumn( + ColumnName = "permission_number", + ColumnDescription = "权限编码(唯一,如 system:role:list)", + Length = 128, + IsNullable = false, + UniqueGroupNameList = new[] { "UK_permission_number" } + )] + public string PermissionNumber { get; set; } = null!; + + /// + /// 权限名称(中文显示) + /// + [SugarColumn( + ColumnName = "permission_name", + ColumnDescription = "权限名称(中文显示)", + Length = 200, + IsNullable = false + )] + public string PermissionName { get; set; } = null!; + + /// + /// 所属模块(如 AdminManager / RoomManager 等) + /// + [SugarColumn( + ColumnName = "module", + ColumnDescription = "所属模块(如 AdminManager / RoomManager 等)", + Length = 128, + IsNullable = false + )] + public string Module { get; set; } = null!; + + /// + /// 权限说明 + /// + [SugarColumn( + ColumnName = "permission_description", + ColumnDescription = "权限说明", + Length = 500, + IsNullable = true + )] + public string? Description { get; set; } + + /// + /// 关联菜单Key(用于菜单过滤,非必填) + /// + [SugarColumn( + ColumnName = "menu_key", + ColumnDescription = "关联菜单Key(用于菜单过滤,非必填)", + Length = 256, + IsNullable = true + )] + public string? MenuKey { get; set; } + + /// + /// 父级权限编码(可选,用于树形权限) + /// + [SugarColumn( + ColumnName = "parent_number", + ColumnDescription = "父级权限编码(可选,用于树形权限)", + Length = 128, + IsNullable = true + )] + public string? ParentNumber { get; set; } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs b/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs index 57ea313..2f0260d 100644 --- a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs +++ b/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs @@ -269,6 +269,10 @@ namespace EOM.TSHotelManagement.EntityFramework case Employee employee: alreadyExists = db.Queryable().Any(a => a.EmployeeId == employee.EmployeeId); break; + + case Permission permission: + alreadyExists = db.Queryable().Any(a => a.PermissionNumber == permission.PermissionNumber); + break; } if (alreadyExists) @@ -304,6 +308,101 @@ namespace EOM.TSHotelManagement.EntityFramework } Console.WriteLine("Data inserted successfully"); + + // ===== Ensure admin owns ALL permissions via built-in role seeding ===== + try + { + const string adminAccount = "admin"; + const string adminRoleNumber = "R-ADMIN"; + const string adminRoleName = "超级管理员"; + + // 1) Ensure built-in admin role exists + var adminRoleExists = db.Queryable() + .Any(r => r.RoleNumber == adminRoleNumber && r.IsDelete != 1); + + if (!adminRoleExists) + { + db.Insertable(new Role + { + RoleNumber = adminRoleNumber, + RoleName = adminRoleName, + RoleDescription = "初始化内置角色:拥有系统全部权限", + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = DateTime.Now + }).ExecuteCommand(); + Console.WriteLine($"Seeded role: {adminRoleNumber} - {adminRoleName}"); + } + + // 2) Bind admin user to admin role + var adminUser = db.Queryable() + .Where(a => a.Account == adminAccount && a.IsDelete != 1) + .First(); + + if (adminUser != null) + { + var hasBind = db.Queryable() + .Any(ur => ur.UserNumber == adminUser.Number && ur.RoleNumber == adminRoleNumber && ur.IsDelete != 1); + + if (!hasBind) + { + db.Insertable(new UserRole + { + UserNumber = adminUser.Number, + RoleNumber = adminRoleNumber, + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = DateTime.Now + }).ExecuteCommand(); + Console.WriteLine($"Bound admin user({adminUser.Number}) to role {adminRoleNumber}"); + } + } + else + { + Console.WriteLine("Admin account not found while binding to role, skip binding."); + } + + // 3) Grant ALL permissions to admin role + var allPermNumbers = db.Queryable() + .Where(p => p.IsDelete != 1) + .Select(p => p.PermissionNumber) + .ToList(); + + var existingRolePerms = db.Queryable() + .Where(rp => rp.RoleNumber == adminRoleNumber && rp.IsDelete != 1) + .Select(rp => rp.PermissionNumber) + .ToList(); + + var toGrant = allPermNumbers + .Where(p => !string.IsNullOrEmpty(p)) + .Except(existingRolePerms, StringComparer.OrdinalIgnoreCase) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + if (toGrant.Count > 0) + { + var inserts = toGrant.Select(p => new RolePermission + { + RoleNumber = adminRoleNumber, + PermissionNumber = p!, + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = DateTime.Now + }).ToList(); + + db.Insertable(inserts).ExecuteCommand(); + Console.WriteLine($"Granted {toGrant.Count} permissions to role {adminRoleNumber}"); + } + else + { + Console.WriteLine("Admin role already has all permissions."); + } + } + catch (Exception ex) + { + Console.WriteLine($"Seeding admin ALL-permissions mapping failed: {ex.Message}"); + } + // ===== END admin ALL permissions seeding ===== } else { @@ -326,8 +425,8 @@ namespace EOM.TSHotelManagement.EntityFramework finally { Console.WriteLine("Database data initialization completed"); - Console.WriteLine($"administrator accountadmin"); - Console.WriteLine($"administrator passwordadmin"); + Console.WriteLine($"administrator account:admin"); + Console.WriteLine($"administrator password:admin"); } } diff --git a/EOM.TSHotelManagement.Migration/EntityBuilder.cs b/EOM.TSHotelManagement.Migration/EntityBuilder.cs index 80713ad..6dfa293 100644 --- a/EOM.TSHotelManagement.Migration/EntityBuilder.cs +++ b/EOM.TSHotelManagement.Migration/EntityBuilder.cs @@ -44,7 +44,8 @@ namespace EOM.TSHotelManagement.Migration typeof(UserRole), typeof(VipLevelRule), typeof(RequestLog), - typeof(News) + typeof(News), + typeof(Permission) }; private readonly List entityDatas = new() @@ -624,6 +625,164 @@ namespace EOM.TSHotelManagement.Migration DataInsDate = DateTime.Now, } + , + // ===== Permission seeds for button-level authorization (MenuKey-scoped) ===== + // Basic (基础信息管理) + new Permission { PermissionNumber = "position.view", PermissionName = "职位-查看", Module = "basic", Description = "职位管理-查看", MenuKey = "position", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "position.create", PermissionName = "职位-新增", Module = "basic", Description = "职位管理-新增", MenuKey = "position", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "position.update", PermissionName = "职位-编辑", Module = "basic", Description = "职位管理-编辑", MenuKey = "position", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "position.delete", PermissionName = "职位-删除", Module = "basic", Description = "职位管理-删除", MenuKey = "position", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "nation.view", PermissionName = "民族-查看", Module = "basic", Description = "民族管理-查看", MenuKey = "nation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "nation.create", PermissionName = "民族-新增", Module = "basic", Description = "民族管理-新增", MenuKey = "nation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "nation.update", PermissionName = "民族-编辑", Module = "basic", Description = "民族管理-编辑", MenuKey = "nation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "nation.delete", PermissionName = "民族-删除", Module = "basic", Description = "民族管理-删除", MenuKey = "nation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "qualification.view", PermissionName = "学历-查看", Module = "basic", Description = "学历管理-查看", MenuKey = "qualification", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "qualification.create", PermissionName = "学历-新增", Module = "basic", Description = "学历管理-新增", MenuKey = "qualification", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "qualification.update", PermissionName = "学历-编辑", Module = "basic", Description = "学历管理-编辑", MenuKey = "qualification", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "qualification.delete", PermissionName = "学历-删除", Module = "basic", Description = "学历管理-删除", MenuKey = "qualification", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "department.view", PermissionName = "部门-查看", Module = "basic", Description = "部门管理-查看", MenuKey = "department", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "department.create", PermissionName = "部门-新增", Module = "basic", Description = "部门管理-新增", MenuKey = "department", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "department.update", PermissionName = "部门-编辑", Module = "basic", Description = "部门管理-编辑", MenuKey = "department", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "department.delete", PermissionName = "部门-删除", Module = "basic", Description = "部门管理-删除", MenuKey = "department", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "noticetype.view", PermissionName = "公告类型-查看", Module = "basic", Description = "公告类型管理-查看", MenuKey = "noticetype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "noticetype.create", PermissionName = "公告类型-新增", Module = "basic", Description = "公告类型管理-新增", MenuKey = "noticetype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "noticetype.update", PermissionName = "公告类型-编辑", Module = "basic", Description = "公告类型管理-编辑", MenuKey = "noticetype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "noticetype.delete", PermissionName = "公告类型-删除", Module = "basic", Description = "公告类型管理-删除", MenuKey = "noticetype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "passport.view", PermissionName = "证件-查看", Module = "basic", Description = "证件类型管理-查看", MenuKey = "passport", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "passport.create", PermissionName = "证件-新增", Module = "basic", Description = "证件类型管理-新增", MenuKey = "passport", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "passport.update", PermissionName = "证件-编辑", Module = "basic", Description = "证件类型管理-编辑", MenuKey = "passport", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "passport.delete", PermissionName = "证件-删除", Module = "basic", Description = "证件类型管理-删除", MenuKey = "passport", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "promotioncontent.view", PermissionName = "宣传联动-查看", Module = "basic", Description = "宣传联动内容-查看", MenuKey = "promotioncontent", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "promotioncontent.create", PermissionName = "宣传联动-新增", Module = "basic", Description = "宣传联动内容-新增", MenuKey = "promotioncontent", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "promotioncontent.update", PermissionName = "宣传联动-编辑", Module = "basic", Description = "宣传联动内容-编辑", MenuKey = "promotioncontent", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "promotioncontent.delete", PermissionName = "宣传联动-删除", Module = "basic", Description = "宣传联动内容-删除", MenuKey = "promotioncontent", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Finance (财务信息管理) + new Permission { PermissionNumber = "internalfinance.view", PermissionName = "内部资产-查看", Module = "finance", Description = "内部资产管理-查看", MenuKey = "internalfinance", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "internalfinance.create", PermissionName = "内部资产-新增", Module = "finance", Description = "内部资产管理-新增", MenuKey = "internalfinance", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "internalfinance.update", PermissionName = "内部资产-编辑", Module = "finance", Description = "内部资产管理-编辑", MenuKey = "internalfinance", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "internalfinance.delete", PermissionName = "内部资产-删除", Module = "finance", Description = "内部资产管理-删除", MenuKey = "internalfinance", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Hydroelectricity (水电信息管理) + new Permission { PermissionNumber = "hydroelectricinformation.view", PermissionName = "水电信息-查看", Module = "hydroelectricity", Description = "水电信息管理-查看", MenuKey = "hydroelectricinformation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "hydroelectricinformation.create", PermissionName = "水电信息-新增", Module = "hydroelectricity", Description = "水电信息管理-新增", MenuKey = "hydroelectricinformation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "hydroelectricinformation.update", PermissionName = "水电信息-编辑", Module = "hydroelectricity", Description = "水电信息管理-编辑", MenuKey = "hydroelectricinformation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "hydroelectricinformation.delete", PermissionName = "水电信息-删除", Module = "hydroelectricity", Description = "水电信息管理-删除", MenuKey = "hydroelectricinformation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Supervision (监管统计管理) + new Permission { PermissionNumber = "supervisioninfo.view", PermissionName = "监管情况-查看", Module = "supervision", Description = "监管情况-查看", MenuKey = "supervisioninfo", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "supervisioninfo.create", PermissionName = "监管情况-新增", Module = "supervision", Description = "监管情况-新增", MenuKey = "supervisioninfo", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "supervisioninfo.update", PermissionName = "监管情况-编辑", Module = "supervision", Description = "监管情况-编辑", MenuKey = "supervisioninfo", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "supervisioninfo.delete", PermissionName = "监管情况-删除", Module = "supervision", Description = "监管情况-删除", MenuKey = "supervisioninfo", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Room information (客房信息管理) + new Permission { PermissionNumber = "resermanagement.view", PermissionName = "预约-查看", Module = "room", Description = "预约管理-查看", MenuKey = "resermanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "resermanagement.create", PermissionName = "预约-新增", Module = "room", Description = "预约管理-新增", MenuKey = "resermanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "resermanagement.update", PermissionName = "预约-编辑", Module = "room", Description = "预约管理-编辑", MenuKey = "resermanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "resermanagement.delete", PermissionName = "预约-删除", Module = "room", Description = "预约管理-删除", MenuKey = "resermanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "roommap.view", PermissionName = "房态图-查看", Module = "room", Description = "房态图一览-查看", MenuKey = "roommap", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "roommanagement.view", PermissionName = "客房-查看", Module = "room", Description = "客房管理-查看", MenuKey = "roommanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "roommanagement.create", PermissionName = "客房-新增", Module = "room", Description = "客房管理-新增", MenuKey = "roommanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "roommanagement.update", PermissionName = "客房-编辑", Module = "room", Description = "客房管理-编辑", MenuKey = "roommanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "roommanagement.delete", PermissionName = "客房-删除", Module = "room", Description = "客房管理-删除", MenuKey = "roommanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "roomconfig.view", PermissionName = "客房配置-查看", Module = "room", Description = "客房配置-查看", MenuKey = "roomconfig", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "roomconfig.create", PermissionName = "客房配置-新增", Module = "room", Description = "客房配置-新增", MenuKey = "roomconfig", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "roomconfig.update", PermissionName = "客房配置-编辑", Module = "room", Description = "客房配置-编辑", MenuKey = "roomconfig", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "roomconfig.delete", PermissionName = "客房配置-删除", Module = "room", Description = "客房配置-删除", MenuKey = "roomconfig", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Customer management (客户管理) + new Permission { PermissionNumber = "viplevel.view", PermissionName = "会员等级-查看", Module = "customer", Description = "会员等级规则-查看", MenuKey = "viplevel", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "viplevel.create", PermissionName = "会员等级-新增", Module = "customer", Description = "会员等级规则-新增", MenuKey = "viplevel", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "viplevel.update", PermissionName = "会员等级-编辑", Module = "customer", Description = "会员等级规则-编辑", MenuKey = "viplevel", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "viplevel.delete", PermissionName = "会员等级-删除", Module = "customer", Description = "会员等级规则-删除", MenuKey = "viplevel", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "customer.view", PermissionName = "客户-查看", Module = "customer", Description = "客户信息管理-查看", MenuKey = "customer", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customer.create", PermissionName = "客户-新增", Module = "customer", Description = "客户信息管理-新增", MenuKey = "customer", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customer.update", PermissionName = "客户-编辑", Module = "customer", Description = "客户信息管理-编辑", MenuKey = "customer", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customer.delete", PermissionName = "客户-删除", Module = "customer", Description = "客户信息管理-删除", MenuKey = "customer", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "customerspend.view", PermissionName = "消费记录-查看", Module = "customer", Description = "客户消费账单-查看", MenuKey = "customerspend", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customerspend.create", PermissionName = "消费记录-新增", Module = "customer", Description = "客户消费账单-新增", MenuKey = "customerspend", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customerspend.update", PermissionName = "消费记录-编辑", Module = "customer", Description = "客户消费账单-编辑", MenuKey = "customerspend", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customerspend.delete", PermissionName = "消费记录-删除", Module = "customer", Description = "客户消费账单-删除", MenuKey = "customerspend", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "customertype.view", PermissionName = "客户类型-查看", Module = "customer", Description = "客户类型管理-查看", MenuKey = "customertype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customertype.create", PermissionName = "客户类型-新增", Module = "customer", Description = "客户类型管理-新增", MenuKey = "customertype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customertype.update", PermissionName = "客户类型-编辑", Module = "customer", Description = "客户类型管理-编辑", MenuKey = "customertype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "customertype.delete", PermissionName = "客户类型-删除", Module = "customer", Description = "客户类型管理-删除", MenuKey = "customertype", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Human resource (酒店人事管理) + new Permission { PermissionNumber = "staffmanagement.view", PermissionName = "员工-查看", Module = "humanresource", Description = "员工管理-查看", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "staffmanagement.create", PermissionName = "员工-新增", Module = "humanresource", Description = "员工管理-新增", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "staffmanagement.update", PermissionName = "员工-编辑", Module = "humanresource", Description = "员工管理-编辑", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "staffmanagement.delete", PermissionName = "员工-删除", Module = "humanresource", Description = "员工管理-删除", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Material management (酒店物资管理) + new Permission { PermissionNumber = "goodsmanagement.view", PermissionName = "商品-查看", Module = "material", Description = "商品管理-查看", MenuKey = "goodsmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "goodsmanagement.create", PermissionName = "商品-新增", Module = "material", Description = "商品管理-新增", MenuKey = "goodsmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "goodsmanagement.update", PermissionName = "商品-编辑", Module = "material", Description = "商品管理-编辑", MenuKey = "goodsmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "goodsmanagement.delete", PermissionName = "商品-删除", Module = "material", Description = "商品管理-删除", MenuKey = "goodsmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // Operation management (行为操作管理) + new Permission { PermissionNumber = "operationlog.view", PermissionName = "操作日志-查看", Module = "operation", Description = "操作日志-查看", MenuKey = "operationlog", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "operationlog.delete", PermissionName = "操作日志-删除", Module = "operation", Description = "操作日志-删除", MenuKey = "operationlog", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "requestlog.view", PermissionName = "请求日志-查看", Module = "operation", Description = "请求日志-查看", MenuKey = "requestlog", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "requestlog.delete", PermissionName = "请求日志-删除", Module = "operation", Description = "请求日志-删除", MenuKey = "requestlog", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // System management (系统管理) + new Permission { PermissionNumber = "administratormanagement.view", PermissionName = "管理员-查看", Module = "system", Description = "管理员管理-查看", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "administratormanagement.create", PermissionName = "管理员-新增", Module = "system", Description = "管理员管理-新增", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "administratormanagement.update", PermissionName = "管理员-编辑", Module = "system", Description = "管理员管理-编辑", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "administratormanagement.delete", PermissionName = "管理员-删除", Module = "system", Description = "管理员管理-删除", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "menumanagement.view", PermissionName = "菜单-查看", Module = "system", Description = "菜单管理-查看", MenuKey = "menumanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "menumanagement.create", PermissionName = "菜单-新增", Module = "system", Description = "菜单管理-新增", MenuKey = "menumanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "menumanagement.update", PermissionName = "菜单-编辑", Module = "system", Description = "菜单管理-编辑", MenuKey = "menumanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "menumanagement.delete", PermissionName = "菜单-删除", Module = "system", Description = "菜单管理-删除", MenuKey = "menumanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "rolemanagement.view", PermissionName = "角色-查看", Module = "system", Description = "角色管理-查看", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "rolemanagement.create", PermissionName = "角色-新增", Module = "system", Description = "角色管理-新增", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "rolemanagement.update", PermissionName = "角色-编辑", Module = "system", Description = "角色管理-编辑", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "rolemanagement.delete", PermissionName = "角色-删除", Module = "system", Description = "角色管理-删除", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "rolemanagement.grant", PermissionName = "角色-授予权限", Module = "system", Description = "角色管理-授予权限", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "admintypemanagement.view", PermissionName = "管理员类型-查看", Module = "system", Description = "管理员类型管理-查看", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "admintypemanagement.create", PermissionName = "管理员类型-新增", Module = "system", Description = "管理员类型管理-新增", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "admintypemanagement.update", PermissionName = "管理员类型-编辑", Module = "system", Description = "管理员类型管理-编辑", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "admintypemanagement.delete", PermissionName = "管理员类型-删除", Module = "system", Description = "管理员类型管理-删除", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + // System management v2 (match API RequirePermission) + new Permission { PermissionNumber = "system:role:list", PermissionName = "角色-列表/读取", Module = "system", Description = "角色管理-查询/读取", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:role:create", PermissionName = "角色-新增(API)", Module = "system", Description = "角色管理-新增(接口)", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:role:update", PermissionName = "角色-编辑(API)", Module = "system", Description = "角色管理-编辑(接口)", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:role:delete", PermissionName = "角色-删除(API)", Module = "system", Description = "角色管理-删除(接口)", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:role:grant", PermissionName = "角色-授予权限(API)", Module = "system", Description = "角色管理-授予权限/关联管理员(接口)", MenuKey = "rolemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "system:admin:list", PermissionName = "管理员-列表/读取", Module = "system", Description = "管理员管理-查询/读取", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:admin:create", PermissionName = "管理员-新增(API)", Module = "system", Description = "管理员管理-新增(接口)", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:admin:update", PermissionName = "管理员-编辑(API)", Module = "system", Description = "管理员管理-编辑(接口)", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:admin:delete", PermissionName = "管理员-删除(API)", Module = "system", Description = "管理员管理-删除(接口)", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "system:admintype:list", PermissionName = "管理员类型-列表/读取", Module = "system", Description = "管理员类型管理-查询/读取", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:admintype:create", PermissionName = "管理员类型-新增(API)", Module = "system", Description = "管理员类型管理-新增(接口)", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:admintype:update", PermissionName = "管理员类型-编辑(API)", Module = "system", Description = "管理员类型管理-编辑(接口)", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:admintype:delete", PermissionName = "管理员类型-删除(API)", Module = "system", Description = "管理员类型管理-删除(接口)", MenuKey = "admintypemanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + + new Permission { PermissionNumber = "system:user:assign", PermissionName = "用户-分配角色/权限", Module = "system", Description = "管理员-分配角色/直接权限(接口)", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "system:user:assign.view", PermissionName = "用户-读取角色/权限", Module = "system", Description = "管理员-读取角色/直接权限(接口)", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + // Misc pages + new Permission { PermissionNumber = "dashboard.view", PermissionName = "仪表盘-查看", Module = "home", Description = "仪表盘-查看", MenuKey = "dashboard", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "home.view", PermissionName = "首页-查看", Module = "home", Description = "首页-查看", MenuKey = "home", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now } }; public Type[] EntityTypes => entityTypes; diff --git a/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs b/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs new file mode 100644 index 0000000..05fbff5 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs @@ -0,0 +1,157 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using System.Collections.Generic; +using System.Security.Claims; +using Microsoft.AspNetCore.Authorization; +using Microsoft.Extensions.Options; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Logging; +using SqlSugar; +using EOM.TSHotelManagement.Common.Core; + +namespace EOM.TSHotelManagement.WebApi.Authorization +{ + /// + /// 权限策略常量 + /// + public static class PermissionPolicyConstants + { + public const string Prefix = "PERM:"; + } + + /// + /// 以权限码为单位的授权特性,使用示例: [RequirePermission("system:role:list")] + /// + public class RequirePermissionAttribute : AuthorizeAttribute + { + public string PermissionCode { get; } + + public RequirePermissionAttribute(string permissionCode) + { + PermissionCode = permissionCode ?? throw new ArgumentNullException(nameof(permissionCode)); + Policy = PermissionPolicyConstants.Prefix + permissionCode; + } + } + + /// + /// 权限需求对象 + /// + public class PermissionRequirement : IAuthorizationRequirement + { + public string Code { get; } + + public PermissionRequirement(string code) + { + Code = code ?? throw new ArgumentNullException(nameof(code)); + } + } + + /// + /// 自定义策略提供者:当遇到以 "PERM:" 开头的策略名时,动态创建权限策略 + /// + public class PermissionPolicyProvider : DefaultAuthorizationPolicyProvider + { + public PermissionPolicyProvider(IOptions options) : base(options) + { + } + + public override Task GetPolicyAsync(string policyName) + { + if (policyName != null && policyName.StartsWith(PermissionPolicyConstants.Prefix, StringComparison.OrdinalIgnoreCase)) + { + var code = policyName.Substring(PermissionPolicyConstants.Prefix.Length); + var policy = new AuthorizationPolicyBuilder() + .RequireAuthenticatedUser() + .AddRequirements(new PermissionRequirement(code)) + .Build(); + return Task.FromResult(policy); + } + + return base.GetPolicyAsync(policyName); + } + } + + /// + /// 权限授权处理器:判断当前用户是否具备所需权限 + /// 规则: + /// 1) 如果用户是超级管理员(IsSuperAdmin == 1) -> 直接放行 + /// 2) 否则:用户-角色(UserRole) -> 角色-权限(RolePermission) 中存在目标权限码且未被删除(IsDelete != 1) -> 放行 + /// + public class PermissionAuthorizationHandler : AuthorizationHandler + { + private readonly ISqlSugarClient _db; + private readonly IHttpContextAccessor _httpContextAccessor; + private readonly ILogger _logger; + + public PermissionAuthorizationHandler( + ISqlSugarClient db, + IHttpContextAccessor httpContextAccessor, + ILogger logger) + { + _db = db; + _httpContextAccessor = httpContextAccessor; + _logger = logger; + } + + protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context, PermissionRequirement requirement) + { + try + { + // 从 Claims 中获取用户唯一编号(SerialNumber) + var userNumber = context.User?.FindFirst(ClaimTypes.SerialNumber)?.Value + ?? context.User?.FindFirst("serialnumber")?.Value; + + if (string.IsNullOrWhiteSpace(userNumber)) + { + _logger.LogWarning("权限校验失败:无法获取用户编号(SerialNumber)"); + return; + } + + // 超级管理员直接通过 + var isSuperAdmin = await _db.Queryable() + .Where(a => a.Number == userNumber && a.IsDelete != 1) + .Select(a => a.IsSuperAdmin == 1) + .FirstAsync(); + + if (isSuperAdmin) + { + context.Succeed(requirement); + return; + } + + // 获取用户绑定的有效角色 + var roleNumbers = await _db.Queryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToListAsync(); + + if (roleNumbers == null || roleNumbers.Count == 0) + { + _logger.LogInformation("用户 {UserNumber} 未绑定任何角色", userNumber); + return; + } + + // 判断角色是否拥有该权限 + var hasPermission = await _db.Queryable() + .Where(rp => rp.IsDelete != 1 + && roleNumbers.Contains(rp.RoleNumber) + && rp.PermissionNumber == requirement.Code) + .AnyAsync(); + + if (hasPermission) + { + context.Succeed(requirement); + } + else + { + _logger.LogInformation("用户 {UserNumber} 无权限码 {Perm}", userNumber, requirement.Code); + } + } + catch (Exception ex) + { + _logger.LogError(ex, "权限校验异常"); + } + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs index f2a1b61..37e3db0 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs @@ -1,5 +1,8 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -40,6 +43,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取所有管理员列表 /// /// + [RequirePermission("system:admin:list")] [HttpGet] public ListOutputDto GetAllAdminList(ReadAdministratorInputDto readAdministratorInputDto) { @@ -51,6 +55,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:admin:create")] [HttpPost] public BaseResponse AddAdmin([FromBody] CreateAdministratorInputDto admin) { @@ -62,6 +67,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:admin:update")] [HttpPost] public BaseResponse UpdAdmin([FromBody] UpdateAdministratorInputDto updateAdministratorInputDto) { @@ -73,6 +79,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:admin:delete")] [HttpPost] public BaseResponse DelAdmin([FromBody] DeleteAdministratorInputDto deleteAdministratorInputDto) { @@ -83,6 +90,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取所有管理员类型 /// /// + [RequirePermission("system:admintype:list")] [HttpGet] public ListOutputDto GetAllAdminTypes(ReadAdministratorTypeInputDto readAdministratorTypeInputDto) { @@ -94,6 +102,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:admintype:create")] [HttpPost] public BaseResponse AddAdminType([FromBody] CreateAdministratorTypeInputDto createAdministratorTypeInputDto) { @@ -105,6 +114,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:admintype:update")] [HttpPost] public BaseResponse UpdAdminType([FromBody] UpdateAdministratorTypeInputDto updateAdministratorTypeInputDto) { @@ -116,11 +126,67 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:admintype:delete")] [HttpPost] public BaseResponse DelAdminType([FromBody] DeleteAdministratorTypeInputDto deleteAdministratorTypeInputDto) { return adminService.DelAdminType(deleteAdministratorTypeInputDto); } + /// + /// 为用户分配角色(全量覆盖) + /// + /// + /// + [RequirePermission("system:user:assign")] + [HttpPost] + public BaseResponse AssignUserRoles([FromBody] AssignUserRolesInputDto input) + { + return adminService.AssignUserRoles(input); + } + + /// + /// 读取指定用户已分配的角色编码集合 + /// + /// 用户编码 + /// 角色编码集合(RoleNumber 列表) + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserRoles([FromQuery] string userNumber) + { + return adminService.ReadUserRoles(userNumber); + } + + /// + /// 读取指定用户的“角色-权限”明细(来自 RolePermission 关联,并联到 Permission 得到权限码与名称) + /// + /// 用户编码 + /// 明细列表(包含 RoleNumber、PermissionNumber、PermissionName、MenuKey) + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserRolePermissions([FromQuery] string userNumber) + { + return adminService.ReadUserRolePermissions(userNumber); + } + + /// + /// 为指定用户分配“直接权限”(通过专属角色 R-USER-{UserNumber} 写入 RolePermission,全量覆盖) + /// + [RequirePermission("system:user:assign")] + [HttpPost] + public BaseResponse AssignUserPermissions([FromBody] AssignUserPermissionsInputDto input) + { + return adminService.AssignUserPermissions(input); + } + + /// + /// 读取指定用户的“直接权限”(仅来自专属角色 R-USER-{UserNumber} 的权限编码列表) + /// + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserDirectPermissions([FromQuery] string userNumber) + { + return adminService.ReadUserDirectPermissions(userNumber); + } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Permission/PermissionController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Permission/PermissionController.cs new file mode 100644 index 0000000..13ac266 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Permission/PermissionController.cs @@ -0,0 +1,33 @@ +using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace EOM.TSHotelManagement.WebApi.Controllers +{ + /// + /// 权限控制器 + /// + public class PermissionController : ControllerBase + { + private readonly IPermissionAppService _permissionAppService; + + public PermissionController(IPermissionAppService permissionAppService) + { + _permissionAppService = permissionAppService; + } + + /// + /// 查询权限列表(支持条件过滤与分页/忽略分页) + /// + /// 查询条件 + /// 权限列表 + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto SelectPermissionList([FromQuery] ReadPermissionInputDto input) + { + return _permissionAppService.SelectPermissionList(input); + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs index c9b7cae..d300b47 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs @@ -1,5 +1,8 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers @@ -18,6 +21,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:role:list")] [HttpGet] public ListOutputDto SelectRoleList([FromQuery] ReadRoleInputDto readRoleInputDto) { @@ -29,6 +33,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:role:create")] [HttpPost] public BaseResponse InsertRole([FromBody] CreateRoleInputDto createRoleInputDto) { @@ -40,6 +45,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:role:update")] [HttpPost] public BaseResponse UpdateRole([FromBody] UpdateRoleInputDto updateRoleInputDto) { @@ -51,10 +57,56 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("system:role:delete")] [HttpPost] public BaseResponse DeleteRole([FromBody] DeleteRoleInputDto deleteRoleInputDto) { return _roleAppService.DeleteRole(deleteRoleInputDto); } + + /// + /// 为角色授予权限(全量覆盖) + /// + /// + /// + [RequirePermission("system:role:grant")] + [HttpPost] + public BaseResponse GrantRolePermissions([FromBody] GrantRolePermissionsInputDto input) + { + return _roleAppService.GrantRolePermissions(input); + } + + /// + /// 读取指定角色已授予的权限编码集合 + /// + /// 角色编码 + [RequirePermission("system:role:list")] + [HttpGet] + public ListOutputDto ReadRolePermissions([FromQuery] string roleNumber) + { + return _roleAppService.ReadRolePermissions(roleNumber); + } + + /// + /// 读取隶属于指定角色的管理员用户编码集合 + /// + /// 角色编码 + [RequirePermission("system:role:list")] + [HttpGet] + public ListOutputDto ReadRoleUsers([FromQuery] string roleNumber) + { + return _roleAppService.ReadRoleUsers(roleNumber); + } + + /// + /// 为角色分配管理员(全量覆盖) + /// + /// 包含角色编码与管理员编码集合 + [RequirePermission("system:role:grant")] + [HttpPost] + public BaseResponse AssignRoleUsers([FromBody] AssignRoleUsersInputDto input) + { + return _roleAppService.AssignRoleUsers(input); + } } } diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index 7dea910..011351a 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -2,8 +2,10 @@ using Autofac; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.WebApi.Authorization; using EOM.TSHotelManagement.WebApi.Filters; using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Hosting; @@ -118,6 +120,10 @@ namespace EOM.TSHotelManagement.WebApi }); options.DefaultPolicy = options.GetPolicy("ApiAccess"); }); + + // RBAC: 注册基于权限码的动态策略提供者与处理器 + services.AddSingleton(); + services.AddScoped(); } private void ConfigureControllers(IServiceCollection services) @@ -136,7 +142,7 @@ namespace EOM.TSHotelManagement.WebApi options.JsonSerializerOptions.Converters.Add(new DateOnlyJsonConverter()); }); - // ȫ· + // 全局路由配置 services.AddMvc(opt => opt.UseCentralRoutePrefix(new RouteAttribute("api/[controller]/[action]"))); } @@ -181,7 +187,7 @@ namespace EOM.TSHotelManagement.WebApi { var message = LocalizationHelper.GetLocalizedString( $"Database initialization failed: {ex.Message}. Please manually initialize or fix the error.", - $"ݿʼʧܣ{ex.Message}ֶʼ޸"); + $"数据库初始化失败:{ex.Message},请手动初始化或修复错误。"); Console.WriteLine(message); throw new Exception(message); } @@ -189,7 +195,7 @@ namespace EOM.TSHotelManagement.WebApi { Console.WriteLine(LocalizationHelper.GetLocalizedString( "Database initialization completed.", - "ݿʼɡ")); + "数据库初始化完成。")); } } @@ -241,7 +247,7 @@ namespace EOM.TSHotelManagement.WebApi /// public void ConfigureContainer(ContainerBuilder builder) { - #region AutoFac IOC,ʵע + #region AutoFac IOC容器,实现批量依赖注入的容器 try { builder.Register(c => @@ -264,14 +270,14 @@ namespace EOM.TSHotelManagement.WebApi builder.RegisterGeneric(typeof(GenericRepository<>)).AsSelf().InstancePerLifetimeScope(); - //ע + //程序集批量反射注入 var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Application.dll")); builder.RegisterAssemblyTypes(assemblyService) .AsImplementedInterfaces() .InstancePerDependency() .PropertiesAutowired(); - //עӽ + //注入加解密组件 var encryptionService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "jvncorelib.dll")); builder.RegisterAssemblyTypes(encryptionService) .PropertiesAutowired(); diff --git a/version.txt b/version.txt index c7c9fc3ade265d1962666c712331837d2934eef9..157b24da41828e93e9293d42be8d28ca545151a1 100644 GIT binary patch literal 16 UcmezW&xk>f0ffyMcp11D04TNt3jhEB literal 16 UcmezW&xk>f0fbE%cp11D04T5n3IG5A -- Gitee From 7e2bdb6185f39fd9224248da295b496ced7b442d Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 21 Sep 2025 16:11:20 +0800 Subject: [PATCH 02/21] add api role code. --- .gitignore | 2 + .../Business/Asset/AssetController.cs | 5 + .../Business/Customer/CustomerController.cs | 7 + .../EnergyManagementController.cs | 5 + .../PromotionContentController.cs | 6 + .../Business/Reser/ReserController.cs | 7 + .../Business/Room/RoomController.cs | 22 +++ .../Business/Room/RoomTypeController.cs | 6 + .../Business/Sellthing/SellthingController.cs | 7 + .../Business/Spend/SpendController.cs | 8 + .../Dashboard/DashboardController.cs | 5 + .../Employee/Check/EmployeeCheckController.cs | 5 + .../Employee/EmployeeController.cs | 8 + .../History/EmployeeHistoryController.cs | 3 + .../Employee/Photo/EmployeePhotoController.cs | 5 + .../SystemManagement/Menu/MenuController.cs | 6 + .../SupervisionStatisticsController.cs | 5 + .../VipRule/VipRuleController.cs | 6 + .../Extension/PermissionSyncExtensions.cs | 165 ++++++++++++++++++ EOM.TSHotelManagement.WebApi/Startup.cs | 2 + 20 files changed, 285 insertions(+) create mode 100644 EOM.TSHotelManagement.WebApi/Extension/PermissionSyncExtensions.cs diff --git a/.gitignore b/.gitignore index b95bb29..0998646 100644 --- a/.gitignore +++ b/.gitignore @@ -33,9 +33,11 @@ bld/ [Ll]og/ [Ll]ogs/ docker-images/ +frontend/ # Visual Studio 2015/2017 cache/options directory .vs/ +.vscode/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs index 4483be2..0d46cde 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -28,6 +29,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("internalfinance.create")] [HttpPost] public BaseResponse AddAssetInfo([FromBody] CreateAssetInputDto asset) { @@ -38,6 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询资产信息 /// /// + [RequirePermission("internalfinance.view")] [HttpGet] public ListOutputDto SelectAssetInfoAll([FromQuery] ReadAssetInputDto asset) { @@ -49,6 +52,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("internalfinance.update")] [HttpPost] public BaseResponse UpdAssetInfo([FromBody] UpdateAssetInputDto asset) { @@ -60,6 +64,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("internalfinance.delete")] [HttpPost] public BaseResponse DelAssetInfo([FromBody] DeleteAssetInputDto asset) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs index 97b00ce..d0a7c84 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -28,6 +29,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customer.create")] [HttpPost] public BaseResponse InsertCustomerInfo([FromBody] CreateCustomerInputDto custo) { @@ -39,6 +41,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customer.update")] [HttpPost] public BaseResponse UpdCustomerInfo([FromBody] UpdateCustomerInputDto custo) { @@ -50,6 +53,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customer.delete")] [HttpPost] public BaseResponse DelCustomerInfo([FromBody] DeleteCustomerInputDto custo) { @@ -61,6 +65,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customer.update")] [HttpPost] public BaseResponse UpdCustomerTypeByCustoNo([FromBody] UpdateCustomerInputDto updateCustomerInputDto) { @@ -71,6 +76,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询所有客户信息 /// /// + [RequirePermission("customer.view")] [HttpGet] public ListOutputDto SelectCustomers(ReadCustomerInputDto custo) { @@ -81,6 +87,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询指定客户信息 /// /// + [RequirePermission("customer.view")] [HttpGet] public SingleOutputDto SelectCustoByInfo([FromQuery] ReadCustomerInputDto custo) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs index 447a0de..c83d83e 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -28,6 +29,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// Dto /// 符合条件的水电费信息列表 + [RequirePermission("hydroelectricinformation.view")] [HttpGet] public ListOutputDto SelectEnergyManagementInfo([FromQuery] ReadEnergyManagementInputDto readEnergyManagementInputDto) { @@ -40,6 +42,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("hydroelectricinformation.create")] [HttpPost] public BaseResponse InsertEnergyManagementInfo([FromBody] CreateEnergyManagementInputDto w) { @@ -52,6 +55,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 包含要修改的数据,以及WtiNo作为查询条件 /// + [RequirePermission("hydroelectricinformation.update")] [HttpPost] public BaseResponse UpdateEnergyManagementInfo([FromBody] UpdateEnergyManagementInputDto w) { @@ -65,6 +69,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("hydroelectricinformation.delete")] [HttpPost] public BaseResponse DeleteEnergyManagementInfo([FromBody] DeleteEnergyManagementInputDto deleteEnergyManagementInputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/PromotionContentController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/PromotionContentController.cs index 782c1d9..0ce1a16 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/PromotionContentController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/PromotionContentController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -27,6 +28,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询所有宣传联动内容 /// /// + [RequirePermission("promotioncontent.view")] [HttpGet] public ListOutputDto SelectPromotionContentAll([FromQuery] ReadPromotionContentInputDto readPromotionContentInputDto) { @@ -37,6 +39,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询所有宣传联动内容(跑马灯) /// /// + [RequirePermission("promotioncontent.view")] [HttpGet] public ListOutputDto SelectPromotionContents() { @@ -48,6 +51,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("promotioncontent.create")] [HttpPost] public BaseResponse AddPromotionContent([FromBody] CreatePromotionContentInputDto createPromotionContentInputDto) { @@ -59,6 +63,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("promotioncontent.delete")] [HttpPost] public BaseResponse DeletePromotionContent([FromBody] DeletePromotionContentInputDto deletePromotionContentInputDto) { @@ -70,6 +75,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("promotioncontent.update")] [HttpPost] public BaseResponse UpdatePromotionContent([FromBody] UpdatePromotionContentInputDto updatePromotionContentInputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs index a284922..3aaac6b 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -27,6 +28,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取所有预约信息 /// /// + [RequirePermission("resermanagement.view")] [HttpGet] public ListOutputDto SelectReserAll(ReadReserInputDto readReserInputDto) { @@ -38,6 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("resermanagement.view")] [HttpGet] public SingleOutputDto SelectReserInfoByRoomNo([FromQuery] ReadReserInputDto readReserInputDto) { @@ -49,6 +52,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("resermanagement.delete")] [HttpPost] public BaseResponse DeleteReserInfo([FromBody] DeleteReserInputDto reser) { @@ -60,6 +64,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("resermanagement.update")] [HttpPost] public BaseResponse UpdateReserInfo([FromBody] UpdateReserInputDto r) { @@ -71,6 +76,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("resermanagement.create")] [HttpPost] public BaseResponse InserReserInfo([FromBody] CreateReserInputDto r) { @@ -81,6 +87,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询所有预约类型 /// /// + [RequirePermission("resermanagement.view")] [HttpGet] public ListOutputDto SelectReserTypeAll() { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs index 5ef1fd0..ffb9b13 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public ListOutputDto SelectRoomByRoomState([FromQuery] ReadRoomInputDto inputDto) { @@ -31,6 +33,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 根据房间状态来查询可使用的房间 /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public ListOutputDto SelectCanUseRoomAll() { @@ -41,6 +44,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取所有房间信息 /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public ListOutputDto SelectRoomAll([FromQuery] ReadRoomInputDto readRoomInputDto) { @@ -52,6 +56,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public ListOutputDto SelectRoomByTypeName([FromQuery] ReadRoomInputDto inputDto) { @@ -63,6 +68,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public SingleOutputDto SelectRoomByRoomNo([FromQuery] ReadRoomInputDto inputDto) { @@ -74,6 +80,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public SingleOutputDto DayByRoomNo([FromQuery] ReadRoomInputDto inputDto) { @@ -85,6 +92,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.update")] [HttpPost] public BaseResponse UpdateRoomInfo([FromBody] UpdateRoomInputDto inputDto) { @@ -96,6 +104,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.update")] [HttpPost] public BaseResponse UpdateRoomInfoWithReser([FromBody] UpdateRoomInputDto inputDto) { @@ -106,6 +115,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询可入住房间数量 /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public SingleOutputDto SelectCanUseRoomAllByRoomState() { @@ -116,6 +126,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询已入住房间数量 /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public SingleOutputDto SelectNotUseRoomAllByRoomState() { @@ -127,6 +138,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public object SelectRoomByRoomPrice([FromQuery] ReadRoomInputDto inputDto) { @@ -137,6 +149,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询脏房数量 /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public SingleOutputDto SelectNotClearRoomAllByRoomState() { @@ -147,6 +160,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询维修房数量 /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public SingleOutputDto SelectFixingRoomAllByRoomState() { @@ -157,6 +171,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询预约房数量 /// /// + [RequirePermission("roommanagement.view")] [HttpGet] public SingleOutputDto SelectReservedRoomAllByRoomState() { @@ -168,6 +183,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.update")] [HttpPost] public BaseResponse UpdateRoomStateByRoomNo([FromBody] UpdateRoomInputDto inputDto) { @@ -179,6 +195,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.create")] [HttpPost] public BaseResponse InsertRoom([FromBody] CreateRoomInputDto inputDto) { @@ -190,6 +207,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.update")] [HttpPost] public BaseResponse UpdateRoom([FromBody] UpdateRoomInputDto inputDto) { @@ -201,6 +219,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.delete")] [HttpPost] public BaseResponse DeleteRoom([FromBody] DeleteRoomInputDto inputDto) { @@ -212,6 +231,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.update")] [HttpPost] public BaseResponse TransferRoom([FromBody] TransferRoomDto transferRoomDto) { @@ -223,6 +243,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.update")] [HttpPost] public BaseResponse CheckoutRoom([FromBody] CheckoutRoomDto checkoutRoomDto) { @@ -234,6 +255,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roommanagement.update")] [HttpPost] public BaseResponse CheckinRoomByReservation([FromBody] CheckinRoomByReservationDto checkinRoomByReservationDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs index 7114024..d86873e 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roomconfig.view")] [HttpGet] public ListOutputDto SelectRoomTypesAll([FromQuery] ReadRoomTypeInputDto inputDto) { @@ -32,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roomconfig.view")] [HttpGet] public SingleOutputDto SelectRoomTypeByRoomNo([FromQuery] ReadRoomTypeInputDto inputDto) { @@ -43,6 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roomconfig.create")] [HttpPost] public BaseResponse InsertRoomType([FromBody] CreateRoomTypeInputDto inputDto) { @@ -54,6 +58,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roomconfig.update")] [HttpPost] public BaseResponse UpdateRoomType([FromBody] UpdateRoomTypeInputDto inputDto) { @@ -65,6 +70,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("roomconfig.delete")] [HttpPost] public BaseResponse DeleteRoomType([FromBody] DeleteRoomTypeInputDto inputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs index 3e2ee06..69bdbae 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("goodsmanagement.view")] [HttpGet] public ListOutputDto SelectSellThingAll([FromQuery] ReadSellThingInputDto sellThing = null) { @@ -32,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("goodsmanagement.update")] [HttpPost] public BaseResponse UpdateSellThing([FromBody] UpdateSellThingInputDto updateSellThingInputDto) { @@ -43,6 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("goodsmanagement.update")] [HttpPost] public BaseResponse UpdateSellthing([FromBody] UpdateSellThingInputDto sellThing) { @@ -54,6 +58,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("goodsmanagement.delete")] [HttpPost] public BaseResponse DeleteSellthing([FromBody] DeleteSellThingInputDto deleteSellThingInputDto) { @@ -65,6 +70,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("goodsmanagement.view")] [HttpGet] public SingleOutputDto SelectSellThingByNameAndPrice([FromQuery] ReadSellThingInputDto readSellThingInputDto) { @@ -76,6 +82,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("goodsmanagement.create")] [HttpPost] public BaseResponse InsertSellThing([FromBody] CreateSellThingInputDto st) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs index e944c83..6df49c6 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customerspend.view")] [HttpGet] public ListOutputDto SelectSpendByRoomNo([FromQuery] ReadSpendInputDto inputDto) { @@ -32,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customerspend.view")] [HttpGet] public ListOutputDto SeletHistorySpendInfoAll([FromQuery] ReadSpendInputDto inputDto) { @@ -42,6 +45,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询消费的所有信息 /// /// + [RequirePermission("customerspend.view")] [HttpGet] public ListOutputDto SelectSpendInfoAll([FromQuery] ReadSpendInputDto readSpendInputDto) { @@ -53,6 +57,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customerspend.view")] [HttpGet] public SingleOutputDto SumConsumptionAmount([FromQuery] ReadSpendInputDto inputDto) { @@ -64,6 +69,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customerspend.delete")] [HttpPost] public BaseResponse UndoCustomerSpend([FromBody] UpdateSpendInputDto updateSpendInputDto) { @@ -75,6 +81,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customerspend.create")] [HttpPost] public BaseResponse AddCustomerSpend([FromBody] AddCustomerSpendInputDto addCustomerSpendInputDto) { @@ -86,6 +93,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("customerspend.update")] [HttpPost] public BaseResponse UpdSpendInfo([FromBody] UpdateSpendInputDto inputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Dashboard/DashboardController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Dashboard/DashboardController.cs index 329f8bf..52eacf8 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Dashboard/DashboardController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Dashboard/DashboardController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -17,6 +18,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取房间统计信息 /// /// + [RequirePermission("dashboard.view")] [HttpGet] public SingleOutputDto RoomStatistics() { @@ -27,6 +29,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取业务统计信息 /// /// + [RequirePermission("dashboard.view")] [HttpGet] public SingleOutputDto BusinessStatistics() { @@ -37,6 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取后勤统计信息 /// /// + [RequirePermission("dashboard.view")] [HttpGet] public SingleOutputDto LogisticsStatistics() { @@ -47,6 +51,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 获取人事统计信息 /// /// + [RequirePermission("dashboard.view")] [HttpGet] public SingleOutputDto HumanResourcesStatistics() { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs index b3d8467..68e75a3 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.view")] [HttpGet] public ListOutputDto SelectCheckInfoByEmployeeId([FromQuery] ReadEmployeeCheckInputDto inputDto) { @@ -32,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.view")] [HttpGet] public SingleOutputDto SelectWorkerCheckDaySumByEmployeeId([FromQuery] ReadEmployeeCheckInputDto inputDto) { @@ -43,6 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.view")] [HttpGet] public SingleOutputDto SelectToDayCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) { @@ -54,6 +58,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.create")] [HttpPost] public BaseResponse AddCheckInfo([FromBody] CreateEmployeeCheckInputDto workerCheck) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs index 922ecdc..cb0b512 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs @@ -2,6 +2,7 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -22,6 +23,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.update")] [HttpPost] public BaseResponse UpdateEmployee([FromBody] UpdateEmployeeInputDto worker) { @@ -33,6 +35,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.update")] [HttpPost] public BaseResponse ManagerEmployeeAccount([FromBody] UpdateEmployeeInputDto worker) { @@ -44,6 +47,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.create")] [HttpPost] public BaseResponse AddEmployee([FromBody] CreateEmployeeInputDto worker) { @@ -55,6 +59,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.view")] [HttpGet] public ListOutputDto SelectEmployeeAll([FromQuery] ReadEmployeeInputDto inputDto) { @@ -66,6 +71,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.view")] [HttpGet] public SingleOutputDto SelectEmployeeInfoByEmployeeId([FromQuery] ReadEmployeeInputDto inputDto) { @@ -89,6 +95,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.update")] [HttpPost] public BaseResponse UpdateEmployeeAccountPassword([FromBody] UpdateEmployeeInputDto updateEmployeeInputDto) { @@ -99,6 +106,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.update")] [HttpPost] public BaseResponse ResetEmployeeAccountPassword([FromBody] UpdateEmployeeInputDto updateEmployeeInputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs index c6e7e88..ae5615e 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.create")] [HttpPost] public BaseResponse AddHistoryByEmployeeId([FromBody] CreateEmployeeHistoryInputDto workerHistory) { @@ -32,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.view")] [HttpGet] public ListOutputDto SelectHistoryByEmployeeId([FromQuery] ReadEmployeeHistoryInputDto inputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs index 8421cf9..274f729 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs @@ -2,6 +2,7 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -22,6 +23,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.view")] [HttpGet] public SingleOutputDto EmployeePhoto([FromQuery] ReadEmployeePhotoInputDto inputDto) { @@ -34,6 +36,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.create")] [HttpPost] public SingleOutputDto InsertWorkerPhoto([FromForm] CreateEmployeePhotoInputDto inputDto, IFormFile file) { @@ -45,6 +48,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.delete")] [HttpPost] public BaseResponse DeleteWorkerPhoto([FromBody] DeleteEmployeePhotoInputDto inputDto) { @@ -56,6 +60,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("staffmanagement.update")] [HttpPost] public BaseResponse UpdateWorkerPhoto([FromBody] UpdateEmployeePhotoInputDto inputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs index 941a9e6..fb5c89f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -20,6 +21,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询所有菜单信息 /// /// + [RequirePermission("menumanagement.view")] [HttpGet] public ListOutputDto SelectMenuAll(ReadMenuInputDto readMenuInputDto) { @@ -30,6 +32,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 构建菜单树 /// /// + [RequirePermission("menumanagement.view")] [HttpPost] public ListOutputDto BuildMenuAll([FromBody] BaseInputDto baseInputDto) { @@ -41,6 +44,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("menumanagement.create")] [HttpPost] public BaseResponse InsertMenu([FromBody] CreateMenuInputDto menu) { @@ -52,6 +56,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("menumanagement.update")] [HttpPost] public BaseResponse UpdateMenu([FromBody] UpdateMenuInputDto menu) { @@ -63,6 +68,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("menumanagement.delete")] [HttpPost] public BaseResponse DeleteMenu([FromBody] DeleteMenuInputDto menu) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs index 1fb4fec..af45a78 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("supervisioninfo.view")] [HttpGet] public ListOutputDto SelectSupervisionStatisticsAll([FromQuery] ReadSupervisionStatisticsInputDto inputDto) { @@ -32,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("supervisioninfo.create")] [HttpPost] public BaseResponse InsertSupervisionStatistics([FromBody] CreateSupervisionStatisticsInputDto inputDto) { @@ -43,6 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("supervisioninfo.update")] [HttpPost] public BaseResponse UpdateSupervisionStatistics([FromBody] UpdateSupervisionStatisticsInputDto inputDto) { @@ -54,6 +58,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("supervisioninfo.delete")] [HttpPost] public BaseResponse DeleteSupervisionStatistics([FromBody] DeleteSupervisionStatisticsInputDto inputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs index 205a1f5..6b0cdf0 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs @@ -1,6 +1,7 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -21,6 +22,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("viplevel.view")] [HttpGet] public ListOutputDto SelectVipRuleList([FromQuery] ReadVipLevelRuleInputDto inputDto) { @@ -32,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("viplevel.view")] [HttpGet] public SingleOutputDto SelectVipRule([FromQuery] ReadVipLevelRuleInputDto inputDto) { @@ -43,6 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("viplevel.create")] [HttpPost] public BaseResponse AddVipRule([FromBody] CreateVipLevelRuleInputDto inputDto) { @@ -54,6 +58,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("viplevel.delete")] [HttpPost] public BaseResponse DelVipRule([FromBody] DeleteVipLevelRuleInputDto inputDto) { @@ -65,6 +70,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("viplevel.update")] [HttpPost] public BaseResponse UpdVipRule([FromBody] UpdateVipLevelRuleInputDto inputDto) { diff --git a/EOM.TSHotelManagement.WebApi/Extension/PermissionSyncExtensions.cs b/EOM.TSHotelManagement.WebApi/Extension/PermissionSyncExtensions.cs new file mode 100644 index 0000000..59d87fb --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Extension/PermissionSyncExtensions.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Infrastructure; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using SqlSugar; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.WebApi.Authorization; + +namespace EOM.TSHotelManagement.WebApi.Extension +{ + /// + /// 启动时扫描所有带有 RequirePermissionAttribute 的控制器动作, + /// 将缺失的权限码自动初始化到数据库,并默认关联到“超级管理员”角色。 + /// + public static class PermissionSyncExtensions + { + private const string AdminRoleNumber = "R-ADMIN"; + + /// + /// 扫描并同步权限 + /// + public static void SyncPermissionsFromAttributes(this IApplicationBuilder app) + { + using var scope = app.ApplicationServices.CreateScope(); + + var loggerFactory = scope.ServiceProvider.GetRequiredService(); + var logger = loggerFactory.CreateLogger("PermissionSync"); + var db = scope.ServiceProvider.GetRequiredService(); + var actionProvider = scope.ServiceProvider.GetRequiredService(); + + try + { + var descriptors = actionProvider.ActionDescriptors.Items.OfType().ToList(); + + var codes = new HashSet(StringComparer.OrdinalIgnoreCase); + + foreach (var cad in descriptors) + { + // 方法级 + foreach (var attr in cad.MethodInfo.GetCustomAttributes(inherit: true)) + { + if (attr is RequirePermissionAttribute rpa && !string.IsNullOrWhiteSpace(rpa.PermissionCode)) + { + codes.Add(rpa.PermissionCode); + } + } + + // 控制器级(以防未来使用) + foreach (var attr in cad.ControllerTypeInfo.GetCustomAttributes(inherit: true)) + { + if (attr is RequirePermissionAttribute rpa && !string.IsNullOrWhiteSpace(rpa.PermissionCode)) + { + codes.Add(rpa.PermissionCode); + } + } + } + + if (codes.Count == 0) + { + logger.LogInformation("PermissionSync: 未发现任何 RequirePermissionAttribute 标注的接口,跳过同步。"); + return; + } + + // 查询已有权限 + var existing = db.Queryable() + .Where(p => p.IsDelete != 1) + .Select(p => p.PermissionNumber) + .ToList(); + + var toInsert = codes + .Where(c => !string.IsNullOrWhiteSpace(c)) + .Except(existing, StringComparer.OrdinalIgnoreCase) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + if (toInsert.Count > 0) + { + var now = DateTime.Now; + var newPerms = toInsert.Select(code => new Permission + { + PermissionNumber = code, + PermissionName = code, // 默认使用编码作为名称 + Module = GuessModule(code), + Description = "Auto-synced from [RequirePermission] on API action", + MenuKey = null, + ParentNumber = null, + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = now + }).ToList(); + + db.Insertable(newPerms).ExecuteCommand(); + logger.LogInformation("PermissionSync: 已插入 {Count} 条新权限。", newPerms.Count); + } + else + { + logger.LogInformation("PermissionSync: 所有标注的权限均已存在,无需插入。"); + } + + // 默认将所有扫描到的权限与超级管理员角色关联 + // 如角色不存在,DatabaseInitializer 已负责创建;此处仅做映射补齐 + var existingRolePerms = db.Queryable() + .Where(rp => rp.RoleNumber == AdminRoleNumber && rp.IsDelete != 1) + .Select(rp => rp.PermissionNumber) + .ToList(); + + var toGrant = codes + .Where(c => !string.IsNullOrWhiteSpace(c)) + .Except(existingRolePerms, StringComparer.OrdinalIgnoreCase) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + if (toGrant.Count > 0) + { + var now = DateTime.Now; + var inserts = toGrant.Select(p => new RolePermission + { + RoleNumber = AdminRoleNumber, + PermissionNumber = p, + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = now + }).ToList(); + + db.Insertable(inserts).ExecuteCommand(); + logger.LogInformation("PermissionSync: 已为超级管理员角色授予 {Count} 条权限。", inserts.Count); + } + else + { + logger.LogInformation("PermissionSync: 超级管理员已具备所有扫描到的权限。"); + } + } + catch (Exception ex) + { + logger.LogError(ex, "PermissionSync: 同步权限时发生异常。"); + } + } + + private static string GuessModule(string code) + { + if (string.IsNullOrWhiteSpace(code)) + return "api"; + + var colon = code.IndexOf(':'); + if (colon > 0) + { + return code.Substring(0, colon); + } + + // 兼容 "xxx.yyy" 风格 + var dot = code.IndexOf('.'); + if (dot > 0) + { + return code.Substring(0, dot); + } + + return "api"; + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index 011351a..b377998 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -21,6 +21,7 @@ using System.IO; using System.Reflection; using System.Text; using System.Text.Json.Serialization; +using EOM.TSHotelManagement.WebApi.Extension; namespace EOM.TSHotelManagement.WebApi { @@ -55,6 +56,7 @@ namespace EOM.TSHotelManagement.WebApi ConfigureEnvironment(app, env); ConfigureMiddlewares(app); InitializeDatabase(app); + app.SyncPermissionsFromAttributes(); ConfigureEndpoints(app); ConfigureSwaggerUI(app); } -- Gitee From 02db8213232c6c9ca6b01f8d4eff84a6c1e15ace Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Wed, 1 Oct 2025 16:04:26 +0800 Subject: [PATCH 03/21] adjustment Project Layout --- .../{ => Account}/CustomerAccountService.cs | 44 +- .../{ => Account}/ICustomerAccountService.cs | 0 .../Business/Customer/CustomerService.cs | 44 +- .../Permission/CustomerPermissionService.cs | 388 ++++++++++++++++++ .../Permission/ICustomerPermissionService.cs | 45 ++ .../Business/Spend/SpendService.cs | 2 +- .../EOM.TSHotelManagement.Application.csproj | 4 +- .../Permission/EmployeePermissionService.cs | 388 ++++++++++++++++++ .../Permission/IEmployeePermissionService.cs | 44 ++ .../Util/UtilService.cs | 5 +- ...M.TSHotelManagement.Common.Contract.csproj | 3 +- .../Dto/Employee/ReadEmployeeInputDto.cs | 4 +- .../Dto/Role/AssignUserRolesInputDto.cs | 2 +- .../CreateOperationLogInputDto.cs | 3 +- .../OperationLog/ReadOperationLogOutputDto.cs | 4 +- .../UpdateOperationLogInputDto.cs | 2 +- .../Business/Asset/Asset.cs | 18 +- .../Business/Room/Room.cs | 14 +- .../Business/Room/RoomType.cs | 10 +- .../EOM.TSHotelManagement.Common.Core.csproj | 4 - .../SystemManagement/Administrator.cs | 16 +- .../Util/OperationLog.cs | 23 +- .../Config/JwtConfig.cs | 2 +- .../Config/LskyConfig.cs | 2 +- .../Config/MailConfig.cs | 2 +- .../Config/Template.cs | 2 +- .../EOM.TSHotelManagement.Common.Util.csproj | 6 +- .../GenerateJWT/JWTHelper.cs | 3 +- .../Helper/LskyHelper.cs | 3 +- .../Helper/MailHelper.cs | 3 +- .../Interfaces/IJwtConfigFactory.cs | 2 +- .../Interfaces/ILskyConfigFactory.cs | 2 +- .../Interfaces/IMailConfigFactory.cs | 2 +- .../Templates/EmailTemplate.cs | 3 +- .../DatabaseInitializer.cs | 38 ++ ...M.TSHotelManagement.EntityFramework.csproj | 3 +- .../Constant}/SpendType.cs | 4 +- .../EOM.TSHotelManagement.Shared.csproj | 4 - .../Enums/LogLevel.cs | 30 ++ .../Enums}/RoomState.cs | 2 +- .../CustomerPermissionController.cs | 89 ++++ .../EmployeePermission/EmployeeController.cs | 90 ++++ .../EOM.TSHotelManagement.WebApi.csproj | 3 - .../Extension/DateOnlyJsonConverter.cs | 24 +- .../Factory/JwtConfigFactory.cs | 2 +- .../Factory/LskyConfigFactory.cs | 2 +- .../Factory/MailConfigFactory.cs | 3 +- EOM.TSHotelManagement.WebApi/Startup.cs | 6 + 48 files changed, 1289 insertions(+), 110 deletions(-) rename EOM.TSHotelManagement.Application/Business/Customer/{ => Account}/CustomerAccountService.cs (83%) rename EOM.TSHotelManagement.Application/Business/Customer/{ => Account}/ICustomerAccountService.cs (100%) create mode 100644 EOM.TSHotelManagement.Application/Business/Customer/Permission/CustomerPermissionService.cs create mode 100644 EOM.TSHotelManagement.Application/Business/Customer/Permission/ICustomerPermissionService.cs create mode 100644 EOM.TSHotelManagement.Application/Employee/Permission/EmployeePermissionService.cs create mode 100644 EOM.TSHotelManagement.Application/Employee/Permission/IEmployeePermissionService.cs rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common.Util}/Config/JwtConfig.cs (73%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common.Util}/Config/LskyConfig.cs (85%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common.Util}/Config/MailConfig.cs (94%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common.Util}/Config/Template.cs (72%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common.Util}/Interfaces/IJwtConfigFactory.cs (67%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common.Util}/Interfaces/ILskyConfigFactory.cs (68%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common.Util}/Interfaces/IMailConfigFactory.cs (68%) rename {EOM.TSHotelManagement.Common.Core/Business/Spend => EOM.TSHotelManagement.Shared/Constant}/SpendType.cs (83%) create mode 100644 EOM.TSHotelManagement.Shared/Enums/LogLevel.cs rename {EOM.TSHotelManagement.Common.Core/Business/Room => EOM.TSHotelManagement.Shared/Enums}/RoomState.cs (97%) create mode 100644 EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs create mode 100644 EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerAccountService.cs b/EOM.TSHotelManagement.Application/Business/Customer/Account/CustomerAccountService.cs similarity index 83% rename from EOM.TSHotelManagement.Application/Business/Customer/CustomerAccountService.cs rename to EOM.TSHotelManagement.Application/Business/Customer/Account/CustomerAccountService.cs index b2d15b1..d87d01e 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerAccountService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/Account/CustomerAccountService.cs @@ -24,6 +24,16 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository customerRepository; + /// + /// 角色仓储(用于客户组角色) + /// + private readonly GenericRepository roleRepository; + + /// + /// 用户-角色映射仓储(用于绑定客户至客户组) + /// + private readonly GenericRepository userRoleRepository; + /// /// 数据保护工具 /// @@ -47,10 +57,12 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CustomerAccountService(GenericRepository customerAccountRepository, GenericRepository customerRepository, DataProtectionHelper dataProtector, JWTHelper jWTHelper, IHttpContextAccessor httpContextAccessor, Regex accountRegex, Regex passwordRegex) + public CustomerAccountService(GenericRepository customerAccountRepository, GenericRepository customerRepository, GenericRepository roleRepository, GenericRepository userRoleRepository, DataProtectionHelper dataProtector, JWTHelper jWTHelper, IHttpContextAccessor httpContextAccessor, Regex accountRegex, Regex passwordRegex) { this.customerAccountRepository = customerAccountRepository; this.customerRepository = customerRepository; + this.roleRepository = roleRepository; + this.userRoleRepository = userRoleRepository; this.dataProtector = dataProtector; this.jWTHelper = jWTHelper; _httpContextAccessor = httpContextAccessor; @@ -181,6 +193,36 @@ namespace EOM.TSHotelManagement.Application return new SingleOutputDto() { Code = BusinessStatusCode.InternalServerError, Message = LocalizationHelper.GetLocalizedString("Customer insert failed", "客户插入失败"), Data = new ReadCustomerAccountOutputDto() }; } + // 将客户加入“客户组”角色,便于与管理员一样进行权限配置 + const string customerRoleNumber = "R-CUSTOMER"; + + // 确保客户组角色存在 + if (!roleRepository.AsQueryable().Any(r => r.RoleNumber == customerRoleNumber && r.IsDelete != 1)) + { + roleRepository.Insert(new Role + { + RoleNumber = customerRoleNumber, + RoleName = LocalizationHelper.GetLocalizedString("Customer Group", "客户组"), + RoleDescription = LocalizationHelper.GetLocalizedString("Unified permission group for customers", "客户统一权限组"), + IsDelete = 0, + DataInsUsr = readCustomerAccountInputDto.Account, + DataInsDate = DateTime.Now + }); + } + + // 绑定客户到客户组角色 + if (!userRoleRepository.AsQueryable().Any(ur => ur.UserNumber == customerNumber && ur.RoleNumber == customerRoleNumber && ur.IsDelete != 1)) + { + userRoleRepository.Insert(new UserRole + { + UserNumber = customerNumber, + RoleNumber = customerRoleNumber, + IsDelete = 0, + DataInsUsr = readCustomerAccountInputDto.Account, + DataInsDate = DateTime.Now + }); + } + customerAccount.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] { new Claim(ClaimTypes.Name, customerAccount.Name), diff --git a/EOM.TSHotelManagement.Application/Business/Customer/ICustomerAccountService.cs b/EOM.TSHotelManagement.Application/Business/Customer/Account/ICustomerAccountService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Business/Customer/ICustomerAccountService.cs rename to EOM.TSHotelManagement.Application/Business/Customer/Account/ICustomerAccountService.cs diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index 6f96b56..7b3cb4b 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -56,6 +56,16 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository custoTypeRepository; + /// + /// 角色仓储(用于客户组角色) + /// + private readonly GenericRepository roleRepository; + + /// + /// 用户-角色映射仓储(用于绑定客户至客户组) + /// + private readonly GenericRepository userRoleRepository; + /// /// 数据保护工具 /// @@ -69,12 +79,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CustomerService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, DataProtectionHelper dataProtectionHelper) + public CustomerService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, GenericRepository roleRepository, GenericRepository userRoleRepository, DataProtectionHelper dataProtectionHelper) { this.custoRepository = custoRepository; this.spendRepository = spendRepository; this.passPortTypeRepository = passPortTypeRepository; this.custoTypeRepository = custoTypeRepository; + this.roleRepository = roleRepository; + this.userRoleRepository = userRoleRepository; this.dataProtector = dataProtectionHelper; } @@ -101,6 +113,36 @@ namespace EOM.TSHotelManagement.Application LogHelper.LogError(LocalizationHelper.GetLocalizedString("Insert Customer Failed", "客户信息添加失败"), null); return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString("Insert Customer Failed", "客户信息添加失败")); } + + // 将客户加入“客户组”角色,便于与管理员一样进行权限配置 + const string customerRoleNumber = "R-CUSTOMER"; + + // 确保客户组角色存在 + if (!roleRepository.AsQueryable().Any(r => r.RoleNumber == customerRoleNumber && r.IsDelete != 1)) + { + roleRepository.Insert(new Role + { + RoleNumber = customerRoleNumber, + RoleName = LocalizationHelper.GetLocalizedString("Customer Group", "客户组"), + RoleDescription = LocalizationHelper.GetLocalizedString("Unified permission group for customers", "客户统一权限组"), + IsDelete = 0, + DataInsUsr = customer.DataInsUsr, + DataInsDate = DateTime.Now + }); + } + + // 绑定客户到客户组角色 + if (!userRoleRepository.AsQueryable().Any(ur => ur.UserNumber == customer.CustomerNumber && ur.RoleNumber == customerRoleNumber && ur.IsDelete != 1)) + { + userRoleRepository.Insert(new UserRole + { + UserNumber = customer.CustomerNumber, + RoleNumber = customerRoleNumber, + IsDelete = 0, + DataInsUsr = customer.DataInsUsr, + DataInsDate = DateTime.Now + }); + } } catch (Exception ex) { diff --git a/EOM.TSHotelManagement.Application/Business/Customer/Permission/CustomerPermissionService.cs b/EOM.TSHotelManagement.Application/Business/Customer/Permission/CustomerPermissionService.cs new file mode 100644 index 0000000..cbe5edd --- /dev/null +++ b/EOM.TSHotelManagement.Application/Business/Customer/Permission/CustomerPermissionService.cs @@ -0,0 +1,388 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.EntityFramework; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using jvncorelib.EntityLib; + +namespace EOM.TSHotelManagement.Application +{ + /// filename OR language.declaration() + /// CustomerPermissionService.CustomerPermissionService():1 + /// + /// 客户组权限分配服务实现 + /// + public class CustomerPermissionService : ICustomerPermissionService + { + private readonly GenericRepository customerRepository; + private readonly GenericRepository userRoleRepository; + private readonly GenericRepository rolePermissionRepository; + private readonly GenericRepository permissionRepository; + private readonly GenericRepository roleRepository; + + public CustomerPermissionService( + GenericRepository customerRepository, + GenericRepository userRoleRepository, + GenericRepository rolePermissionRepository, + GenericRepository permissionRepository, + GenericRepository roleRepository) + { + this.customerRepository = customerRepository; + this.userRoleRepository = userRoleRepository; + this.rolePermissionRepository = rolePermissionRepository; + this.permissionRepository = permissionRepository; + this.roleRepository = roleRepository; + } + + /// filename OR language.declaration() + /// CustomerPermissionService.AssignUserRoles():1 + public BaseResponse AssignUserRoles(AssignUserRolesInputDto input) + { + if (input == null || input.UserNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码")); + } + + try + { + // 校验客户是否存在且未删除 + var userExists = customerRepository.IsAny(c => c.CustomerNumber == input.UserNumber && c.IsDelete != 1); + if (!userExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("User not found", "用户不存在")); + } + + // 软删除当前用户下所有有效的角色绑定 + var existing = userRoleRepository.AsQueryable() + .Where(x => x.UserNumber == input.UserNumber && x.IsDelete != 1) + .Select(x => new UserRole { UserNumber = x.UserNumber, RoleNumber = x.RoleNumber, IsDelete = 1 }) + .ToList(); + + foreach (var ur in existing) + { + userRoleRepository.SoftDelete(ur); + } + + // 过滤、去重、忽略空白 + var roles = (input.RoleNumbers ?? new List()) + .Where(r => !r.IsNullOrEmpty()) + .Select(r => r.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 插入新的角色绑定 + foreach (var role in roles) + { + var entity = new UserRole + { + UserNumber = input.UserNumber, + RoleNumber = role, + IsDelete = 0 + }; + userRoleRepository.Insert(entity); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Assign roles success", "分配角色成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Assign roles failed: {ex.Message}", $"分配角色失败:{ex.Message}")); + } + } + + /// filename OR language.declaration() + /// CustomerPermissionService.ReadUserRoles():1 + public ListOutputDto ReadUserRoles(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var roleNumbers = userRoleRepository.AsQueryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToList(); + + roleNumbers = roleNumbers?.Where(r => !r.IsNullOrEmpty())?.Distinct(StringComparer.OrdinalIgnoreCase)?.ToList() ?? new List(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = roleNumbers, + TotalCount = roleNumbers.Count + } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + } + + /// filename OR language.declaration() + /// CustomerPermissionService.ReadUserRolePermissions():1 + public ListOutputDto ReadUserRolePermissions(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + // 1) 用户 -> 角色 + var roleNumbers = userRoleRepository.AsQueryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToList(); + + roleNumbers = roleNumbers? + .Where(r => !r.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList() ?? new List(); + + if (roleNumbers.Count == 0) + { + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + + // 2) 角色 -> 权限编码(RolePermission) + var rolePermList = rolePermissionRepository.AsQueryable() + .Where(rp => rp.IsDelete != 1 && roleNumbers.Contains(rp.RoleNumber)) + .Select(rp => new { rp.RoleNumber, rp.PermissionNumber }) + .ToList(); + + var permNumbers = rolePermList + .Select(x => x.PermissionNumber) + .Where(x => !x.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 3) 权限详情(Permission) + var permInfo = new Dictionary(StringComparer.OrdinalIgnoreCase); + if (permNumbers.Count > 0) + { + var info = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && permNumbers.Contains(p.PermissionNumber)) + .Select(p => new { p.PermissionNumber, p.PermissionName, p.MenuKey }) + .ToList(); + + foreach (var p in info) + { + permInfo[p.PermissionNumber] = (p.PermissionName, p.MenuKey ?? string.Empty); + } + } + + // 4) 组装输出 + var resultItems = rolePermList.Select(x => + { + permInfo.TryGetValue(x.PermissionNumber, out var meta); + return new UserRolePermissionOutputDto + { + RoleNumber = x.RoleNumber, + PermissionNumber = x.PermissionNumber, + PermissionName = meta.Name, + MenuKey = meta.MenuKey + }; + }).ToList(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = resultItems, + TotalCount = resultItems.Count + } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + } + + /// filename OR language.declaration() + /// CustomerPermissionService.AssignUserPermissions():1 + public BaseResponse AssignUserPermissions(AssignUserPermissionsInputDto input) + { + if (input == null || input.UserNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码")); + } + + try + { + // 校验客户是否存在且未删除 + var userExists = customerRepository.IsAny(c => c.CustomerNumber == input.UserNumber && c.IsDelete != 1); + if (!userExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("User not found", "用户不存在")); + } + + var userRoleNumber = $"R-USER-{input.UserNumber}"; + + // 确保专属角色存在 + var existsRole = roleRepository.IsAny(r => r.RoleNumber == userRoleNumber && r.IsDelete != 1); + if (!existsRole) + { + var role = new Role + { + RoleNumber = userRoleNumber, + RoleName = $"用户{input.UserNumber}直接权限", + RoleDescription = $"用户{input.UserNumber}直接权限", + IsDelete = 0 + }; + roleRepository.Insert(role); + } + + // 软删除当前专属角色下所有有效的角色-权限绑定 + var existing = rolePermissionRepository.AsQueryable() + .Where(x => x.RoleNumber == userRoleNumber && x.IsDelete != 1) + .Select(x => new RolePermission { RoleNumber = x.RoleNumber, PermissionNumber = x.PermissionNumber, IsDelete = 1 }) + .ToList(); + + foreach (var rp in existing) + { + rolePermissionRepository.SoftDelete(rp); + } + + // 过滤、去重、忽略空白 + var perms = (input.PermissionNumbers ?? new List()) + .Where(p => !p.IsNullOrEmpty()) + .Select(p => p.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + if (perms.Count > 0) + { + // 仅保留系统中存在的权限码 + var validPerms = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && perms.Contains(p.PermissionNumber)) + .Select(p => p.PermissionNumber) + .ToList(); + + foreach (var pnum in validPerms) + { + var entity = new RolePermission + { + RoleNumber = userRoleNumber, + PermissionNumber = pnum, + IsDelete = 0 + }; + rolePermissionRepository.Insert(entity); + } + } + + // 确保用户与专属角色绑定存在 + var hasBinding = userRoleRepository.IsAny(ur => ur.UserNumber == input.UserNumber && ur.RoleNumber == userRoleNumber && ur.IsDelete != 1); + if (!hasBinding) + { + userRoleRepository.Insert(new UserRole + { + UserNumber = input.UserNumber, + RoleNumber = userRoleNumber, + IsDelete = 0 + }); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Assign direct permissions success", "分配直接权限成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Assign direct permissions failed: {ex.Message}", $"分配直接权限失败:{ex.Message}")); + } + } + + /// filename OR language.declaration() + /// CustomerPermissionService.ReadUserDirectPermissions():1 + public ListOutputDto ReadUserDirectPermissions(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var roleNumber = $"R-USER-{userNumber}"; + var list = rolePermissionRepository.AsQueryable() + .Where(rp => rp.RoleNumber == roleNumber && rp.IsDelete != 1) + .Select(rp => rp.PermissionNumber) + .ToList(); + + list = list?.Where(x => !x.IsNullOrEmpty())?.Distinct(StringComparer.OrdinalIgnoreCase)?.ToList() ?? new List(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData { Items = list, TotalCount = list.Count } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Customer/Permission/ICustomerPermissionService.cs b/EOM.TSHotelManagement.Application/Business/Customer/Permission/ICustomerPermissionService.cs new file mode 100644 index 0000000..f49f222 --- /dev/null +++ b/EOM.TSHotelManagement.Application/Business/Customer/Permission/ICustomerPermissionService.cs @@ -0,0 +1,45 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Application +{ + /// filename OR language.declaration() + /// CustomerPermissionService.cs:1 + /// + /// 客户组权限分配服务(与管理员一致的 5 个接口逻辑,校验目标用户为 Customer.CustomerNumber) + /// + public interface ICustomerPermissionService + { + /// filename OR language.declaration() + /// ICustomerPermissionService.AssignUserRoles():1 + /// 为客户分配角色(全量覆盖) + BaseResponse AssignUserRoles(AssignUserRolesInputDto input); + + /// filename OR language.declaration() + /// ICustomerPermissionService.ReadUserRoles():1 + /// 读取客户已分配的角色编码集合 + ListOutputDto ReadUserRoles(string userNumber); + + /// filename OR language.declaration() + /// ICustomerPermissionService.ReadUserRolePermissions():1 + /// 读取客户“角色-权限”明细 + ListOutputDto ReadUserRolePermissions(string userNumber); + + /// filename OR language.declaration() + /// ICustomerPermissionService.AssignUserPermissions():1 + /// 为客户分配“直接权限”(R-USER-{UserNumber} 全量覆盖) + BaseResponse AssignUserPermissions(AssignUserPermissionsInputDto input); + + /// filename OR language.declaration() + /// ICustomerPermissionService.ReadUserDirectPermissions():1 + /// 读取客户“直接权限”权限编码集合(来自 R-USER-{UserNumber}) + ListOutputDto ReadUserDirectPermissions(string userNumber); + } + +} diff --git a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs index 61870d6..0cac248 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs @@ -387,7 +387,7 @@ namespace EOM.TSHotelManagement.Application LogContent = logContent, LoginIpAddress = context.Connection.RemoteIpAddress?.ToString() ?? string.Empty, OperationAccount = addCustomerSpendInputDto.WorkerNo, - LogLevel = LogLevel.Warning, + LogLevel = (int)LogLevel.Warning, SoftwareVersion = addCustomerSpendInputDto.SoftwareVersion, IsDelete = 0, DataInsUsr = addCustomerSpendInputDto.WorkerNo, diff --git a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj index 642d27f..f40cb05 100644 --- a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj +++ b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj @@ -31,15 +31,13 @@ - + - - diff --git a/EOM.TSHotelManagement.Application/Employee/Permission/EmployeePermissionService.cs b/EOM.TSHotelManagement.Application/Employee/Permission/EmployeePermissionService.cs new file mode 100644 index 0000000..fdae2e0 --- /dev/null +++ b/EOM.TSHotelManagement.Application/Employee/Permission/EmployeePermissionService.cs @@ -0,0 +1,388 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.EntityFramework; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using jvncorelib.EntityLib; + +namespace EOM.TSHotelManagement.Application +{ + /// filename OR language.declaration() + /// EmployeePermissionService.EmployeePermissionService():1 + /// + /// 员工组权限分配服务实现 + /// + public class EmployeePermissionService : IEmployeePermissionService + { + private readonly GenericRepository employeeRepository; + private readonly GenericRepository userRoleRepository; + private readonly GenericRepository rolePermissionRepository; + private readonly GenericRepository permissionRepository; + private readonly GenericRepository roleRepository; + + public EmployeePermissionService( + GenericRepository employeeRepository, + GenericRepository userRoleRepository, + GenericRepository rolePermissionRepository, + GenericRepository permissionRepository, + GenericRepository roleRepository) + { + this.employeeRepository = employeeRepository; + this.userRoleRepository = userRoleRepository; + this.rolePermissionRepository = rolePermissionRepository; + this.permissionRepository = permissionRepository; + this.roleRepository = roleRepository; + } + + /// filename OR language.declaration() + /// EmployeePermissionService.AssignUserRoles():1 + public BaseResponse AssignUserRoles(AssignUserRolesInputDto input) + { + if (input == null || input.UserNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码")); + } + + try + { + // 校验员工是否存在且未删除 + var userExists = employeeRepository.IsAny(e => e.EmployeeId == input.UserNumber && e.IsDelete != 1); + if (!userExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("User not found", "用户不存在")); + } + + // 软删除当前用户下所有有效的角色绑定 + var existing = userRoleRepository.AsQueryable() + .Where(x => x.UserNumber == input.UserNumber && x.IsDelete != 1) + .Select(x => new UserRole { UserNumber = x.UserNumber, RoleNumber = x.RoleNumber, IsDelete = 1 }) + .ToList(); + + foreach (var ur in existing) + { + userRoleRepository.SoftDelete(ur); + } + + // 过滤、去重、忽略空白 + var roles = (input.RoleNumbers ?? new List()) + .Where(r => !r.IsNullOrEmpty()) + .Select(r => r.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 插入新的角色绑定 + foreach (var role in roles) + { + var entity = new UserRole + { + UserNumber = input.UserNumber, + RoleNumber = role, + IsDelete = 0 + }; + userRoleRepository.Insert(entity); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Assign roles success", "分配角色成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Assign roles failed: {ex.Message}", $"分配角色失败:{ex.Message}")); + } + } + + /// filename OR language.declaration() + /// EmployeePermissionService.ReadUserRoles():1 + public ListOutputDto ReadUserRoles(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var roleNumbers = userRoleRepository.AsQueryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToList(); + + roleNumbers = roleNumbers?.Where(r => !r.IsNullOrEmpty())?.Distinct(StringComparer.OrdinalIgnoreCase)?.ToList() ?? new List(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = roleNumbers, + TotalCount = roleNumbers.Count + } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + } + + /// filename OR language.declaration() + /// EmployeePermissionService.ReadUserRolePermissions():1 + public ListOutputDto ReadUserRolePermissions(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + // 1) 用户 -> 角色 + var roleNumbers = userRoleRepository.AsQueryable() + .Where(ur => ur.UserNumber == userNumber && ur.IsDelete != 1) + .Select(ur => ur.RoleNumber) + .ToList(); + + roleNumbers = roleNumbers? + .Where(r => !r.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList() ?? new List(); + + if (roleNumbers.Count == 0) + { + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + + // 2) 角色 -> 权限编码(RolePermission) + var rolePermList = rolePermissionRepository.AsQueryable() + .Where(rp => rp.IsDelete != 1 && roleNumbers.Contains(rp.RoleNumber)) + .Select(rp => new { rp.RoleNumber, rp.PermissionNumber }) + .ToList(); + + var permNumbers = rolePermList + .Select(x => x.PermissionNumber) + .Where(x => !x.IsNullOrEmpty()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + // 3) 权限详情(Permission) + var permInfo = new Dictionary(StringComparer.OrdinalIgnoreCase); + if (permNumbers.Count > 0) + { + var info = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && permNumbers.Contains(p.PermissionNumber)) + .Select(p => new { p.PermissionNumber, p.PermissionName, p.MenuKey }) + .ToList(); + + foreach (var p in info) + { + permInfo[p.PermissionNumber] = (p.PermissionName, p.MenuKey ?? string.Empty); + } + } + + // 4) 组装输出 + var resultItems = rolePermList.Select(x => + { + permInfo.TryGetValue(x.PermissionNumber, out var meta); + return new UserRolePermissionOutputDto + { + RoleNumber = x.RoleNumber, + PermissionNumber = x.PermissionNumber, + PermissionName = meta.Name, + MenuKey = meta.MenuKey + }; + }).ToList(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData + { + Items = resultItems, + TotalCount = resultItems.Count + } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData + { + Items = new List(), + TotalCount = 0 + } + }; + } + } + + /// filename OR language.declaration() + /// EmployeePermissionService.AssignUserPermissions():1 + public BaseResponse AssignUserPermissions(AssignUserPermissionsInputDto input) + { + if (input == null || input.UserNumber.IsNullOrEmpty()) + { + return new BaseResponse(BusinessStatusCode.BadRequest, LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码")); + } + + try + { + // 校验员工是否存在且未删除 + var userExists = employeeRepository.IsAny(e => e.EmployeeId == input.UserNumber && e.IsDelete != 1); + if (!userExists) + { + return new BaseResponse(BusinessStatusCode.NotFound, LocalizationHelper.GetLocalizedString("User not found", "用户不存在")); + } + + var userRoleNumber = $"R-USER-{input.UserNumber}"; + + // 确保专属角色存在 + var existsRole = roleRepository.IsAny(r => r.RoleNumber == userRoleNumber && r.IsDelete != 1); + if (!existsRole) + { + var role = new Role + { + RoleNumber = userRoleNumber, + RoleName = $"用户{input.UserNumber}直接权限", + RoleDescription = $"用户{input.UserNumber}直接权限", + IsDelete = 0 + }; + roleRepository.Insert(role); + } + + // 软删除当前专属角色下所有有效的角色-权限绑定 + var existing = rolePermissionRepository.AsQueryable() + .Where(x => x.RoleNumber == userRoleNumber && x.IsDelete != 1) + .Select(x => new RolePermission { RoleNumber = x.RoleNumber, PermissionNumber = x.PermissionNumber, IsDelete = 1 }) + .ToList(); + + foreach (var rp in existing) + { + rolePermissionRepository.SoftDelete(rp); + } + + // 过滤、去重、忽略空白 + var perms = (input.PermissionNumbers ?? new List()) + .Where(p => !p.IsNullOrEmpty()) + .Select(p => p.Trim()) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + + if (perms.Count > 0) + { + // 仅保留系统中存在的权限码 + var validPerms = permissionRepository.AsQueryable() + .Where(p => p.IsDelete != 1 && perms.Contains(p.PermissionNumber)) + .Select(p => p.PermissionNumber) + .ToList(); + + foreach (var pnum in validPerms) + { + var entity = new RolePermission + { + RoleNumber = userRoleNumber, + PermissionNumber = pnum, + IsDelete = 0 + }; + rolePermissionRepository.Insert(entity); + } + } + + // 确保用户与专属角色绑定存在 + var hasBinding = userRoleRepository.IsAny(ur => ur.UserNumber == input.UserNumber && ur.RoleNumber == userRoleNumber && ur.IsDelete != 1); + if (!hasBinding) + { + userRoleRepository.Insert(new UserRole + { + UserNumber = input.UserNumber, + RoleNumber = userRoleNumber, + IsDelete = 0 + }); + } + + return new BaseResponse(BusinessStatusCode.Success, LocalizationHelper.GetLocalizedString("Assign direct permissions success", "分配直接权限成功")); + } + catch (Exception ex) + { + return new BaseResponse(BusinessStatusCode.InternalServerError, LocalizationHelper.GetLocalizedString($"Assign direct permissions failed: {ex.Message}", $"分配直接权限失败:{ex.Message}")); + } + } + + /// filename OR language.declaration() + /// EmployeePermissionService.ReadUserDirectPermissions():1 + public ListOutputDto ReadUserDirectPermissions(string userNumber) + { + if (userNumber.IsNullOrEmpty()) + { + return new ListOutputDto + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString("UserNumber is required", "缺少用户编码"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + + try + { + var roleNumber = $"R-USER-{userNumber}"; + var list = rolePermissionRepository.AsQueryable() + .Where(rp => rp.RoleNumber == roleNumber && rp.IsDelete != 1) + .Select(rp => rp.PermissionNumber) + .ToList(); + + list = list?.Where(x => !x.IsNullOrEmpty())?.Distinct(StringComparer.OrdinalIgnoreCase)?.ToList() ?? new List(); + + return new ListOutputDto + { + Code = BusinessStatusCode.Success, + Message = LocalizationHelper.GetLocalizedString("Query success", "查询成功"), + Data = new PagedData { Items = list, TotalCount = list.Count } + }; + } + catch (Exception ex) + { + return new ListOutputDto + { + Code = BusinessStatusCode.InternalServerError, + Message = LocalizationHelper.GetLocalizedString($"Query failed: {ex.Message}", $"查询失败:{ex.Message}"), + Data = new PagedData { Items = new List(), TotalCount = 0 } + }; + } + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Employee/Permission/IEmployeePermissionService.cs b/EOM.TSHotelManagement.Application/Employee/Permission/IEmployeePermissionService.cs new file mode 100644 index 0000000..185b319 --- /dev/null +++ b/EOM.TSHotelManagement.Application/Employee/Permission/IEmployeePermissionService.cs @@ -0,0 +1,44 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Application +{ + /// filename OR language.declaration() + /// EmployeePermissionService.cs:1 + /// + /// 员工组权限分配服务(与管理员一致的 5 个接口逻辑,校验目标用户为 Employee.EmployeeId) + /// + public interface IEmployeePermissionService + { + /// filename OR language.declaration() + /// IEmployeePermissionService.AssignUserRoles():1 + /// 为员工分配角色(全量覆盖) + BaseResponse AssignUserRoles(AssignUserRolesInputDto input); + + /// filename OR language.declaration() + /// IEmployeePermissionService.ReadUserRoles():1 + /// 读取员工已分配的角色编码集合 + ListOutputDto ReadUserRoles(string userNumber); + + /// filename OR language.declaration() + /// IEmployeePermissionService.ReadUserRolePermissions():1 + /// 读取员工“角色-权限”明细 + ListOutputDto ReadUserRolePermissions(string userNumber); + + /// filename OR language.declaration() + /// IEmployeePermissionService.AssignUserPermissions():1 + /// 为员工分配“直接权限”(R-USER-{UserNumber} 全量覆盖) + BaseResponse AssignUserPermissions(AssignUserPermissionsInputDto input); + + /// filename OR language.declaration() + /// IEmployeePermissionService.ReadUserDirectPermissions():1 + /// 读取员工“直接权限”权限编码集合(来自 R-USER-{UserNumber}) + ListOutputDto ReadUserDirectPermissions(string userNumber); + } + +} diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index dca2c63..21005a5 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -2,6 +2,7 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Shared; using jvncorelib.EntityLib; using SqlSugar; @@ -92,7 +93,7 @@ namespace EOM.TSHotelManagement.Application { if (readOperationLogInputDto.LogLevel.HasValue) { - where = where.And(a => a.LogLevel == (LogLevel)readOperationLogInputDto.LogLevel.Value); + where = where.And(a => a.LogLevel == readOperationLogInputDto.LogLevel.Value); } } @@ -109,7 +110,7 @@ namespace EOM.TSHotelManagement.Application operationLogs.ForEach(source => { - source.LogLevelName = source.LogLevel == LogLevel.Normal ? LocalizationHelper.GetLocalizedString("INFO", "常规操作") : source.LogLevel == LogLevel.Warning ? LocalizationHelper.GetLocalizedString("WARNING", "敏感操作") : LocalizationHelper.GetLocalizedString("ERROR", "严重操作"); + source.LogLevelName = source.LogLevel == (int)LogLevel.Normal ? LocalizationHelper.GetLocalizedString("INFO", "常规操作") : source.LogLevel == (int)LogLevel.Warning ? LocalizationHelper.GetLocalizedString("WARNING", "敏感操作") : LocalizationHelper.GetLocalizedString("ERROR", "严重操作"); }); var result = EntityMapper.MapList(operationLogs); diff --git a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj index 52e1575..aa1b0b8 100644 --- a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj +++ b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj @@ -14,7 +14,8 @@ - + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs index b91870d..7dbfff4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs @@ -5,14 +5,14 @@ namespace EOM.TSHotelManagement.Common.Contract public string EmployeeId { get; set; } public string EmployeeName { get; set; } public string Gender { get; set; } - public DateOnly DateOfBirth { get; set; } + public DateOnly? DateOfBirth { get; set; } public string Ethnicity { get; set; } public string PhoneNumber { get; set; } public string Department { get; set; } public string Address { get; set; } public string Position { get; set; } public string IdCardNumber { get; set; } - public DateOnly HireDate { get; set; } + public DateOnly? HireDate { get; set; } public string PoliticalAffiliation { get; set; } public string EducationLevel { get; set; } public string EmailAddress { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs index 4d1470c..b9d535f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role +namespace EOM.TSHotelManagement.Common.Contract { /// /// 为用户分配角色(全量覆盖式) diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs index 03becf9..c3c03b0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs @@ -1,4 +1,5 @@ -using EOM.TSHotelManagement.Common.Core; + +using EOM.TSHotelManagement.Shared; namespace EOM.TSHotelManagement.Common.Contract { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index 9a0d9ce..4ffb281 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Shared; namespace EOM.TSHotelManagement.Common.Contract { @@ -8,7 +8,7 @@ namespace EOM.TSHotelManagement.Common.Contract public DateTime OperationTime { get; set; } public string LogContent { get; set; } public string OperationAccount { get; set; } - public LogLevel LogLevel { get; set; } + public int LogLevel { get; set; } public string SoftwareVersion { get; set; } public string LoginIpAddress { get; set; } public string LogLevelName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs index f443e81..a1c3b57 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Shared; namespace EOM.TSHotelManagement.Common.Contract { diff --git a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs index baa8b57..237388e 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs @@ -22,7 +22,7 @@ * *模块说明:资产类 */ -using EOM.TSHotelManagement.Common.Util; + using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core @@ -43,35 +43,35 @@ namespace EOM.TSHotelManagement.Common.Core /// 资产编号 (Asset Number) /// [SqlSugar.SugarColumn(ColumnName = "asset_number", IsNullable = false, IsPrimaryKey = true, Length = 128, ColumnDescription = "资产编号")] - [NeedValid] + public string AssetNumber { get; set; } /// /// 资产名称 (Asset Name) /// [SqlSugar.SugarColumn(ColumnName = "asset_name", IsNullable = false, Length = 200, ColumnDescription = "资产名称")] - [NeedValid] + public string AssetName { get; set; } /// /// 资产总值 (Asset Value) /// [SqlSugar.SugarColumn(ColumnName = "asset_value", IsNullable = false, DecimalDigits = 2, Length = 18, ColumnDescription = "资产名称")] - [NeedValid] + public decimal AssetValue { get; set; } /// /// 资产总值描述 (格式化后的字符串) (Asset Value Description - Formatted) /// [SqlSugar.SugarColumn(IsIgnore = true)] - [NeedValid] + public string AssetValueFormatted { get; set; } /// /// 所属部门代码 (Department Code) /// [SqlSugar.SugarColumn(ColumnName = "department_code", IsNullable = false, Length = 128, ColumnDescription = "所属部门代码 (Department Code)")] - [NeedValid] + public string DepartmentCode { get; set; } /// @@ -84,21 +84,21 @@ namespace EOM.TSHotelManagement.Common.Core /// 入库时间 (购置日期) (Acquisition Date) /// [SqlSugar.SugarColumn(ColumnName = "acquisition_date", IsNullable = false, ColumnDescription = "入库时间 (购置日期) (Acquisition Date)")] - [NeedValid] + public DateOnly AcquisitionDate { get; set; } /// /// 资产来源 (Asset Source) /// [SqlSugar.SugarColumn(ColumnName = "asset_source", IsNullable = false, Length = 500, ColumnDescription = "资产来源 (Asset Source)")] - [NeedValid] + public string AssetSource { get; set; } /// /// 资产经办人 (员工ID) (Acquired By - Employee ID) /// [SqlSugar.SugarColumn(ColumnName = "acquired_by_employee", IsNullable = false, Length = 128, ColumnDescription = "资产经办人 (员工ID) (Acquired By - Employee ID)")] - [NeedValid] + public string AcquiredByEmployeeId { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs index 8ee2e47..8b835fc 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs @@ -22,7 +22,7 @@ * *模块说明:房间类 */ -using EOM.TSHotelManagement.Common.Util; + using SqlSugar; using System; @@ -50,7 +50,7 @@ namespace EOM.TSHotelManagement.Common.Core IsNullable = false, Length = 128 )] - [NeedValid] + public string RoomNumber { get; set; } /// @@ -61,7 +61,7 @@ namespace EOM.TSHotelManagement.Common.Core ColumnDescription = "房间类型ID (关联房间类型表)", IsNullable = false )] - [NeedValid] + public int RoomTypeId { get; set; } /// @@ -109,7 +109,7 @@ namespace EOM.TSHotelManagement.Common.Core ColumnDescription = "房间状态ID (如0-空闲/1-已入住)", IsNullable = false )] - [NeedValid] + public int RoomStateId { get; set; } /// @@ -127,7 +127,7 @@ namespace EOM.TSHotelManagement.Common.Core IsNullable = false, DecimalDigits = 2 )] - [NeedValid] + public decimal RoomRent { get; set; } /// @@ -140,7 +140,7 @@ namespace EOM.TSHotelManagement.Common.Core DecimalDigits = 2, DefaultValue = "0.00" )] - [NeedValid] + public decimal RoomDeposit { get; set; } /// @@ -152,7 +152,7 @@ namespace EOM.TSHotelManagement.Common.Core IsNullable = false, Length = 200 )] - [NeedValid] + public string RoomLocation { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs index b37f79d..da42a3d 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs @@ -22,7 +22,7 @@ * *模块说明:房间类型类 */ -using EOM.TSHotelManagement.Common.Util; + using SqlSugar; namespace EOM.TSHotelManagement.Common.Core @@ -48,7 +48,7 @@ namespace EOM.TSHotelManagement.Common.Core ColumnDescription = "房间类型唯一编号 (Unique Room Type ID)", IsNullable = false )] - [NeedValid] + public int RoomTypeId { get; set; } /// @@ -60,7 +60,7 @@ namespace EOM.TSHotelManagement.Common.Core IsNullable = false, Length = 200 )] - [NeedValid] + public string RoomTypeName { get; set; } /// @@ -73,7 +73,7 @@ namespace EOM.TSHotelManagement.Common.Core IsNullable = false, DecimalDigits = 2 )] - [NeedValid] + public decimal RoomRent { get; set; } /// @@ -87,7 +87,7 @@ namespace EOM.TSHotelManagement.Common.Core DecimalDigits = 2, DefaultValue = "0.00" )] - [NeedValid] + public decimal RoomDeposit { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj b/EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj index 866569c..188131a 100644 --- a/EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj +++ b/EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj @@ -10,8 +10,4 @@ - - - - diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs index 223d680..3f5cf9a 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs @@ -22,7 +22,7 @@ * *模块说明:管理员实体类 */ -using EOM.TSHotelManagement.Common.Util; + using SqlSugar; namespace EOM.TSHotelManagement.Common.Core @@ -42,45 +42,41 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 管理员账号 (Administrator Account) /// - [UIDisplay("管理员账号")] [SugarColumn(ColumnName = "admin_number", IsPrimaryKey = true, IsNullable = false, Length = 128, ColumnDescription = "管理员账号 (Administrator Account)")] - [NeedValid] + public string Number { get; set; } /// /// 管理员账号 (Administrator Account) /// - [UIDisplay("管理员账号")] [SugarColumn(ColumnName = "admin_account", IsNullable = false, Length = 128, ColumnDescription = "管理员名称 (Administrator Name)")] - [NeedValid] + public string Account { get; set; } /// /// 管理员密码 (Administrator Password) /// [SugarColumn(ColumnName = "admin_password", IsNullable = false, Length = 256, ColumnDescription = "管理员密码 (Administrator Password)")] - [NeedValid] + public string Password { get; set; } /// /// 管理员类型 (Administrator Type) /// [SugarColumn(ColumnName = "admin_type", IsNullable = false, Length = 150, ColumnDescription = "管理员类型 (Administrator Type)")] - [NeedValid] + public string Type { get; set; } /// /// 管理员名称 (Administrator Name) /// - [UIDisplay("管理员名称")] [SugarColumn(ColumnName = "admin_name", IsNullable = false, Length = 200, ColumnDescription = "管理员名称 (Administrator Name)")] - [NeedValid] + public string Name { get; set; } /// /// 是否为超级管理员 (Is Super Administrator) /// - [UIDisplay("超级管理员?")] [SugarColumn(ColumnName = "is_admin", IsNullable = false, ColumnDescription = "是否为超级管理员 (Is Super Administrator)")] public int IsSuperAdmin { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs index 33a9ba1..79dd0e3 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs @@ -27,27 +27,6 @@ using System; namespace EOM.TSHotelManagement.Common.Core { - /// - /// 日志等级 (Log Level) - /// - public enum LogLevel - { - /// - /// 普通警告 (Normal Warning) - /// - Normal = 100, - - /// - /// 严重警告 (Serious Warning) - /// - Warning = 200, - - /// - /// 危险警告 (Critical Warning) - /// - Critical = 300 - } - /// /// 操作日志表 (Operation Log) /// @@ -112,7 +91,7 @@ namespace EOM.TSHotelManagement.Common.Core ColumnDescription = "日志等级枚举值 (Log Level Enum)", IsNullable = false )] - public LogLevel LogLevel { get; set; } + public int LogLevel { get; set; } /// /// 软件版本 (Software Version) diff --git a/EOM.TSHotelManagement.Shared/Config/JwtConfig.cs b/EOM.TSHotelManagement.Common.Util/Config/JwtConfig.cs similarity index 73% rename from EOM.TSHotelManagement.Shared/Config/JwtConfig.cs rename to EOM.TSHotelManagement.Common.Util/Config/JwtConfig.cs index a207d1e..e49602c 100644 --- a/EOM.TSHotelManagement.Shared/Config/JwtConfig.cs +++ b/EOM.TSHotelManagement.Common.Util/Config/JwtConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common.Util { public class JwtConfig { diff --git a/EOM.TSHotelManagement.Shared/Config/LskyConfig.cs b/EOM.TSHotelManagement.Common.Util/Config/LskyConfig.cs similarity index 85% rename from EOM.TSHotelManagement.Shared/Config/LskyConfig.cs rename to EOM.TSHotelManagement.Common.Util/Config/LskyConfig.cs index 61ef6be..e2bd352 100644 --- a/EOM.TSHotelManagement.Shared/Config/LskyConfig.cs +++ b/EOM.TSHotelManagement.Common.Util/Config/LskyConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common.Util { public class LskyConfig { diff --git a/EOM.TSHotelManagement.Shared/Config/MailConfig.cs b/EOM.TSHotelManagement.Common.Util/Config/MailConfig.cs similarity index 94% rename from EOM.TSHotelManagement.Shared/Config/MailConfig.cs rename to EOM.TSHotelManagement.Common.Util/Config/MailConfig.cs index aa60aee..1404a74 100644 --- a/EOM.TSHotelManagement.Shared/Config/MailConfig.cs +++ b/EOM.TSHotelManagement.Common.Util/Config/MailConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement +namespace EOM.TSHotelManagement.Common.Util { public class MailConfig { diff --git a/EOM.TSHotelManagement.Shared/Config/Template.cs b/EOM.TSHotelManagement.Common.Util/Config/Template.cs similarity index 72% rename from EOM.TSHotelManagement.Shared/Config/Template.cs rename to EOM.TSHotelManagement.Common.Util/Config/Template.cs index bfae322..a8b7ce8 100644 --- a/EOM.TSHotelManagement.Shared/Config/Template.cs +++ b/EOM.TSHotelManagement.Common.Util/Config/Template.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common.Util { public class Template { diff --git a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj index 04b9e23..89508c0 100644 --- a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj +++ b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj @@ -10,10 +10,8 @@ - - - - + + diff --git a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs b/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs index 8aef43e..9e20cf0 100644 --- a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs +++ b/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs @@ -1,5 +1,4 @@ -using EOM.TSHotelManagement.Shared; -using Microsoft.IdentityModel.Tokens; +using Microsoft.IdentityModel.Tokens; using System; using System.Collections.Generic; using System.IdentityModel.Tokens.Jwt; diff --git a/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs b/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs index 3bfa342..97db35e 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs +++ b/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs @@ -1,5 +1,4 @@ -using EOM.TSHotelManagement.Shared; -using System; +using System; using System.IO; using System.Net.Http; using System.Net.Http.Headers; diff --git a/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs b/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs index 7458df5..9e8d25f 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs +++ b/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs @@ -1,5 +1,4 @@ -using EOM.TSHotelManagement.Shared; -using MailKit.Net.Smtp; +using MailKit.Net.Smtp; using MailKit.Security; using MimeKit; using System; diff --git a/EOM.TSHotelManagement.Shared/Interfaces/IJwtConfigFactory.cs b/EOM.TSHotelManagement.Common.Util/Interfaces/IJwtConfigFactory.cs similarity index 67% rename from EOM.TSHotelManagement.Shared/Interfaces/IJwtConfigFactory.cs rename to EOM.TSHotelManagement.Common.Util/Interfaces/IJwtConfigFactory.cs index 04fa3ea..98f94fa 100644 --- a/EOM.TSHotelManagement.Shared/Interfaces/IJwtConfigFactory.cs +++ b/EOM.TSHotelManagement.Common.Util/Interfaces/IJwtConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common.Util { public interface IJwtConfigFactory { diff --git a/EOM.TSHotelManagement.Shared/Interfaces/ILskyConfigFactory.cs b/EOM.TSHotelManagement.Common.Util/Interfaces/ILskyConfigFactory.cs similarity index 68% rename from EOM.TSHotelManagement.Shared/Interfaces/ILskyConfigFactory.cs rename to EOM.TSHotelManagement.Common.Util/Interfaces/ILskyConfigFactory.cs index 6c8cccb..2380e02 100644 --- a/EOM.TSHotelManagement.Shared/Interfaces/ILskyConfigFactory.cs +++ b/EOM.TSHotelManagement.Common.Util/Interfaces/ILskyConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common.Util { public interface ILskyConfigFactory { diff --git a/EOM.TSHotelManagement.Shared/Interfaces/IMailConfigFactory.cs b/EOM.TSHotelManagement.Common.Util/Interfaces/IMailConfigFactory.cs similarity index 68% rename from EOM.TSHotelManagement.Shared/Interfaces/IMailConfigFactory.cs rename to EOM.TSHotelManagement.Common.Util/Interfaces/IMailConfigFactory.cs index a84c005..4c87042 100644 --- a/EOM.TSHotelManagement.Shared/Interfaces/IMailConfigFactory.cs +++ b/EOM.TSHotelManagement.Common.Util/Interfaces/IMailConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common.Util { public interface IMailConfigFactory { diff --git a/EOM.TSHotelManagement.Common.Util/Templates/EmailTemplate.cs b/EOM.TSHotelManagement.Common.Util/Templates/EmailTemplate.cs index d3fd034..d00053b 100644 --- a/EOM.TSHotelManagement.Common.Util/Templates/EmailTemplate.cs +++ b/EOM.TSHotelManagement.Common.Util/Templates/EmailTemplate.cs @@ -1,5 +1,4 @@ -using EOM.TSHotelManagement.Shared; -using System; +using System; namespace EOM.TSHotelManagement.Common.Util { diff --git a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs b/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs index 2f0260d..bd7a135 100644 --- a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs +++ b/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs @@ -334,6 +334,44 @@ namespace EOM.TSHotelManagement.EntityFramework Console.WriteLine($"Seeded role: {adminRoleNumber} - {adminRoleName}"); } + // 1.1) Ensure default employee and customer groups exist + const string employeeRoleNumber = "R-EMPLOYEE"; + const string employeeRoleName = "员工组"; + const string customerRoleNumber = "R-CUSTOMER"; + const string customerRoleName = "客户组"; + + var employeeRoleExists = db.Queryable() + .Any(r => r.RoleNumber == employeeRoleNumber && r.IsDelete != 1); + if (!employeeRoleExists) + { + db.Insertable(new Role + { + RoleNumber = employeeRoleNumber, + RoleName = employeeRoleName, + RoleDescription = "默认员工组:用于统一分配员工权限", + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = DateTime.Now + }).ExecuteCommand(); + Console.WriteLine($"Seeded role: {employeeRoleNumber} - {employeeRoleName}"); + } + + var customerRoleExists = db.Queryable() + .Any(r => r.RoleNumber == customerRoleNumber && r.IsDelete != 1); + if (!customerRoleExists) + { + db.Insertable(new Role + { + RoleNumber = customerRoleNumber, + RoleName = customerRoleName, + RoleDescription = "默认客户组:用于统一分配客户权限", + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = DateTime.Now + }).ExecuteCommand(); + Console.WriteLine($"Seeded role: {customerRoleNumber} - {customerRoleName}"); + } + // 2) Bind admin user to admin role var adminUser = db.Queryable() .Where(a => a.Account == adminAccount && a.IsDelete != 1) diff --git a/EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj b/EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj index 35ae5c0..6c76840 100644 --- a/EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj +++ b/EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj @@ -15,9 +15,10 @@ + + - diff --git a/EOM.TSHotelManagement.Common.Core/Business/Spend/SpendType.cs b/EOM.TSHotelManagement.Shared/Constant/SpendType.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Core/Business/Spend/SpendType.cs rename to EOM.TSHotelManagement.Shared/Constant/SpendType.cs index f965dec..45d7fbc 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Spend/SpendType.cs +++ b/EOM.TSHotelManagement.Shared/Constant/SpendType.cs @@ -1,6 +1,4 @@ -using EOM.TSHotelManagement.Shared; - -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Shared { public class SpendType : Constant { diff --git a/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj b/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj index bda4122..9d1c41f 100644 --- a/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj +++ b/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj @@ -7,8 +7,4 @@ AnyCPU;x64 - - - - diff --git a/EOM.TSHotelManagement.Shared/Enums/LogLevel.cs b/EOM.TSHotelManagement.Shared/Enums/LogLevel.cs new file mode 100644 index 0000000..45dd182 --- /dev/null +++ b/EOM.TSHotelManagement.Shared/Enums/LogLevel.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Shared +{ + /// + /// 日志等级 (Log Level) + /// + public enum LogLevel + { + /// + /// 普通警告 (Normal Warning) + /// + Normal = 100, + + /// + /// 严重警告 (Serious Warning) + /// + Warning = 200, + + /// + /// 危险警告 (Critical Warning) + /// + Critical = 300 + } + +} diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs b/EOM.TSHotelManagement.Shared/Enums/RoomState.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs rename to EOM.TSHotelManagement.Shared/Enums/RoomState.cs index 91937ff..7df15f7 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs +++ b/EOM.TSHotelManagement.Shared/Enums/RoomState.cs @@ -24,7 +24,7 @@ */ using System.ComponentModel; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Shared { /// /// 房间状态 (Room State) diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs new file mode 100644 index 0000000..c5fd3b5 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs @@ -0,0 +1,89 @@ +using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace EOM.TSHotelManagement.WebApi.Controllers +{ + /// filename OR language.declaration() + /// CustomerController.CustomerController():1 + /// + /// 客户组权限分配接口(与管理员一致的 5 个接口) + /// 前端将调用: + /// - POST /Customer/AssignUserRoles + /// - GET /Customer/ReadUserRoles?userNumber=... + /// - GET /Customer/ReadUserRolePermissions?userNumber=... + /// - POST /Customer/AssignUserPermissions + /// - GET /Customer/ReadUserDirectPermissions?userNumber=... + /// + public class CustomerPermissionController : ControllerBase + { + private readonly ICustomerPermissionService customerPermService; + + public CustomerPermissionController(ICustomerPermissionService customerPermService) + { + this.customerPermService = customerPermService; + } + + /// filename OR language.declaration() + /// CustomerController.AssignUserRoles():1 + /// + /// 为客户分配角色(全量覆盖) + /// + [RequirePermission("system:user:assign")] + [HttpPost] + public BaseResponse AssignUserRoles([FromBody] AssignUserRolesInputDto input) + { + return customerPermService.AssignUserRoles(input); + } + + /// filename OR language.declaration() + /// CustomerController.ReadUserRoles():1 + /// + /// 读取客户已分配的角色编码集合 + /// + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserRoles([FromQuery] string userNumber) + { + return customerPermService.ReadUserRoles(userNumber); + } + + /// filename OR language.declaration() + /// CustomerController.ReadUserRolePermissions():1 + /// + /// 读取客户“角色-权限”明细 + /// + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserRolePermissions([FromQuery] string userNumber) + { + return customerPermService.ReadUserRolePermissions(userNumber); + } + + /// filename OR language.declaration() + /// CustomerController.AssignUserPermissions():1 + /// + /// 为客户分配“直接权限”(R-USER-{UserNumber} 全量覆盖) + /// + [RequirePermission("system:user:assign")] + [HttpPost] + public BaseResponse AssignUserPermissions([FromBody] AssignUserPermissionsInputDto input) + { + return customerPermService.AssignUserPermissions(input); + } + + /// filename OR language.declaration() + /// CustomerController.ReadUserDirectPermissions():1 + /// + /// 读取客户“直接权限”权限编码集合(来自 R-USER-{UserNumber}) + /// + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserDirectPermissions([FromQuery] string userNumber) + { + return customerPermService.ReadUserDirectPermissions(userNumber); + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs new file mode 100644 index 0000000..004bf88 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs @@ -0,0 +1,90 @@ +using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace EOM.TSHotelManagement.WebApi.Controllers +{ + /// filename OR language.declaration() + /// EmployeeController.EmployeeController():1 + /// + /// 员工组权限分配接口(与管理员一致的 5 个接口) + /// 前端将调用: + /// - POST /Employee/AssignUserRoles + /// - GET /Employee/ReadUserRoles?userNumber=... + /// - GET /Employee/ReadUserRolePermissions?userNumber=... + /// - POST /Employee/AssignUserPermissions + /// - GET /Employee/ReadUserDirectPermissions?userNumber=... + /// + public class EmployeePermissionController : ControllerBase + { + private readonly IEmployeePermissionService employeePermService; + + public EmployeePermissionController(IEmployeePermissionService employeePermService) + { + this.employeePermService = employeePermService; + } + + /// filename OR language.declaration() + /// EmployeeController.AssignUserRoles():1 + /// + /// 为员工分配角色(全量覆盖) + /// + [RequirePermission("system:user:assign")] + [HttpPost] + public BaseResponse AssignUserRoles([FromBody] AssignUserRolesInputDto input) + { + return employeePermService.AssignUserRoles(input); + } + + /// filename OR language.declaration() + /// EmployeeController.ReadUserRoles():1 + /// + /// 读取员工已分配的角色编码集合 + /// + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserRoles([FromQuery] string userNumber) + { + return employeePermService.ReadUserRoles(userNumber); + } + + /// filename OR language.declaration() + /// EmployeeController.ReadUserRolePermissions():1 + /// + /// 读取员工“角色-权限”明细 + /// + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserRolePermissions([FromQuery] string userNumber) + { + return employeePermService.ReadUserRolePermissions(userNumber); + } + + /// filename OR language.declaration() + /// EmployeeController.AssignUserPermissions():1 + /// + /// 为员工分配“直接权限”(R-USER-{UserNumber} 全量覆盖) + /// + [RequirePermission("system:user:assign")] + [HttpPost] + public BaseResponse AssignUserPermissions([FromBody] AssignUserPermissionsInputDto input) + { + return employeePermService.AssignUserPermissions(input); + } + + /// filename OR language.declaration() + /// EmployeeController.ReadUserDirectPermissions():1 + /// + /// 读取员工“直接权限”权限编码集合(来自 R-USER-{UserNumber}) + /// + [RequirePermission("system:user:assign.view")] + [HttpGet] + public ListOutputDto ReadUserDirectPermissions([FromQuery] string userNumber) + { + return employeePermService.ReadUserDirectPermissions(userNumber); + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj b/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj index 1117457..ac2088e 100644 --- a/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj +++ b/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj @@ -41,10 +41,7 @@ - - - diff --git a/EOM.TSHotelManagement.WebApi/Extension/DateOnlyJsonConverter.cs b/EOM.TSHotelManagement.WebApi/Extension/DateOnlyJsonConverter.cs index 1dcce1d..26f37a0 100644 --- a/EOM.TSHotelManagement.WebApi/Extension/DateOnlyJsonConverter.cs +++ b/EOM.TSHotelManagement.WebApi/Extension/DateOnlyJsonConverter.cs @@ -13,7 +13,18 @@ namespace EOM.TSHotelManagement.WebApi Type typeToConvert, JsonSerializerOptions options) { - return DateOnly.Parse(reader.GetString()); + if (reader.TokenType == JsonTokenType.Null) + return default; + + var stringValue = reader.GetString(); + + if (string.IsNullOrWhiteSpace(stringValue)) + return default; + + if (DateOnly.TryParse(stringValue, out var result)) + return result; + + return default; } public override void Write( @@ -21,7 +32,14 @@ namespace EOM.TSHotelManagement.WebApi DateOnly value, JsonSerializerOptions options) { - writer.WriteStringValue(value.ToString(DateFormat)); + if (value == default) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(value.ToString(DateFormat)); + } } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Factory/JwtConfigFactory.cs b/EOM.TSHotelManagement.WebApi/Factory/JwtConfigFactory.cs index d8ab921..dd934a8 100644 --- a/EOM.TSHotelManagement.WebApi/Factory/JwtConfigFactory.cs +++ b/EOM.TSHotelManagement.WebApi/Factory/JwtConfigFactory.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common.Util; using Microsoft.Extensions.Configuration; namespace EOM.TSHotelManagement.WebApi diff --git a/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs b/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs index 794efc5..9039427 100644 --- a/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs +++ b/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common.Util; using Microsoft.Extensions.Configuration; namespace EOM.TSHotelManagement.WebApi diff --git a/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs b/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs index 74fd220..a652d37 100644 --- a/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs +++ b/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs @@ -1,4 +1,5 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Shared; using Microsoft.Extensions.Configuration; namespace EOM.TSHotelManagement.WebApi diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index b377998..d0aba5f 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -31,6 +31,7 @@ namespace EOM.TSHotelManagement.WebApi private static readonly string[] origins = [ "http://localhost:5173", "http://localhost:5174", + "http://localhost:8080", "https://tshotel.oscode.top" ]; @@ -139,9 +140,14 @@ namespace EOM.TSHotelManagement.WebApi { options.JsonSerializerOptions.PropertyNamingPolicy = null; options.JsonSerializerOptions.DictionaryKeyPolicy = null; + options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull; options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles; options.JsonSerializerOptions.Converters.Add(new DateOnlyJsonConverter()); + }) + .ConfigureApiBehaviorOptions(options => + { + options.SuppressModelStateInvalidFilter = true; }); // 全局路由配置 -- Gitee From dfbd3a5659c889a5a2dc2b604609df6f89518ab0 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Fri, 3 Oct 2025 20:48:55 +0800 Subject: [PATCH 04/21] add no permission tips. --- .../EntityBuilder.cs | 2 +- ...tomAuthorizationMiddlewareResultHandler.cs | 38 +++++++++++++++++++ .../Application/NavBar/NavBarController.cs | 1 + EOM.TSHotelManagement.WebApi/Startup.cs | 3 ++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 EOM.TSHotelManagement.WebApi/Authorization/CustomAuthorizationMiddlewareResultHandler.cs diff --git a/EOM.TSHotelManagement.Migration/EntityBuilder.cs b/EOM.TSHotelManagement.Migration/EntityBuilder.cs index 6dfa293..327cc83 100644 --- a/EOM.TSHotelManagement.Migration/EntityBuilder.cs +++ b/EOM.TSHotelManagement.Migration/EntityBuilder.cs @@ -738,7 +738,7 @@ namespace EOM.TSHotelManagement.Migration new Permission { PermissionNumber = "requestlog.view", PermissionName = "请求日志-查看", Module = "operation", Description = "请求日志-查看", MenuKey = "requestlog", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, new Permission { PermissionNumber = "requestlog.delete", PermissionName = "请求日志-删除", Module = "operation", Description = "请求日志-删除", MenuKey = "requestlog", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, - + // System management (系统管理) new Permission { PermissionNumber = "administratormanagement.view", PermissionName = "管理员-查看", Module = "system", Description = "管理员管理-查看", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, new Permission { PermissionNumber = "administratormanagement.create", PermissionName = "管理员-新增", Module = "system", Description = "管理员管理-新增", MenuKey = "administratormanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, diff --git a/EOM.TSHotelManagement.WebApi/Authorization/CustomAuthorizationMiddlewareResultHandler.cs b/EOM.TSHotelManagement.WebApi/Authorization/CustomAuthorizationMiddlewareResultHandler.cs new file mode 100644 index 0000000..800f67b --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Authorization/CustomAuthorizationMiddlewareResultHandler.cs @@ -0,0 +1,38 @@ +namespace EOM.TSHotelManagement.WebApi.Authorization +{ + using Microsoft.AspNetCore.Authorization; + using Microsoft.AspNetCore.Authorization.Policy; + using Microsoft.AspNetCore.Http; + using System.Text.Json; + using System.Threading.Tasks; + using EOM.TSHotelManagement.Common.Contract; + using EOM.TSHotelManagement.Common.Util; + + public class CustomAuthorizationMiddlewareResultHandler : IAuthorizationMiddlewareResultHandler + { + private readonly AuthorizationMiddlewareResultHandler _defaultHandler = new AuthorizationMiddlewareResultHandler(); + + public async Task HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult) + { + if (authorizeResult.Challenged || authorizeResult.Forbidden) + { + var response = new BaseResponse(BusinessStatusCode.Unauthorized, + LocalizationHelper.GetLocalizedString("PermissionDenied", "该账户缺少权限,请联系管理员添加")); + + context.Response.StatusCode = StatusCodes.Status200OK; + context.Response.ContentType = "application/json; charset=utf-8"; + + var json = JsonSerializer.Serialize(response, new JsonSerializerOptions + { + PropertyNamingPolicy = null, + DictionaryKeyPolicy = null + }); + + await context.Response.WriteAsync(json); + return; + } + + await _defaultHandler.HandleAsync(next, context, policy, authorizeResult); + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs index 4cfb9a9..dcbc158 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index d0aba5f..28617e6 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -6,6 +6,7 @@ using EOM.TSHotelManagement.WebApi.Authorization; using EOM.TSHotelManagement.WebApi.Filters; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authorization.Policy; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Hosting; @@ -127,6 +128,8 @@ namespace EOM.TSHotelManagement.WebApi // RBAC: 注册基于权限码的动态策略提供者与处理器 services.AddSingleton(); services.AddScoped(); + // 全局自定义授权结果处理器:无权限时返回业务码1401与友好提示 + services.AddSingleton(); } private void ConfigureControllers(IServiceCollection services) -- Gitee From 29f534d6b98aa0ae193814603417fd3d90bf45a4 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 4 Oct 2025 15:41:50 +0800 Subject: [PATCH 05/21] add navbar permission control. --- EOM.TSHotelManagement.Migration/EntityBuilder.cs | 6 ++++++ .../Controllers/Application/NavBar/NavBarController.cs | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/EOM.TSHotelManagement.Migration/EntityBuilder.cs b/EOM.TSHotelManagement.Migration/EntityBuilder.cs index 327cc83..d086cec 100644 --- a/EOM.TSHotelManagement.Migration/EntityBuilder.cs +++ b/EOM.TSHotelManagement.Migration/EntityBuilder.cs @@ -669,6 +669,12 @@ namespace EOM.TSHotelManagement.Migration new Permission { PermissionNumber = "internalfinance.update", PermissionName = "内部资产-编辑", Module = "finance", Description = "内部资产管理-编辑", MenuKey = "internalfinance", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, new Permission { PermissionNumber = "internalfinance.delete", PermissionName = "内部资产-删除", Module = "finance", Description = "内部资产管理-删除", MenuKey = "internalfinance", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + // Nav Bar (导航栏管理) + new Permission { PermissionNumber = "navbar.view", PermissionName = "导航栏-查看", Module = "client", Description = "导航栏管理-查看", MenuKey = "navbar", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "navbar.create", PermissionName = "导航栏-新增", Module = "client", Description = "导航栏管理-新增", MenuKey = "navbar", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "navbar.update", PermissionName = "导航栏-编辑", Module = "client", Description = "导航栏管理-编辑", MenuKey = "navbar", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "navbar.delete", PermissionName = "导航栏-删除", Module = "client", Description = "导航栏管理-删除", MenuKey = "navbar", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + // Hydroelectricity (水电信息管理) new Permission { PermissionNumber = "hydroelectricinformation.view", PermissionName = "水电信息-查看", Module = "hydroelectricity", Description = "水电信息管理-查看", MenuKey = "hydroelectricinformation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, new Permission { PermissionNumber = "hydroelectricinformation.create", PermissionName = "水电信息-新增", Module = "hydroelectricity", Description = "水电信息管理-新增", MenuKey = "hydroelectricinformation", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs index dcbc158..fe763f1 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs @@ -28,6 +28,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 导航控件列表 /// /// + [RequirePermission("navbar.view")] [HttpGet] public ListOutputDto NavBarList() { @@ -38,6 +39,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("navbar.create")] [HttpPost] public BaseResponse AddNavBar([FromBody] CreateNavBarInputDto input) { @@ -48,6 +50,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("navbar.update")] [HttpPost] public BaseResponse UpdateNavBar([FromBody] UpdateNavBarInputDto input) { @@ -58,6 +61,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// + [RequirePermission("navbar.delete")] [HttpPost] public BaseResponse DeleteNavBar([FromBody] DeleteNavBarInputDto input) { -- Gitee From 6dca09f831f59fdd988bd09c77885c9d3f1dc04b Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 11 Oct 2025 19:09:26 +0800 Subject: [PATCH 06/21] fix request log. --- .../Filters/RequestLoggingMiddleware.cs | 55 ++++++++++++------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/EOM.TSHotelManagement.WebApi/Filters/RequestLoggingMiddleware.cs b/EOM.TSHotelManagement.WebApi/Filters/RequestLoggingMiddleware.cs index 8c2b7ac..0e67d64 100644 --- a/EOM.TSHotelManagement.WebApi/Filters/RequestLoggingMiddleware.cs +++ b/EOM.TSHotelManagement.WebApi/Filters/RequestLoggingMiddleware.cs @@ -68,30 +68,28 @@ public class RequestLoggingMiddleware try { - using (var responseBodyStream = new MemoryStream()) - { - context.Response.Body = responseBodyStream; + using var responseBodyStream = new MemoryStream(); + context.Response.Body = responseBodyStream; - await _next(context); + await _next(context); - log.ElapsedMilliseconds = GetElapsedMilliseconds(startTime, Stopwatch.GetTimestamp()); + log.ElapsedMilliseconds = GetElapsedMilliseconds(startTime, Stopwatch.GetTimestamp()); - responseBodyStream.Seek(0, SeekOrigin.Begin); - responseContent = await new StreamReader(responseBodyStream).ReadToEndAsync(); - responseSize = Encoding.UTF8.GetByteCount(responseContent); + responseBodyStream.Seek(0, SeekOrigin.Begin); + responseContent = await new StreamReader(responseBodyStream).ReadToEndAsync(); + responseSize = Encoding.UTF8.GetByteCount(responseContent); - log.StatusCode = context.Response.StatusCode; - log.ResponseSize = responseSize; + log.StatusCode = context.Response.StatusCode; + log.ResponseSize = responseSize; - if (context.Response.StatusCode < 200 || context.Response.StatusCode >= 300) - { - log.Exception = responseContent.Length > 2000 ? - responseContent.Substring(0, 2000) : responseContent; - } - - responseBodyStream.Seek(0, SeekOrigin.Begin); - await responseBodyStream.CopyToAsync(originalBodyStream); + if (context.Response.StatusCode < 200 || context.Response.StatusCode >= 300) + { + log.Exception = responseContent.Length > 2000 ? + responseContent.Substring(0, 2000) : responseContent; } + + responseBodyStream.Seek(0, SeekOrigin.Begin); + await responseBodyStream.CopyToAsync(originalBodyStream); } catch (Exception ex) { @@ -100,6 +98,8 @@ public class RequestLoggingMiddleware log.StatusCode = StatusCodes.Status500InternalServerError; context.Response.StatusCode = log.StatusCode; + context.Response.Body = originalBodyStream; + await HandleExceptionAsync(context, ex); } finally @@ -124,9 +124,22 @@ public class RequestLoggingMiddleware private async Task HandleExceptionAsync(HttpContext context, Exception exception) { - context.Response.ContentType = "application/json"; - var errorResponse = new { error = exception.Message }; - await context.Response.WriteAsync(JsonSerializer.Serialize(errorResponse)); + if (context.Response.HasStarted || !context.Response.Body.CanWrite) + { + _logger.LogError("无法写入错误响应:响应已开始或流不可写"); + return; + } + + try + { + context.Response.ContentType = "application/json"; + var errorResponse = new { error = exception.Message }; + await context.Response.WriteAsync(JsonSerializer.Serialize(errorResponse)); + } + catch (Exception ex) + { + _logger.LogError(ex, "处理异常时发生错误"); + } } private static long GetElapsedMilliseconds(long start, long stop) -- Gitee From bae32cb47c855c4116e778a8229dbb704e582b0f Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Thu, 16 Oct 2025 07:17:47 +0000 Subject: [PATCH 07/21] add CSRF Module Signed-off-by: ck_yeun9 --- EOM.TSHotelManagement.WebApi/Startup.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index 28617e6..d03a797 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -125,6 +125,10 @@ namespace EOM.TSHotelManagement.WebApi options.DefaultPolicy = options.GetPolicy("ApiAccess"); }); + services.AddAntiforgery(options => { + options.HeaderName = "X-CSRF-TOKEN-HEADER"; + }); + // RBAC: 注册基于权限码的动态策略提供者与处理器 services.AddSingleton(); services.AddScoped(); @@ -192,15 +196,19 @@ namespace EOM.TSHotelManagement.WebApi { try { - app.ApplicationServices.GetService()?.InitializeDatabase(); + using (var scope = app.ApplicationServices.CreateScope()) + { + var initializer = scope.ServiceProvider.GetService(); + initializer?.InitializeDatabase(); + } } catch (Exception ex) { var message = LocalizationHelper.GetLocalizedString( $"Database initialization failed: {ex.Message}. Please manually initialize or fix the error.", $"数据库初始化失败:{ex.Message},请手动初始化或修复错误。"); - Console.WriteLine(message); - throw new Exception(message); + Console.WriteLine(Message); + throw new Exception(message, ex); } finally { @@ -291,6 +299,7 @@ namespace EOM.TSHotelManagement.WebApi //注入加解密组件 var encryptionService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "jvncorelib.dll")); builder.RegisterAssemblyTypes(encryptionService) + .AsImplementedInterfaces() .PropertiesAutowired(); } catch (Exception ex) -- Gitee From 7efe1f6b53c9884f2f1b209284bbde5138108a2e Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 18 Oct 2025 03:34:44 +0800 Subject: [PATCH 08/21] add csrf module. --- .../Administrator/AdminService.cs | 9 +- .../BaseDto/CsrfTokenDto.cs | 18 ++++ .../Config/CsrfTokenConfig.cs | 27 ++++++ .../Customer/CustomerAccountController.cs | 2 + .../Employee/EmployeeController.cs | 1 + .../Controllers/LoginController.cs | 70 ++++++++++++++++ .../Administrator/AdminController.cs | 1 + .../SystemManagement/Menu/MenuController.cs | 2 + .../Filters/CSRFTokenOperationProcessor.cs | 31 +++++++ .../ValidateAntiForgeryTokenAttribute.cs | 40 +++++++++ .../Middleware/AntiforgeryMiddleware.cs | 84 +++++++++++++++++++ EOM.TSHotelManagement.WebApi/Startup.cs | 51 ++++++++++- 12 files changed, 328 insertions(+), 8 deletions(-) create mode 100644 EOM.TSHotelManagement.Common.Contract/BaseDto/CsrfTokenDto.cs create mode 100644 EOM.TSHotelManagement.WebApi/Config/CsrfTokenConfig.cs create mode 100644 EOM.TSHotelManagement.WebApi/Controllers/LoginController.cs create mode 100644 EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs create mode 100644 EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs create mode 100644 EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index 2bf49e8..cd2be37 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -63,10 +63,11 @@ namespace EOM.TSHotelManagement.Application /// 权限 /// private readonly GenericRepository permissionRepository; -/// -/// 角色 -/// -private readonly GenericRepository roleRepository; + + /// + /// 角色 + /// + private readonly GenericRepository roleRepository; /// /// 数据保护 diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/CsrfTokenDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/CsrfTokenDto.cs new file mode 100644 index 0000000..d1ddfa2 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/CsrfTokenDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CsrfTokenDto + { + /// + /// + /// + public string Token { get; set; } = string.Empty; + public DateTime ExpiresAt { get; set; } + public bool NeedsRefresh { get; set; } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Config/CsrfTokenConfig.cs b/EOM.TSHotelManagement.WebApi/Config/CsrfTokenConfig.cs new file mode 100644 index 0000000..8938252 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Config/CsrfTokenConfig.cs @@ -0,0 +1,27 @@ +using System; + +namespace EOM.TSHotelManagement.WebApi +{ + public class CsrfTokenConfig + { + /// + /// CSRF Token 过期时间(分钟) + /// + public int TokenExpirationInMinutes { get; set; } = 120; + + /// + /// Token 刷新阈值(分钟) + /// + public int TokenRefreshThresholdInMinutes { get; set; } = 30; + + /// + /// Cookie 名称 + /// + public string CookieName { get; set; } = "XSRF-TOKEN"; + + /// + /// Header 名称 + /// + public string HeaderName { get; set; } = "X-XSRF-TOKEN"; + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerAccountController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerAccountController.cs index 2debffc..054445d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerAccountController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerAccountController.cs @@ -21,6 +21,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [AllowAnonymous] [HttpPost] + [IgnoreAntiforgeryToken] public SingleOutputDto Login([FromBody] ReadCustomerAccountInputDto readCustomerAccountInputDto) { return _customerAccountService.Login(readCustomerAccountInputDto); @@ -33,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [AllowAnonymous] [HttpPost] + [IgnoreAntiforgeryToken] public SingleOutputDto Register([FromBody] ReadCustomerAccountInputDto readCustomerAccountInputDto) { return _customerAccountService.Register(readCustomerAccountInputDto); diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs index cb0b512..671d32c 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs @@ -85,6 +85,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] [AllowAnonymous] + [IgnoreAntiforgeryToken] public SingleOutputDto SelectEmployeeInfoByEmployeeIdAndEmployeePwd([FromBody] ReadEmployeeInputDto inputDto) { return workerService.SelectEmployeeInfoByEmployeeIdAndEmployeePwd(inputDto); diff --git a/EOM.TSHotelManagement.WebApi/Controllers/LoginController.cs b/EOM.TSHotelManagement.WebApi/Controllers/LoginController.cs new file mode 100644 index 0000000..751b8b9 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Controllers/LoginController.cs @@ -0,0 +1,70 @@ +using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; +using Microsoft.AspNetCore.Antiforgery; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; +using System; + +namespace EOM.TSHotelManagement.WebApi +{ + public class LoginController : ControllerBase + { + private readonly IAntiforgery _antiforgery; + private readonly CsrfTokenConfig _csrfConfig; + + public LoginController( + IAntiforgery antiforgery, + IOptions csrfConfig) + { + _antiforgery = antiforgery; + _csrfConfig = csrfConfig.Value; + } + + [HttpGet] + [AllowAnonymous] + [IgnoreAntiforgeryToken] + public SingleOutputDto GetCSRFToken() + { + var response = new SingleOutputDto(); + + try + { + var tokens = _antiforgery.GetAndStoreTokens(HttpContext); + var expiresAt = DateTime.Now.AddMinutes(_csrfConfig.TokenExpirationInMinutes); + var needsRefresh = false; + + Response.Cookies.Append(_csrfConfig.CookieName, tokens.RequestToken); + + // 检查是否需要刷新 + var refreshThreshold = expiresAt.AddMinutes(-_csrfConfig.TokenRefreshThresholdInMinutes); + if (DateTime.Now >= refreshThreshold) + { + needsRefresh = true; + } + + response.Data = new CsrfTokenDto + { + Token = tokens.RequestToken ?? string.Empty, + ExpiresAt = expiresAt, + NeedsRefresh = needsRefresh + }; + } + catch (Exception ex) + { + response.Data = null; + } + + return response; + } + + [HttpPost] + [AllowAnonymous] + [IgnoreAntiforgeryToken] + public SingleOutputDto RefreshCSRFToken() + { + return GetCSRFToken(); + } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs index 37e3db0..f3180ab 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs @@ -34,6 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] [AllowAnonymous] + [IgnoreAntiforgeryToken] public SingleOutputDto Login([FromBody] ReadAdministratorInputDto admin) { return adminService.Login(admin); diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs index fb5c89f..ab745cf 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs @@ -2,6 +2,8 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; +using System; +using System.Linq; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs b/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs new file mode 100644 index 0000000..8432bea --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs @@ -0,0 +1,31 @@ +using NSwag; +using NSwag.Generation.Processors; +using NSwag.Generation.Processors.Contexts; +using System; +using System.Collections.Generic; + +namespace EOM.TSHotelManagement.WebApi.Filters +{ + public class CSRFTokenOperationProcessor : IOperationProcessor + { + public bool Process(OperationProcessorContext context) + { + var method = context.OperationDescription.Path; + + // 仅为非 GET 方法添加 CSRF Header + if (method != null && !method.Equals("get", StringComparison.OrdinalIgnoreCase)) + { + context.OperationDescription.Operation.Parameters.Add(new NSwag.OpenApiParameter + { + Name = "X-CSRF-TOKEN-HEADER", + Kind = NSwag.OpenApiParameterKind.Header, + Description = "CSRF Token for state-changing requests", + IsRequired = true, + Schema = new NJsonSchema.JsonSchema { Type = NJsonSchema.JsonObjectType.String } + }); + } + + return true; + } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs b/EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs new file mode 100644 index 0000000..712bd1c --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs @@ -0,0 +1,40 @@ +using Microsoft.AspNetCore.Antiforgery; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.WebApi.Filters +{ + public class ValidateAntiForgeryTokenAttribute : TypeFilterAttribute + { + public ValidateAntiForgeryTokenAttribute() : base(typeof(ValidateAntiForgeryTokenFilter)) + { + } + + private class ValidateAntiForgeryTokenFilter : IAsyncAuthorizationFilter + { + private readonly IAntiforgery _antiforgery; + + public ValidateAntiForgeryTokenFilter(IAntiforgery antiforgery) + { + _antiforgery = antiforgery; + } + + public async Task OnAuthorizationAsync(AuthorizationFilterContext context) + { + try + { + await _antiforgery.ValidateRequestAsync(context.HttpContext); + } + catch + { + context.Result = new BadRequestObjectResult(new + { + Success = false, + Message = "CSRF Token 验证失败或已过期" + }); + } + } + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs b/EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs new file mode 100644 index 0000000..663a205 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs @@ -0,0 +1,84 @@ +using Microsoft.AspNetCore.Antiforgery; +using Microsoft.AspNetCore.Http; +using System; +using System.IO; +using System.Text; +using System.Threading.Tasks; +using System.Diagnostics; +using System.Linq; + +namespace EOM.TSHotelManagement.WebApi.Middleware +{ + public class AntiforgeryMiddleware + { + private readonly RequestDelegate _next; + private readonly IAntiforgery _antiforgery; + + public AntiforgeryMiddleware(RequestDelegate next, IAntiforgery antiforgery) + { + _next = next; + _antiforgery = antiforgery; + } + + public async Task InvokeAsync(HttpContext context) + { + // 对于 POST 请求进行详细的请求信息记录 + if (context.Request.Method == "POST") + { + // 记录请求头信息 + var requestHeaders = string.Join("\n", context.Request.Headers.Select(h => $"{h.Key}: {h.Value}")); + Debug.WriteLine($"Request Headers:\n{requestHeaders}"); + + // 记录请求体 + context.Request.EnableBuffering(); + var requestBody = await new StreamReader(context.Request.Body, Encoding.UTF8).ReadToEndAsync(); + context.Request.Body.Position = 0; // 重置流位置 + Debug.WriteLine($"Request Body:\n{requestBody}"); + + // 检查 CSRF Token + var cookieToken = context.Request.Cookies["XSRF-TOKEN"]; + var headerToken = context.Request.Headers["X-CSRF-TOKEN-HEADER"].ToString(); + Debug.WriteLine($"Cookie Token: {cookieToken}"); + Debug.WriteLine($"Header Token: {headerToken}"); + } + + if (context.Request.Method == "GET" || context.Request.Method == "HEAD" || context.Request.Method == "OPTIONS") + { + var tokens = _antiforgery.GetAndStoreTokens(context); + Debug.WriteLine($"Generated new CSRF token"); + } + + try + { + await _next(context); + } + catch (Exception ex) + { + context.Response.StatusCode = 400; + context.Response.ContentType = "application/json"; + + var errorDetail = new + { + message = ex.Message, + stackTrace = ex.StackTrace, + innerException = ex.InnerException?.Message, + innerStackTrace = ex.InnerException?.StackTrace, + path = context.Request.Path, + method = context.Request.Method, + headers = context.Request.Headers.ToDictionary(h => h.Key, h => h.Value.ToString()) + }; + + Debug.WriteLine($"Error occurred: {ex.Message}"); + Debug.WriteLine($"Stack trace: {ex.StackTrace}"); + + await context.Response.WriteAsJsonAsync(errorDetail); + + // 触发断点 + if (Debugger.IsAttached) + { + Debugger.Break(); + } + } + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index d03a797..dd92285 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -3,26 +3,31 @@ using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using EOM.TSHotelManagement.Shared; using EOM.TSHotelManagement.WebApi.Authorization; +using EOM.TSHotelManagement.WebApi.Extension; using EOM.TSHotelManagement.WebApi.Filters; +using jvncorelib.EncryptorLib; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Policy; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.IdentityModel.Tokens; +using NSwag; using SqlSugar; using System; using System.IO; +using System.Linq; using System.Reflection; +using System.Reflection.Metadata; using System.Text; using System.Text.Json.Serialization; -using EOM.TSHotelManagement.WebApi.Extension; namespace EOM.TSHotelManagement.WebApi { @@ -96,6 +101,9 @@ namespace EOM.TSHotelManagement.WebApi services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); + services.Configure(_configuration.GetSection("CsrfToken")); + services.AddSingleton(); } private void ConfigureAuthentication(IServiceCollection services) @@ -104,6 +112,7 @@ namespace EOM.TSHotelManagement.WebApi { options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; + }).AddJwtBearer("Bearer", options => { options.TokenValidationParameters = new TokenValidationParameters @@ -125,8 +134,14 @@ namespace EOM.TSHotelManagement.WebApi options.DefaultPolicy = options.GetPolicy("ApiAccess"); }); - services.AddAntiforgery(options => { + services.AddAntiforgery(options => + { + options.Cookie.Name = "XSRF-TOKEN"; options.HeaderName = "X-CSRF-TOKEN-HEADER"; + options.Cookie.HttpOnly = false; + options.Cookie.SecurePolicy = CookieSecurePolicy.SameAsRequest; + options.Cookie.SameSite = SameSiteMode.Lax; + options.SuppressXFrameOptionsHeader = false; }); // RBAC: 注册基于权限码的动态策略提供者与处理器 @@ -143,6 +158,8 @@ namespace EOM.TSHotelManagement.WebApi options.Conventions.Add(new AuthorizeAllControllersConvention()); options.RespectBrowserAcceptHeader = true; options.SuppressImplicitRequiredAttributeForNonNullableReferenceTypes = true; + + //options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute()); }).AddJsonOptions(options => { options.JsonSerializerOptions.PropertyNamingPolicy = null; @@ -154,7 +171,18 @@ namespace EOM.TSHotelManagement.WebApi }) .ConfigureApiBehaviorOptions(options => { - options.SuppressModelStateInvalidFilter = true; + options.SuppressModelStateInvalidFilter = false; + options.InvalidModelStateResponseFactory = context => + { + var result = new BadRequestObjectResult(new + { + Message = "验证失败", + Errors = context.ModelState.Values + .SelectMany(v => v.Errors) + .Select(e => e.ErrorMessage) + }); + return result; + }; }); // 全局路由配置 @@ -174,6 +202,16 @@ namespace EOM.TSHotelManagement.WebApi config.Title = "EOM.TSHotelManagement.Web"; config.Version = "v1"; config.DocumentName = "v1"; + + config.OperationProcessors.Add(new CSRFTokenOperationProcessor()); + + config.AddSecurity("JWT", new OpenApiSecurityScheme + { + Type = OpenApiSecuritySchemeType.ApiKey, + In = OpenApiSecurityApiKeyLocation.Header, + Name = "Authorization", + Description = "Type into the textbox: Bearer {your JWT token}." + }); }); } @@ -187,6 +225,10 @@ namespace EOM.TSHotelManagement.WebApi .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials() + .WithExposedHeaders("X-CSRF-TOKEN-HEADER") +#if DEBUG + .SetIsOriginAllowed(_ => true) // 开发环境下允许所有来源 +#endif .SetPreflightMaxAge(TimeSpan.FromMinutes(10)); }); }); @@ -207,7 +249,7 @@ namespace EOM.TSHotelManagement.WebApi var message = LocalizationHelper.GetLocalizedString( $"Database initialization failed: {ex.Message}. Please manually initialize or fix the error.", $"数据库初始化失败:{ex.Message},请手动初始化或修复错误。"); - Console.WriteLine(Message); + Console.WriteLine(ex.Message); throw new Exception(message, ex); } finally @@ -238,6 +280,7 @@ namespace EOM.TSHotelManagement.WebApi app.UseCors("MyCorsPolicy"); app.UseAuthentication(); app.UseAuthorization(); + app.UseAntiforgery(); app.UseRequestLogging(); } -- Gitee From 2bf23193ff1344712e3882c8ecc292eaa757e2ec Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 18 Oct 2025 15:13:33 +0800 Subject: [PATCH 09/21] add csrf module. --- .../Employee/EmployeeService.cs | 7 +- .../Authorization/PermissionsAuthorization.cs | 53 +++++++++++- .../Filters/CSRFTokenOperationProcessor.cs | 14 ++-- .../ValidateAntiForgeryTokenAttribute.cs | 40 --------- .../Middleware/AntiforgeryMiddleware.cs | 84 ------------------- EOM.TSHotelManagement.WebApi/Startup.cs | 23 ++--- EOM.TSHotelManagement.WebApi/appsettings.json | 7 +- 7 files changed, 80 insertions(+), 148 deletions(-) delete mode 100644 EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs delete mode 100644 EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index 601cd33..57bb853 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -404,8 +404,11 @@ namespace EOM.TSHotelManagement.Application var position = positionRepository.GetFirst(a => a.PositionNumber == w.Position); w.PositionName = position.PositionName.IsNullOrEmpty() ? "" : position.PositionName; - w.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new List { new Claim(ClaimTypes.Name, w.EmployeeName), new Claim(ClaimTypes.SerialNumber, w.EmployeeId) })); - + w.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] + { + new Claim(ClaimTypes.Name, w.EmployeeName), + new Claim(ClaimTypes.SerialNumber, w.EmployeeId) + })); return new SingleOutputDto { Data = EntityMapper.Map(w) }; } diff --git a/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs b/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs index 05fbff5..9db315f 100644 --- a/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs +++ b/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs @@ -98,9 +98,18 @@ namespace EOM.TSHotelManagement.WebApi.Authorization { try { - // 从 Claims 中获取用户唯一编号(SerialNumber) - var userNumber = context.User?.FindFirst(ClaimTypes.SerialNumber)?.Value - ?? context.User?.FindFirst("serialnumber")?.Value; + var httpContext = _httpContextAccessor.HttpContext; + var user = httpContext?.User; + + var userNumber = user?.FindFirst(ClaimTypes.SerialNumber)?.Value + ?? user?.FindFirst("serialnumber")?.Value; + + if (string.IsNullOrWhiteSpace(userNumber)) + { + userNumber = GetUserNumberFromAuthorizationHeader(httpContext); + } + + _logger.LogWarning(userNumber); if (string.IsNullOrWhiteSpace(userNumber)) { @@ -153,5 +162,43 @@ namespace EOM.TSHotelManagement.WebApi.Authorization _logger.LogError(ex, "权限校验异常"); } } + + /// + /// 从Authorization头解析用户编号(解决Swagger文档请求问题) + /// + private string GetUserNumberFromAuthorizationHeader(HttpContext httpContext) + { + if (httpContext?.Request?.Headers == null) return null; + + if (httpContext.Request.Headers.TryGetValue("Authorization", out var authHeader)) + { + var token = authHeader.ToString(); + if (string.IsNullOrWhiteSpace(token)) return null; + + // 移除"Bearer "前缀 + if (token.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase)) + { + token = token.Substring(7).Trim(); + } + + // 解析JWT token获取用户编号 + try + { + var handler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler(); + var jwtToken = handler.ReadJwtToken(token); + + return jwtToken.Claims + .FirstOrDefault(c => + c.Type == ClaimTypes.SerialNumber || + c.Type == "serialnumber")?.Value; + } + catch (Exception ex) + { + _logger.LogError(ex, "解析JWT token失败"); + return null; + } + } + return null; + } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs b/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs index 8432bea..7ebbac3 100644 --- a/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs +++ b/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs @@ -2,7 +2,6 @@ using NSwag.Generation.Processors; using NSwag.Generation.Processors.Contexts; using System; -using System.Collections.Generic; namespace EOM.TSHotelManagement.WebApi.Filters { @@ -10,15 +9,16 @@ namespace EOM.TSHotelManagement.WebApi.Filters { public bool Process(OperationProcessorContext context) { - var method = context.OperationDescription.Path; + var method = context.OperationDescription.Method?.ToLower(); + var path = context.OperationDescription.Path?.ToLower(); - // 仅为非 GET 方法添加 CSRF Header - if (method != null && !method.Equals("get", StringComparison.OrdinalIgnoreCase)) + if (method != "get" && + !(path?.Contains("csrf") ?? false)) { - context.OperationDescription.Operation.Parameters.Add(new NSwag.OpenApiParameter + context.OperationDescription.Operation.Parameters.Add(new OpenApiParameter { Name = "X-CSRF-TOKEN-HEADER", - Kind = NSwag.OpenApiParameterKind.Header, + Kind = OpenApiParameterKind.Header, Description = "CSRF Token for state-changing requests", IsRequired = true, Schema = new NJsonSchema.JsonSchema { Type = NJsonSchema.JsonObjectType.String } @@ -28,4 +28,4 @@ namespace EOM.TSHotelManagement.WebApi.Filters return true; } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs b/EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs deleted file mode 100644 index 712bd1c..0000000 --- a/EOM.TSHotelManagement.WebApi/Filters/ValidateAntiForgeryTokenAttribute.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.AspNetCore.Antiforgery; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Filters; -using System.Threading.Tasks; - -namespace EOM.TSHotelManagement.WebApi.Filters -{ - public class ValidateAntiForgeryTokenAttribute : TypeFilterAttribute - { - public ValidateAntiForgeryTokenAttribute() : base(typeof(ValidateAntiForgeryTokenFilter)) - { - } - - private class ValidateAntiForgeryTokenFilter : IAsyncAuthorizationFilter - { - private readonly IAntiforgery _antiforgery; - - public ValidateAntiForgeryTokenFilter(IAntiforgery antiforgery) - { - _antiforgery = antiforgery; - } - - public async Task OnAuthorizationAsync(AuthorizationFilterContext context) - { - try - { - await _antiforgery.ValidateRequestAsync(context.HttpContext); - } - catch - { - context.Result = new BadRequestObjectResult(new - { - Success = false, - Message = "CSRF Token 验证失败或已过期" - }); - } - } - } - } -} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs b/EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs deleted file mode 100644 index 663a205..0000000 --- a/EOM.TSHotelManagement.WebApi/Middleware/AntiforgeryMiddleware.cs +++ /dev/null @@ -1,84 +0,0 @@ -using Microsoft.AspNetCore.Antiforgery; -using Microsoft.AspNetCore.Http; -using System; -using System.IO; -using System.Text; -using System.Threading.Tasks; -using System.Diagnostics; -using System.Linq; - -namespace EOM.TSHotelManagement.WebApi.Middleware -{ - public class AntiforgeryMiddleware - { - private readonly RequestDelegate _next; - private readonly IAntiforgery _antiforgery; - - public AntiforgeryMiddleware(RequestDelegate next, IAntiforgery antiforgery) - { - _next = next; - _antiforgery = antiforgery; - } - - public async Task InvokeAsync(HttpContext context) - { - // 对于 POST 请求进行详细的请求信息记录 - if (context.Request.Method == "POST") - { - // 记录请求头信息 - var requestHeaders = string.Join("\n", context.Request.Headers.Select(h => $"{h.Key}: {h.Value}")); - Debug.WriteLine($"Request Headers:\n{requestHeaders}"); - - // 记录请求体 - context.Request.EnableBuffering(); - var requestBody = await new StreamReader(context.Request.Body, Encoding.UTF8).ReadToEndAsync(); - context.Request.Body.Position = 0; // 重置流位置 - Debug.WriteLine($"Request Body:\n{requestBody}"); - - // 检查 CSRF Token - var cookieToken = context.Request.Cookies["XSRF-TOKEN"]; - var headerToken = context.Request.Headers["X-CSRF-TOKEN-HEADER"].ToString(); - Debug.WriteLine($"Cookie Token: {cookieToken}"); - Debug.WriteLine($"Header Token: {headerToken}"); - } - - if (context.Request.Method == "GET" || context.Request.Method == "HEAD" || context.Request.Method == "OPTIONS") - { - var tokens = _antiforgery.GetAndStoreTokens(context); - Debug.WriteLine($"Generated new CSRF token"); - } - - try - { - await _next(context); - } - catch (Exception ex) - { - context.Response.StatusCode = 400; - context.Response.ContentType = "application/json"; - - var errorDetail = new - { - message = ex.Message, - stackTrace = ex.StackTrace, - innerException = ex.InnerException?.Message, - innerStackTrace = ex.InnerException?.StackTrace, - path = context.Request.Path, - method = context.Request.Method, - headers = context.Request.Headers.ToDictionary(h => h.Key, h => h.Value.ToString()) - }; - - Debug.WriteLine($"Error occurred: {ex.Message}"); - Debug.WriteLine($"Stack trace: {ex.StackTrace}"); - - await context.Response.WriteAsJsonAsync(errorDetail); - - // 触发断点 - if (Debugger.IsAttached) - { - Debugger.Break(); - } - } - } - } -} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index dd92285..9dc4cee 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -6,6 +6,8 @@ using EOM.TSHotelManagement.WebApi.Authorization; using EOM.TSHotelManagement.WebApi.Extension; using EOM.TSHotelManagement.WebApi.Filters; using jvncorelib.EncryptorLib; +using jvncorelib.CodeLib; +using jvncorelib.EntityLib; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Policy; @@ -20,6 +22,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.IdentityModel.Tokens; using NSwag; +using NSwag.Generation.Processors.Security; using SqlSugar; using System; using System.IO; @@ -34,12 +37,6 @@ namespace EOM.TSHotelManagement.WebApi public class Startup { private readonly IConfiguration _configuration; - private static readonly string[] origins = [ - "http://localhost:5173", - "http://localhost:5174", - "http://localhost:8080", - "https://tshotel.oscode.top" - ]; public Startup(IConfiguration configuration) { @@ -104,6 +101,7 @@ namespace EOM.TSHotelManagement.WebApi services.AddSingleton(); services.Configure(_configuration.GetSection("CsrfToken")); services.AddSingleton(); + services.AddSingleton(); } private void ConfigureAuthentication(IServiceCollection services) @@ -158,8 +156,6 @@ namespace EOM.TSHotelManagement.WebApi options.Conventions.Add(new AuthorizeAllControllersConvention()); options.RespectBrowserAcceptHeader = true; options.SuppressImplicitRequiredAttributeForNonNullableReferenceTypes = true; - - //options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute()); }).AddJsonOptions(options => { options.JsonSerializerOptions.PropertyNamingPolicy = null; @@ -207,21 +203,26 @@ namespace EOM.TSHotelManagement.WebApi config.AddSecurity("JWT", new OpenApiSecurityScheme { - Type = OpenApiSecuritySchemeType.ApiKey, + Type = OpenApiSecuritySchemeType.Http, In = OpenApiSecurityApiKeyLocation.Header, Name = "Authorization", - Description = "Type into the textbox: Bearer {your JWT token}." + Description = "Type into the textbox: your JWT token", + Scheme = "bearer", + BearerFormat = "JWT" }); + + config.OperationProcessors.Add(new AspNetCoreOperationSecurityScopeProcessor("JWT")); }); } private void ConfigureCors(IServiceCollection services) { + var allowedOrigins = _configuration.GetSection("AllowedOrigins").Get() ?? Array.Empty(); services.AddCors(options => { options.AddPolicy("MyCorsPolicy", policy => { - policy.WithOrigins(origins) + policy.WithOrigins(allowedOrigins) .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials() diff --git a/EOM.TSHotelManagement.WebApi/appsettings.json b/EOM.TSHotelManagement.WebApi/appsettings.json index f334974..9f4cd0e 100644 --- a/EOM.TSHotelManagement.WebApi/appsettings.json +++ b/EOM.TSHotelManagement.WebApi/appsettings.json @@ -14,6 +14,12 @@ "SqlServerConnectStr": "Server=my_sqlserver_host;Database=tshoteldb;User Id=my_sqlserver_user;Password=my_sqlserver_password;", "OracleConnectStr": "User Id=my_oracle_user;Password=my_oracle_password;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=my_oracle_host)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=my_oracle_service_name)));" }, + "AllowedOrigins": [ + "http://localhost:5173", + "http://localhost:5174", + "http://localhost:8080", + "https://tshotel.oscode.top" + ], "AllowedHosts": "*", "Jwt": { "Key": "", @@ -28,7 +34,6 @@ "DisplayName": "" }, "SoftwareVersion": "1.0.0", - //Lsky图床配置 "Lsky": { "BaseAddress": "", "Email": "", -- Gitee From b74eb36286ac5984c76b424ea1f3f3f167fa5084 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 1 Nov 2025 00:49:04 +0800 Subject: [PATCH 10/21] format code. --- .../Employee/EmployeeService.cs | 16 +++++++++++----- .../SystemManagement/Base/BaseService.cs | 15 +++++++++++++++ .../Dto/Department/ReadDepartmentInputDto.cs | 2 ++ .../Helper/DataProtectionHelper.cs | 18 ++++++++++++++++++ .../EntityBuilder.cs | 2 ++ .../Authorization/PermissionsAuthorization.cs | 2 -- .../Controllers/Employee/EmployeeController.cs | 4 ++-- 7 files changed, 50 insertions(+), 9 deletions(-) diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index 57bb853..4837a1b 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -378,14 +378,20 @@ namespace EOM.TSHotelManagement.Application w = null; return new SingleOutputDto { Data = null, Message = LocalizationHelper.GetLocalizedString("Employee does not exist or entered incorrectly", "员工不存在或输入有误") }; } - var dbPwd = string.Empty; + var correctPassword = false; - dbPwd = dataProtector.DecryptEmployeeData(w.Password); + try + { + correctPassword = dataProtector.EncryptLibCompareEmployeeData(w.Password, readEmployeeInputDto.Password); + } + catch (Exception) + { + correctPassword = dataProtector.CompareEmployeeData(w.Password, readEmployeeInputDto.Password); + } - if (dbPwd != readEmployeeInputDto.Password) + if (!correctPassword) { - w = null; - return new SingleOutputDto { Data = EntityMapper.Map(w) }; + return new SingleOutputDto { Data = null, Message = LocalizationHelper.GetLocalizedString("Invalid account or password", "账号或密码错误") }; } w.Password = ""; //性别类型 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs index 56a9f00..63ac208 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs @@ -525,6 +525,21 @@ namespace EOM.TSHotelManagement.Application public ListOutputDto SelectDeptAll(ReadDepartmentInputDto readDepartmentInputDto) { var where = Expressionable.Create(); + + if (!readDepartmentInputDto.DepartmentName.IsNullOrEmpty()) + { + where = where.And(a => a.DepartmentName.Contains(readDepartmentInputDto.DepartmentName)); + } + if (!readDepartmentInputDto.DepartmentLeader.IsNullOrEmpty()) + { + where = where.And(a => a.DepartmentLeader == readDepartmentInputDto.DepartmentLeader); + } + if (!readDepartmentInputDto.DepartmentCreationDateStart.IsNullOrEmpty() && !readDepartmentInputDto.DepartmentCreationDateEnd.IsNullOrEmpty()) + { + var startDate = DateOnly.FromDateTime((DateTime)readDepartmentInputDto.DepartmentCreationDateStart); + var endDate = DateOnly.FromDateTime((DateTime)readDepartmentInputDto.DepartmentCreationDateEnd); + where = where.And(a => a.DepartmentCreationDate >= startDate && a.DepartmentCreationDate <= endDate); + } if (!readDepartmentInputDto.IsDelete.IsNullOrEmpty()) { where = where.And(a => a.IsDelete == readDepartmentInputDto.IsDelete); diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs index 35598d6..578c763 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs @@ -11,6 +11,8 @@ namespace EOM.TSHotelManagement.Common.Contract public string LeaderName { get; set; } public string ParentDepartmentNumber { get; set; } public string ParentDepartmentName { get; set; } + public DateTime? DepartmentCreationDateStart { get; set; } + public DateTime? DepartmentCreationDateEnd { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Util/Helper/DataProtectionHelper.cs b/EOM.TSHotelManagement.Common.Util/Helper/DataProtectionHelper.cs index ebdfd56..5247120 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/DataProtectionHelper.cs +++ b/EOM.TSHotelManagement.Common.Util/Helper/DataProtectionHelper.cs @@ -63,9 +63,27 @@ namespace EOM.TSHotelManagement.Common.Util } } + private bool Compare(string encryptedData, string inputData) + { + try + { + return _encryptLib.Compare(encryptedData, inputData); + } + catch + { + return false; + } + } + public bool CompareCustomerData(string encryptedData, string inputData) => Compare(encryptedData, inputData, _customerProtector); + public bool CompareEmployeeData(string encryptedData, string inputData) + => Compare(encryptedData, inputData, _employeeProtector); + + public bool EncryptLibCompareEmployeeData(string encryptedData, string inputData) + => Compare(encryptedData, inputData); + public string DecryptEmployeeData(string encryptedData) => DecryptData(encryptedData, _employeeProtector); diff --git a/EOM.TSHotelManagement.Migration/EntityBuilder.cs b/EOM.TSHotelManagement.Migration/EntityBuilder.cs index d086cec..00f17e2 100644 --- a/EOM.TSHotelManagement.Migration/EntityBuilder.cs +++ b/EOM.TSHotelManagement.Migration/EntityBuilder.cs @@ -731,6 +731,8 @@ namespace EOM.TSHotelManagement.Migration new Permission { PermissionNumber = "staffmanagement.create", PermissionName = "员工-新增", Module = "humanresource", Description = "员工管理-新增", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, new Permission { PermissionNumber = "staffmanagement.update", PermissionName = "员工-编辑", Module = "humanresource", Description = "员工管理-编辑", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, new Permission { PermissionNumber = "staffmanagement.delete", PermissionName = "员工-删除", Module = "humanresource", Description = "员工管理-删除", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "staffmanagement.reset", PermissionName = "员工-重置密码", Module = "humanresource", Description = "员工管理-重置密码", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, + new Permission { PermissionNumber = "staffmanagement.status", PermissionName = "员工-状态", Module = "humanresource", Description = "员工管理-状态", MenuKey = "staffmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, // Material management (酒店物资管理) new Permission { PermissionNumber = "goodsmanagement.view", PermissionName = "商品-查看", Module = "material", Description = "商品管理-查看", MenuKey = "goodsmanagement", ParentNumber = null, IsDelete = 0, DataInsUsr = "System", DataInsDate = DateTime.Now }, diff --git a/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs b/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs index 9db315f..9d9ce79 100644 --- a/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs +++ b/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs @@ -109,8 +109,6 @@ namespace EOM.TSHotelManagement.WebApi.Authorization userNumber = GetUserNumberFromAuthorizationHeader(httpContext); } - _logger.LogWarning(userNumber); - if (string.IsNullOrWhiteSpace(userNumber)) { _logger.LogWarning("权限校验失败:无法获取用户编号(SerialNumber)"); diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs index 671d32c..a5b7651 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs @@ -35,7 +35,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// - [RequirePermission("staffmanagement.update")] + [RequirePermission("staffmanagement.status")] [HttpPost] public BaseResponse ManagerEmployeeAccount([FromBody] UpdateEmployeeInputDto worker) { @@ -96,7 +96,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// - [RequirePermission("staffmanagement.update")] + [RequirePermission("staffmanagement.reset")] [HttpPost] public BaseResponse UpdateEmployeeAccountPassword([FromBody] UpdateEmployeeInputDto updateEmployeeInputDto) { -- Gitee From d39740cfaac6592997d202938cb0a07d79821280 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 15 Nov 2025 19:24:53 +0800 Subject: [PATCH 11/21] fix. --- ...M.TSHotelManagement.Common.Contract.csproj | 5 ++ .../EOM.TSHotelManagement.Common.Util.csproj | 5 ++ .../EOM.TSHotelManagement.Shared.csproj | 5 ++ EOM.TSHotelManagement.Web.sln | 72 +++++++++---------- 4 files changed, 51 insertions(+), 36 deletions(-) diff --git a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj index aa1b0b8..88f357f 100644 --- a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj +++ b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj @@ -6,6 +6,7 @@ enable True AnyCPU;x64 + True @@ -18,4 +19,8 @@ + + + + diff --git a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj index 89508c0..3b0a49f 100644 --- a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj +++ b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj @@ -3,6 +3,7 @@ net8.0 AnyCPU;x64 + True @@ -14,4 +15,8 @@ + + + + diff --git a/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj b/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj index 9d1c41f..247f4e0 100644 --- a/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj +++ b/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj @@ -5,6 +5,11 @@ enable enable AnyCPU;x64 + True + + + + diff --git a/EOM.TSHotelManagement.Web.sln b/EOM.TSHotelManagement.Web.sln index b23396e..3889139 100644 --- a/EOM.TSHotelManagement.Web.sln +++ b/EOM.TSHotelManagement.Web.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.3.32922.545 +# Visual Studio Version 18 +VisualStudioVersion = 18.3.11206.111 d18.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.EntityFramework", "EOM.TSHotelManagement.EntityFramework\EOM.TSHotelManagement.EntityFramework.csproj", "{B0415048-E431-4FCF-9CF7-C1345C6F7750}" EndProject @@ -21,42 +21,42 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOM.TSHotelManagement.Commo EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Release|Any CPU.Build.0 = Release|Any CPU - {FE75A00A-4B07-49CE-8F17-F483044A569A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FE75A00A-4B07-49CE-8F17-F483044A569A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FE75A00A-4B07-49CE-8F17-F483044A569A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FE75A00A-4B07-49CE-8F17-F483044A569A}.Release|Any CPU.Build.0 = Release|Any CPU - {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Release|Any CPU.Build.0 = Release|Any CPU - {D99F4527-C620-4073-92B1-254A6C7FA363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D99F4527-C620-4073-92B1-254A6C7FA363}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D99F4527-C620-4073-92B1-254A6C7FA363}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D99F4527-C620-4073-92B1-254A6C7FA363}.Release|Any CPU.Build.0 = Release|Any CPU - {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Release|Any CPU.Build.0 = Release|Any CPU - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Release|Any CPU.Build.0 = Release|Any CPU - {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Release|Any CPU.Build.0 = Release|Any CPU - {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Release|Any CPU.Build.0 = Release|Any CPU + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Debug|x64.ActiveCfg = Debug|x64 + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Debug|x64.Build.0 = Debug|x64 + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Release|x64.ActiveCfg = Release|x64 + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Release|x64.Build.0 = Release|x64 + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Debug|x64.ActiveCfg = Debug|x64 + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Debug|x64.Build.0 = Debug|x64 + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Release|x64.ActiveCfg = Release|x64 + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Release|x64.Build.0 = Release|x64 + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Debug|x64.ActiveCfg = Debug|x64 + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Debug|x64.Build.0 = Debug|x64 + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Release|x64.ActiveCfg = Release|x64 + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Release|x64.Build.0 = Release|x64 + {D99F4527-C620-4073-92B1-254A6C7FA363}.Debug|x64.ActiveCfg = Debug|x64 + {D99F4527-C620-4073-92B1-254A6C7FA363}.Debug|x64.Build.0 = Debug|x64 + {D99F4527-C620-4073-92B1-254A6C7FA363}.Release|x64.ActiveCfg = Release|x64 + {D99F4527-C620-4073-92B1-254A6C7FA363}.Release|x64.Build.0 = Release|x64 + {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Debug|x64.ActiveCfg = Debug|x64 + {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Debug|x64.Build.0 = Debug|x64 + {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Release|x64.ActiveCfg = Release|x64 + {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Release|x64.Build.0 = Release|x64 + {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Debug|x64.ActiveCfg = Debug|x64 + {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Debug|x64.Build.0 = Debug|x64 + {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Release|x64.ActiveCfg = Release|x64 + {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Release|x64.Build.0 = Release|x64 + {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Debug|x64.ActiveCfg = Debug|x64 + {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Debug|x64.Build.0 = Debug|x64 + {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Release|x64.ActiveCfg = Release|x64 + {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Release|x64.Build.0 = Release|x64 + {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Debug|x64.ActiveCfg = Debug|x64 + {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Debug|x64.Build.0 = Debug|x64 + {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Release|x64.ActiveCfg = Release|x64 + {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE -- Gitee From 5831b5f162fd6371c339c77d82854fc212a2760c Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 29 Nov 2025 14:44:50 +0800 Subject: [PATCH 12/21] upload --- .../PromotionContentService.cs | 8 +++ .../SystemManagement/Base/BaseService.cs | 24 +++++++++ .../NavBar/Dto/CreateNavBarInputDto.cs | 5 ++ .../Dto/CustoType/ReadCustoTypeInputDto.cs | 1 + .../PassportType/ReadPassportTypeInputDto.cs | 1 + .../Dto/ReadPromotionContentInputDto.cs | 2 + .../ReadRewardPunishmentTypeInputDto.cs | 1 + .../ReadAppointmentNoticeTypeInputDto.cs | 2 +- .../Dto/Nation/ReadNationInputDto.cs | 1 + .../Dto/Position/CreatePositionInputDto.cs | 5 +- .../Dto/Position/ReadPositionInputDto.cs | 1 - .../Qualification/ReadEducationInputDto.cs | 1 + .../Validator/NeedValidAttribute.cs | 9 ---- .../Validator/ValidateHelper.cs | 53 ------------------- .../Filters/ValidationFilter.cs | 37 +++++++++++++ EOM.TSHotelManagement.WebApi/Startup.cs | 7 +++ 16 files changed, 93 insertions(+), 65 deletions(-) delete mode 100644 EOM.TSHotelManagement.Common.Util/Validator/NeedValidAttribute.cs delete mode 100644 EOM.TSHotelManagement.Common.Util/Validator/ValidateHelper.cs create mode 100644 EOM.TSHotelManagement.WebApi/Filters/ValidationFilter.cs diff --git a/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs b/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs index fbe20ed..efd0d9d 100644 --- a/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs +++ b/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs @@ -61,6 +61,14 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == readPromotionContentInputDto.IsDelete); } + if (!readPromotionContentInputDto.PromotionContentNumber.IsNullOrEmpty()) + { + where = where.And(a => a.PromotionContentNumber.Contains(readPromotionContentInputDto.PromotionContentNumber)); + } + if (!readPromotionContentInputDto.PromotionContentMessage.IsNullOrEmpty()) + { + where = where.And(a => a.PromotionContentMessage.Contains(readPromotionContentInputDto.PromotionContentMessage)); + } var Data = new List(); if (!readPromotionContentInputDto.IgnorePaging && readPromotionContentInputDto.Page != 0 && readPromotionContentInputDto.PageSize != 0) { diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs index 63ac208..8a8d0a3 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs @@ -341,6 +341,10 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == nationInputDto.IsDelete); } + if (nationInputDto != null && !nationInputDto.NationName.IsNullOrEmpty()) + { + where = where.And(a => a.NationName.Contains(nationInputDto.NationName)); + } var count = 0; if (!nationInputDto.IgnorePaging && nationInputDto.Page != 0 && nationInputDto.PageSize != 0) @@ -426,6 +430,10 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == educationInputDto.IsDelete); } + if (!educationInputDto.EducationName.IsNullOrEmpty()) + { + where = where.And(a => a.EducationName.Contains(educationInputDto.EducationName)); + } var count = 0; var educations = new List(); @@ -660,6 +668,10 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == readCustoTypeInputDto.IsDelete); } + if (!readCustoTypeInputDto.CustomerTypeName.IsNullOrEmpty()) + { + where = where.And(a => a.CustomerTypeName.Contains(readCustoTypeInputDto.CustomerTypeName)); + } var count = 0; var custoTypes = new List(); @@ -764,6 +776,10 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == readPassportTypeInputDto.IsDelete); } + if (!readPassportTypeInputDto.PassportName.IsNullOrEmpty()) + { + where = where.And(a => a.PassportName.Contains(readPassportTypeInputDto.PassportName)); + } var count = 0; var passPortTypes = new List(); @@ -868,6 +884,10 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == readRewardPunishmentTypeInputDto.IsDelete); } + if (!readRewardPunishmentTypeInputDto.RewardPunishmentTypeName.IsNullOrEmpty()) + { + where = where.And(a => a.RewardPunishmentTypeName.Contains(readRewardPunishmentTypeInputDto.RewardPunishmentTypeName)); + } var count = 0; var gBTypes = new List(); @@ -957,6 +977,10 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == readAppointmentNoticeTypeInputDto.IsDelete); } + if (!readAppointmentNoticeTypeInputDto.NoticeTypeName.IsNullOrEmpty()) + { + where = where.And(a => a.NoticeTypeName.Contains(readAppointmentNoticeTypeInputDto.NoticeTypeName)); + } var count = 0; diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs index 8033167..c42b2c5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs @@ -1,10 +1,15 @@ +using EOM.TSHotelManagement.Common.Util; +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateNavBarInputDto : BaseInputDto { + [Required(ErrorMessage = "Ϊֶ"), MaxLength(50,ErrorMessage = "󳤶Ϊ50ַ")] public string NavigationBarName { get; set; } public int NavigationBarOrder { get; set; } public string NavigationBarImage { get; set; } + [Required(ErrorMessage = "¼Ϊֶ"), MaxLength(200, ErrorMessage = "¼󳤶Ϊ200ַ")] public string NavigationBarEvent { get; set; } public int MarginLeft { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs index 5fd5575..c0f29ba 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadCustoTypeInputDto : ListInputDto { public int CustomerType { get; set; } + public string CustomerTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs index 6270796..25f331a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadPassportTypeInputDto : ListInputDto { public int PassportId { get; set; } + public string? PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs index 0ec70e0..6529fa6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs @@ -3,6 +3,8 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadPromotionContentInputDto : ListInputDto { public int PromotionId { get; set; } + public string PromotionContentNumber { get; set; } = string.Empty; + public string PromotionContentMessage { get; set; } = string.Empty; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs index 65b41a8..afb8172 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadRewardPunishmentTypeInputDto : ListInputDto { public string RewardPunishmentTypeId { get; set; } + public string RewardPunishmentTypeName { get; set; } = string.Empty; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs index f6724d5..20a728b 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs @@ -10,6 +10,6 @@ /// /// 公告类型名称 (AppointmentNotice Type Name) /// - public string NoticeTypeName { get; set; } + public string NoticeTypeName { get; set; } = string.Empty; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs index 741a8fa..17701e0 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadNationInputDto : ListInputDto { public int NationId { get; set; } + public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs index 54e65ca..5e72f72 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs @@ -1,10 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreatePositionInputDto : BaseInputDto { + [Required(ErrorMessage = "ְλΪֶ"), MaxLength(128, ErrorMessage = "ְλ󳤶Ϊ128ַ")] public string PositionNumber { get; set; } + [Required(ErrorMessage = "ְλΪֶ"), MaxLength(200, ErrorMessage = "ְλ󳤶Ϊ200ַ")] public string PositionName { get; set; } - public string PositionDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs index a2c3a62..360b714 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs @@ -4,7 +4,6 @@ namespace EOM.TSHotelManagement.Common.Contract { public int PositionId { get; set; } public string PositionName { get; set; } - public string PositionDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs index 0c9754e..b1e9f30 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadEducationInputDto : ListInputDto { public string EducationNumber { get; set; } + public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Util/Validator/NeedValidAttribute.cs b/EOM.TSHotelManagement.Common.Util/Validator/NeedValidAttribute.cs deleted file mode 100644 index 9a9e574..0000000 --- a/EOM.TSHotelManagement.Common.Util/Validator/NeedValidAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace EOM.TSHotelManagement.Common.Util -{ - [AttributeUsage(AttributeTargets.Property)] - public class NeedValidAttribute : Attribute - { - } -} diff --git a/EOM.TSHotelManagement.Common.Util/Validator/ValidateHelper.cs b/EOM.TSHotelManagement.Common.Util/Validator/ValidateHelper.cs deleted file mode 100644 index de882ac..0000000 --- a/EOM.TSHotelManagement.Common.Util/Validator/ValidateHelper.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Reflection; - -namespace EOM.TSHotelManagement.Common.Util -{ - public static class ValidateHelper - { - public static bool Validate(object obj) - { - Type type = obj.GetType(); - - // 遍历所有属性 - foreach (PropertyInfo property in type.GetProperties(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance)) - { - // 检查属性是否具有 NeedValid 特性 - if (Attribute.IsDefined(property, typeof(NeedValidAttribute))) - { - // 获取属性的值 - object value = property.GetValue(obj); - - // 根据不同的类型进行校验 - if (value is string strValue && string.IsNullOrEmpty(strValue)) - { - return false; - } - else if (value is int intValue && intValue < 0) - { - return false; - } - else if (value is decimal decValue && decValue < 0) - { - return false; - } - else if (value is double doubleValue && doubleValue < 0) - { - return false; - } - else if (value is float floatValue && floatValue < 0) - { - return false; - } - else if (value is DateTime dateTimeValue && dateTimeValue == default) - { - return false; - } - } - } - - // 如果所有校验均通过 - return true; - } - } -} diff --git a/EOM.TSHotelManagement.WebApi/Filters/ValidationFilter.cs b/EOM.TSHotelManagement.WebApi/Filters/ValidationFilter.cs new file mode 100644 index 0000000..ca7b3d2 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Filters/ValidationFilter.cs @@ -0,0 +1,37 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Util; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using System.Collections.Generic; + +namespace EOM.TSHotelManagement.WebApi.Filters +{ + public class ValidationFilter : IActionFilter + { + public void OnActionExecuting(ActionExecutingContext context) + { + if (!context.ModelState.IsValid) + { + var errors = new List(); + + foreach (var modelState in context.ModelState.Values) + { + foreach (var error in modelState.Errors) + { + errors.Add(error.ErrorMessage); + } + } + + var response = new BaseResponse + { + Code = BusinessStatusCode.BadRequest, + Message = LocalizationHelper.GetLocalizedString($"Data validate failure: {string.Join("\n", errors)}",$"数据验证失败: {string.Join("\n", errors)}"), + }; + + context.Result = new BadRequestObjectResult(response); + } + } + + public void OnActionExecuted(ActionExecutedContext context) { } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index 9dc4cee..efc7081 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -95,6 +95,7 @@ namespace EOM.TSHotelManagement.WebApi private void RegisterSingletonServices(IServiceCollection services) { + services.AddScoped(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); @@ -153,6 +154,7 @@ namespace EOM.TSHotelManagement.WebApi { services.AddControllers(options => { + options.Filters.Add(); options.Conventions.Add(new AuthorizeAllControllersConvention()); options.RespectBrowserAcceptHeader = true; options.SuppressImplicitRequiredAttributeForNonNullableReferenceTypes = true; @@ -184,6 +186,11 @@ namespace EOM.TSHotelManagement.WebApi // 全局路由配置 services.AddMvc(opt => opt.UseCentralRoutePrefix(new RouteAttribute("api/[controller]/[action]"))); + + services.Configure(options => + { + options.SuppressModelStateInvalidFilter = true; + }); } private void ConfigureHttpContextAccessor(IServiceCollection services) -- Gitee From 29db732c31ac568ce2d40b01aae6fcfe109f70b0 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 29 Nov 2025 16:32:07 +0800 Subject: [PATCH 13/21] Add validate rule for dto. --- .../NavBar/Dto/DeleteNavBarInputDto.cs | 3 + .../NavBar/Dto/ReadNavBarOutputDto.cs | 11 +++ .../NavBar/Dto/UpdateNavBarInputDto.cs | 13 ++++ .../Asset/Dto/Asset/CreateAssetInputDto.cs | 15 ++++ .../Asset/Dto/Asset/DeleteAssetInputDto.cs | 3 + .../Asset/Dto/Asset/ReadAssetInputDto.cs | 3 + .../Asset/Dto/Asset/ReadAssetOutputDto.cs | 17 +++++ .../Asset/Dto/Asset/UpdateAssetInputDto.cs | 15 ++++ .../Dto/Customer/CreateCustomerInputDto.cs | 19 +++++ .../Dto/Customer/DeleteCustomerInputDto.cs | 3 + .../Dto/Customer/ReadCustomerInputDto.cs | 9 +++ .../Dto/Customer/ReadCustomerOutputDto.cs | 44 +++++++---- .../Dto/Customer/UpdateCustomerInputDto.cs | 19 +++++ .../GenderType/CreateGenderTypeInputDto.cs | 8 -- .../GenderType/DeleteGenderTypeInputDto.cs | 8 -- .../Dto/GenderType/ReadGenderTypeInputDto.cs | 9 --- .../Dto/GenderType/ReadGenderTypeOutputDto.cs | 10 --- .../GenderType/UpdateGenderTypeInputDto.cs | 9 --- .../Dto/CreateEnergyManagementInputDto.cs | 17 +++++ .../Dto/DeleteEnergyManagementInputDto.cs | 3 + .../Dto/ReadEnergyManagementInputDto.cs | 8 ++ .../Dto/UpdateEnergyManagementInputDto.cs | 17 +++++ .../Business/News/Dto/AddNewsInputDto.cs | 19 ++++- .../Business/News/Dto/DeleteNewsInputDto.cs | 12 +-- .../Business/News/Dto/ReadNewsInputDto.cs | 17 ++++- .../Business/News/Dto/ReadNewsOuputDto.cs | 20 ++++- .../Business/News/Dto/UpdateNewsInputDto.cs | 19 ++++- .../Dto/CreatePromotionContentInputDto.cs | 5 ++ .../Dto/DeletePromotionContentInputDto.cs | 3 + .../Dto/ReadPromotionContentInputDto.cs | 6 ++ .../Dto/ReadPromotionContentOutputDto.cs | 6 ++ .../Dto/UpdatePromotionContentInputDto.cs | 5 ++ .../Business/Reser/Dto/CreateReserInputDto.cs | 15 ++++ .../Business/Reser/Dto/DeleteReserInputDto.cs | 3 + .../Business/Reser/Dto/ReadReserInputDto.cs | 13 ++++ .../Business/Reser/Dto/ReadReserOutputDto.cs | 28 +++++-- .../Business/Reser/Dto/UpdateReserInputDto.cs | 15 ++++ .../Room/Dto/CheckinRoomByReservationDto.cs | 24 +++++- .../Business/Room/Dto/CheckoutRoomDto.cs | 11 ++- .../Business/Room/Dto/TransferRoomDto.cs | 7 +- .../Sellthing/Dto/CreateSellThingInputDto.cs | 11 +++ .../Sellthing/Dto/DeleteSellThingInputDto.cs | 9 +++ .../Sellthing/Dto/ReadSellThingInputDto.cs | 9 +++ .../Sellthing/Dto/ReadSellThingOutputDto.cs | 19 +++-- .../Sellthing/Dto/UpdateSellThingInputDto.cs | 11 +++ .../Dto/Spend/AddCustomerSpendInputDto.cs | 15 +++- .../Spend/Dto/Spend/CreateSpendInputDto.cs | 18 +++++ .../Spend/Dto/Spend/DeleteSpendInputDto.cs | 5 ++ .../Spend/Dto/Spend/ReadSpendInputDto.cs | 10 +++ .../Spend/Dto/Spend/ReadSpendOutputDto.cs | 40 +++++++--- .../Spend/Dto/Spend/UpdateSpendInputDto.cs | 17 +++++ ...M.TSHotelManagement.Common.Contract.csproj | 1 - .../CreateAdministratorInputDto.cs | 18 +++++ .../DeleteAdministratorInputDto.cs | 4 + .../ReadAdministratorInputDto.cs | 11 +++ .../ReadAdministratorOutputDto.cs | 16 +++- .../UpdateAdministratorInputDto.cs | 18 +++++ .../CreateAdministratorTypeInputDto.cs | 7 ++ .../DeleteAdministratorTypeInputDto.cs | 4 + .../ReadAdministratorTypeInputDto.cs | 2 + .../ReadAdministratorTypeOutputDto.cs | 5 ++ .../UpdateAdministratorTypeInputDto.cs | 8 ++ .../CreateAppointmentNoticeInputDto.cs | 16 ++++ .../DeleteAppointmentNoticeInputDto.cs | 4 + .../ReadAppointmentNoticeInputDto.cs | 10 +++ .../ReadAppointmentNoticeOutputDto.cs | 10 +++ .../UpdateAppointmentNoticeInputDto.cs | 10 +++ .../CreateAppointmentNoticeTypeInputDto.cs | 14 ++-- .../DeleteAppointmentNoticeTypeInputDto.cs | 9 ++- .../ReadAppointmentNoticeTypeInputDto.cs | 12 ++- .../ReadAppointmentNoticeTypeOutputDto.cs | 28 ++----- .../UpdateAppointmentNoticeTypeInputDto.cs | 14 ++-- .../Department/CreateDepartmentInputDto.cs | 20 +++++ .../Department/DeleteDepartmentInputDto.cs | 18 +++++ .../Dto/Department/ReadDepartmentInputDto.cs | 18 +++++ .../Dto/Department/ReadDepartmentOutputDto.cs | 16 ++++ .../Department/UpdateDepartmentInputDto.cs | 19 +++++ .../Dto/Menu/CreateMenuInputDto.cs | 9 +++ .../Dto/Menu/DeleteMenuInputDto.cs | 8 ++ .../Dto/Menu/ReadMenuInputDto.cs | 2 + .../Dto/Menu/ReadMenuOutputDto.cs | 8 ++ .../Dto/Menu/UpdateMenuInputDto.cs | 9 +++ .../Dto/Nation/CreateNationInputDto.cs | 7 ++ .../Dto/Nation/DeleteNationInputDto.cs | 5 ++ .../Dto/Nation/ReadNationInputDto.cs | 4 + .../Dto/Nation/ReadNationOutputDto.cs | 5 ++ .../Dto/Nation/UpdateNationInputDto.cs | 7 ++ .../AssignUserPermissionsInputDto.cs | 13 +--- .../GrantRolePermissionsInputDto.cs | 13 +--- .../Dto/Permission/ReadPermissionDtos.cs | 74 ++++++++++--------- .../Permission/UserRolePermissionOutputDto.cs | 24 ++---- .../Dto/Position/DeletePositionInputDto.cs | 4 + .../Dto/Position/ReadPositionInputDto.cs | 4 + .../Dto/Position/ReadPositionOutputDto.cs | 5 ++ .../Dto/Position/UpdatePositionInputDto.cs | 9 +++ .../Qualification/CreateEducationInputDto.cs | 7 ++ .../Qualification/DeleteEducationInputDto.cs | 4 + .../Qualification/ReadEducationInputDto.cs | 5 ++ .../Qualification/ReadEducationOutputDto.cs | 5 ++ .../Qualification/UpdateEducationInputDto.cs | 7 ++ .../Dto/Role/AssignUserRolesInputDto.cs | 13 +--- .../Dto/Role/CreateRoleInputDto.cs | 19 ++--- .../Dto/Role/DeleteRoleInputDto.cs | 8 +- .../Dto/Role/ReadRoleInputDto.cs | 17 ++--- .../Dto/Role/ReadRoleOutputDto.cs | 17 ++--- .../Dto/Role/UpdateRoleInputDto.cs | 19 ++--- .../CreateSupervisionStatisticsInputDto.cs | 12 +++ .../DeleteSupervisionStatisticsInputDto.cs | 12 +++ .../ReadSupervisionStatisticsInputDto.cs | 11 +++ .../ReadSupervisionStatisticsOutputDto.cs | 11 +++ .../UpdateSupervisionStatisticsInputDto.cs | 12 +++ .../CreateSystemInformationInputDto.cs | 6 ++ .../DeleteSystemInformationInputDto.cs | 2 + .../ReadSystemInformationInputDto.cs | 2 + .../ReadSystemInformationOutputDto.cs | 4 + .../UpdateSystemInformationInputDto.cs | 7 ++ .../CreateVipLevelRuleInputDto.cs | 8 ++ .../DeleteVipLevelRuleInputDto.cs | 7 +- .../VipLevelRule/ReadVipLevelRuleInputDto.cs | 4 + .../VipLevelRule/ReadVipLevelRuleOutputDto.cs | 7 +- .../UpdateVipLevelRuleInputDto.cs | 8 ++ 121 files changed, 1130 insertions(+), 281 deletions(-) delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs index 2b38dfc..582b1b6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteNavBarInputDto : BaseInputDto { + [Required(ErrorMessage = "导航栏ID为必填字段")] public int NavigationBarId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs index 8ca1e4d..ad7f56c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs @@ -1,13 +1,24 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadNavBarOutputDto : BaseOutputDto { public int Id { get; set; } + public int NavigationBarId { get; set; } + + [MaxLength(50, ErrorMessage = "导航栏名称长度不超过50字符")] public string NavigationBarName { get; set; } + public int NavigationBarOrder { get; set; } + + [MaxLength(255, ErrorMessage = "导航栏图片长度不超过255字符")] public string NavigationBarImage { get; set; } + + [MaxLength(200, ErrorMessage = "导航栏事件长度不超过200字符")] public string NavigationBarEvent { get; set; } + public int MarginLeft { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs index 2b74d9d..5cc6ebb 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs @@ -1,12 +1,25 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateNavBarInputDto : BaseInputDto { + [Required(ErrorMessage = "导航栏ID为必填字段")] public int NavigationBarId { get; set; } + + [Required(ErrorMessage = "导航栏名称为必填字段"), MaxLength(50, ErrorMessage = "导航栏名称长度不超过50字符")] public string NavigationBarName { get; set; } + + [Required(ErrorMessage = "导航栏排序为必填字段")] public int NavigationBarOrder { get; set; } + + [MaxLength(255, ErrorMessage = "导航栏图片长度不超过255字符")] public string NavigationBarImage { get; set; } + + [Required(ErrorMessage = "导航栏事件为必填字段"), MaxLength(200, ErrorMessage = "导航栏事件长度不超过200字符")] public string NavigationBarEvent { get; set; } + + [Required(ErrorMessage = "左边距为必填字段")] public int MarginLeft { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs index bd654d1..f0694c6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs @@ -1,13 +1,28 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateAssetInputDto : BaseInputDto { + [Required(ErrorMessage = "资产编号为必填字段"), MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } + + [Required(ErrorMessage = "资产名称为必填字段"), MaxLength(200, ErrorMessage = "资产名称长度不超过200字符")] public string AssetName { get; set; } + + [Required(ErrorMessage = "资产总值为必填字段")] public decimal AssetValue { get; set; } + + [Required(ErrorMessage = "部门代码为必填字段"), MaxLength(128, ErrorMessage = "部门代码长度不超过128字符")] public string DepartmentCode { get; set; } + + [Required(ErrorMessage = "获取日期为必填字段")] public DateTime AcquisitionDate { get; set; } + + [Required(ErrorMessage = "资产来源为必填字段"), MaxLength(500, ErrorMessage = "资产来源长度不超过500字符")] public string AssetSource { get; set; } + + [Required(ErrorMessage = "经办员工为必填字段"), MaxLength(128, ErrorMessage = "经办员工长度不超过128字符")] public string AcquiredByEmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs index f9a7b9c..a469d06 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteAssetInputDto : BaseInputDto { + [Required(ErrorMessage = "资产编号为必填字段"), MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs index 2d3c6f1..eb53a45 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAssetInputDto : ListInputDto { + [MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs index a39f3f8..2f03344 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs @@ -1,17 +1,34 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAssetOutputDto : BaseOutputDto { public int Id { get; set; } + + [MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } + + [MaxLength(200, ErrorMessage = "资产名称长度不超过200字符")] public string AssetName { get; set; } + public decimal AssetValue { get; set; } + public string AssetValueFormatted { get; set; } + + [MaxLength(128, ErrorMessage = "部门代码长度不超过128字符")] public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } + public DateTime AcquisitionDate { get; set; } + + [MaxLength(500, ErrorMessage = "资产来源长度不超过500字符")] public string AssetSource { get; set; } + + [MaxLength(128, ErrorMessage = "经办员工长度不超过128字符")] public string AcquiredByEmployeeId { get; set; } + public string AcquiredByEmployeeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs index bfa40d9..96a7bcc 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs @@ -1,13 +1,28 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateAssetInputDto : BaseInputDto { + [Required(ErrorMessage = "资产编号为必填字段"), MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } + + [Required(ErrorMessage = "资产名称为必填字段"), MaxLength(200, ErrorMessage = "资产名称长度不超过200字符")] public string AssetName { get; set; } + + [Required(ErrorMessage = "资产总值为必填字段")] public decimal AssetValue { get; set; } + + [Required(ErrorMessage = "部门代码为必填字段"), MaxLength(128, ErrorMessage = "部门代码长度不超过128字符")] public string DepartmentCode { get; set; } + + [Required(ErrorMessage = "获取日期为必填字段")] public DateTime AcquisitionDate { get; set; } + + [Required(ErrorMessage = "资产来源为必填字段"), MaxLength(500, ErrorMessage = "资产来源长度不超过500字符")] public string AssetSource { get; set; } + + [Required(ErrorMessage = "经办员工为必填字段"), MaxLength(128, ErrorMessage = "经办员工长度不超过128字符")] public string AcquiredByEmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs index 992a607..54daf7f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs @@ -1,15 +1,34 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateCustomerInputDto : BaseInputDto { + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } + + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } + + [Required(ErrorMessage = "客户性别为必填字段")] public int? CustomerGender { get; set; } + + [Required(ErrorMessage = "证件类型为必填字段")] public int PassportId { get; set; } + + [Required(ErrorMessage = "客户电话为必填字段"), MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } + + [Required(ErrorMessage = "出生日期为必填字段")] public DateTime DateOfBirth { get; set; } + + [Required(ErrorMessage = "证件号码为必填字段"), MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } + + [MaxLength(256, ErrorMessage = "客户地址长度不超过256字符")] public string CustomerAddress { get; set; } + + [Required(ErrorMessage = "客户类型为必填字段")] public int CustomerType { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs index e0f07b4..3f81b6a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteCustomerInputDto : BaseInputDto { + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs index ccbba1c..fb9752e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs @@ -1,10 +1,19 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadCustomerInputDto : ListInputDto { + [MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } + + [MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } + + [MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } + + [MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index 5166172..092ced4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -1,35 +1,53 @@ using EOM.TSHotelManagement.Common.Util; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadCustomerOutputDto : BaseOutputDto { - [UIDisplay("", true, false)] + [UIDisplay("ID", true, false)] public int Id { get; set; } - [UIDisplay("ͻ")] + + [UIDisplay("客户编号")] + [MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - [UIDisplay("ͻ")] + + [UIDisplay("客户姓名")] + [MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } - [UIDisplay("Ա", true, false)] + + [UIDisplay("性别", true, false)] public int? CustomerGender { get; set; } - [UIDisplay("֤", true, false)] + + [UIDisplay("证件类型", true, false)] public int PassportId { get; set; } - [UIDisplay("Ա", false, true)] + + [UIDisplay("性别", false, true)] public string GenderName { get; set; } - [UIDisplay("ϵʽ")] + + [UIDisplay("联系方式")] + [MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } - [UIDisplay("")] + + [UIDisplay("出生日期")] public DateTime DateOfBirth { get; set; } - [UIDisplay("ͻ", true, false)] + + [UIDisplay("客户类型", true, false)] public int CustomerType { get; set; } - [UIDisplay("ͻ", false, true)] + + [UIDisplay("客户类型", false, true)] public string CustomerTypeName { get; set; } - [UIDisplay("֤", false, true)] + + [UIDisplay("证件类型", false, true)] public string PassportName { get; set; } - [UIDisplay("֤")] + + [UIDisplay("证件号码")] + [MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } - [UIDisplay("ͻַ")] + + [UIDisplay("客户地址")] + [MaxLength(256, ErrorMessage = "客户地址长度不超过256字符")] public string CustomerAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs index 06f8c36..a53f02a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs @@ -1,15 +1,34 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateCustomerInputDto : BaseInputDto { + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } + + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } + + [Required(ErrorMessage = "客户性别为必填字段")] public int? CustomerGender { get; set; } + + [Required(ErrorMessage = "证件类型为必填字段")] public int PassportId { get; set; } + + [Required(ErrorMessage = "客户电话为必填字段"), MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } + + [Required(ErrorMessage = "出生日期为必填字段")] public DateOnly DateOfBirth { get; set; } + + [Required(ErrorMessage = "证件号码为必填字段"), MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } + + [MaxLength(256, ErrorMessage = "客户地址长度不超过256字符")] public string CustomerAddress { get; set; } + + [Required(ErrorMessage = "客户类型为必填字段")] public int CustomerType { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs deleted file mode 100644 index 48a48a1..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateGenderTypeInputDto : BaseInputDto - { - public string GenderName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs deleted file mode 100644 index 0f478a9..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteGenderTypeInputDto : BaseInputDto - { - public int GenderId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs deleted file mode 100644 index 9ad19ea..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class ReadGenderTypeInputDto : ListInputDto - { - public int GenderId { get; set; } - public string GenderName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs deleted file mode 100644 index 71aef2f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class ReadGenderTypeOutputDto : BaseOutputDto - { - public int Id { get; set; } - public string Name { get; set; } - public string Description { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs deleted file mode 100644 index fe5925f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateGenderTypeInputDto : BaseInputDto - { - public int GenderId { get; set; } - public string GenderName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs index 5ead7fd..85867fe 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs @@ -1,14 +1,31 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateEnergyManagementInputDto : BaseInputDto { + [Required(ErrorMessage = "信息编号为必填字段"), MaxLength(128, ErrorMessage = "信息编号长度不超过128字符")] public string InformationNumber { get; set; } + + [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } + + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } + + [Required(ErrorMessage = "开始日期为必填字段")] public DateTime StartDate { get; set; } + + [Required(ErrorMessage = "结束日期为必填字段")] public DateTime EndDate { get; set; } + + [Required(ErrorMessage = "电费为必填字段")] public decimal PowerUsage { get; set; } + + [Required(ErrorMessage = "水费为必填字段")] public decimal WaterUsage { get; set; } + + [Required(ErrorMessage = "记录员为必填字段"), MaxLength(150, ErrorMessage = "记录员长度不超过150字符")] public string Recorder { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs index ec8564d..fe5a9b6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEnergyManagementInputDto : BaseInputDto { + [Required(ErrorMessage = "信息编号为必填字段")] public int InformationId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs index 65936ec..d777d77 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs @@ -1,11 +1,19 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEnergyManagementInputDto : ListInputDto { public int Id { get; set; } + + [MaxLength(128, ErrorMessage = "信息编号长度不超过128字符")] public string InformationId { get; set; } + + [MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNo { get; set; } + public DateOnly? UseDate { get; set; } + public DateOnly? EndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs index f25fb48..b988f95 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs @@ -1,14 +1,31 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEnergyManagementInputDto : BaseInputDto { + [Required(ErrorMessage = "信息编号为必填字段"), MaxLength(128, ErrorMessage = "信息编号长度不超过128字符")] public string InformationId { get; set; } + + [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } + + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } + + [Required(ErrorMessage = "开始日期为必填字段")] public DateTime StartDate { get; set; } + + [Required(ErrorMessage = "结束日期为必填字段")] public DateTime EndDate { get; set; } + + [Required(ErrorMessage = "电费为必填字段")] public decimal PowerUsage { get; set; } + + [Required(ErrorMessage = "水费为必填字段")] public decimal WaterUsage { get; set; } + + [Required(ErrorMessage = "记录员为必填字段"), MaxLength(150, ErrorMessage = "记录员长度不超过150字符")] public string Recorder { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/AddNewsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/AddNewsInputDto.cs index 3812f28..05ab969 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/AddNewsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/AddNewsInputDto.cs @@ -1,14 +1,31 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class AddNewsInputDto : BaseInputDto { + [Required(ErrorMessage = "新闻编号为必填字段"), MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } + + [Required(ErrorMessage = "新闻标题为必填字段"), MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } + + [Required(ErrorMessage = "新闻内容为必填字段")] public string NewsContent { get; set; } + + [Required(ErrorMessage = "新闻类型为必填字段"), MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } + + [Required(ErrorMessage = "新闻链接为必填字段"), MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } + + [Required(ErrorMessage = "新闻日期为必填字段")] public DateTime NewsDate { get; set; } + + [Required(ErrorMessage = "新闻状态为必填字段"), MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } + + [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/DeleteNewsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/DeleteNewsInputDto.cs index 7a34586..e84fbd0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/DeleteNewsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/DeleteNewsInputDto.cs @@ -1,14 +1,10 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class DeleteNewsInputDto : BaseInputDto { + [Required(ErrorMessage = "新闻编号为必填字段"), MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } - public string NewsTitle { get; set; } - public string NewsContent { get; set; } - public string NewsType { get; set; } - public string NewsLink { get; set; } - public DateTime NewsDate { get; set; } - public string NewsStatus { get; set; } - public string NewsImage { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs index 9553087..b1fd39c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs @@ -1,14 +1,29 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class ReadNewsInputDto : ListInputDto { + [MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } + + [MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } + public string NewsContent { get; set; } + + [MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } + + [MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } + public DateTime NewsDate { get; set; } + + [MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } + + [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs index 4a2ea22..9195f1f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs @@ -1,17 +1,35 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class ReadNewsOuputDto : BaseDto { public int Id { get; set; } + + [MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } + + [MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } + public string NewsContent { get; set; } + + [MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } + public string NewsTypeDescription { get; set; } + + [MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } + public DateTime NewsDate { get; set; } + + [MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } + public string NewsStatusDescription { get; set; } + + [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/UpdateNewsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/UpdateNewsInputDto.cs index bbf96d3..f39c5be 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/UpdateNewsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/UpdateNewsInputDto.cs @@ -1,14 +1,31 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class UpdateNewsInputDto : BaseInputDto { + [Required(ErrorMessage = "新闻编号为必填字段"), MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } + + [Required(ErrorMessage = "新闻标题为必填字段"), MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } + + [Required(ErrorMessage = "新闻内容为必填字段")] public string NewsContent { get; set; } + + [Required(ErrorMessage = "新闻类型为必填字段"), MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } + + [Required(ErrorMessage = "新闻链接为必填字段"), MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } + + [Required(ErrorMessage = "新闻日期为必填字段")] public DateTime NewsDate { get; set; } + + [Required(ErrorMessage = "新闻状态为必填字段"), MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } + + [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs index 0e35854..cd185ec 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreatePromotionContentInputDto : BaseInputDto { + [Required(ErrorMessage = "宣传ID为必填字段"), MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } + + [Required(ErrorMessage = "宣传内容为必填字段"), MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs index 0ce9477..1575e51 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeletePromotionContentInputDto : BaseInputDto { + [Required(ErrorMessage = "宣传ID为必填字段"), MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs index 6529fa6..d52a4c1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs @@ -1,9 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadPromotionContentInputDto : ListInputDto { public int PromotionId { get; set; } + + [MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } = string.Empty; + + [MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } = string.Empty; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs index 2906b5a..7d2c7fa 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs @@ -1,9 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadPromotionContentOutputDto : BaseOutputDto { public int Id { get; set; } + + [MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } + + [MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs index 477a9b1..4fb843c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdatePromotionContentInputDto : BaseInputDto { + [Required(ErrorMessage = "宣传ID为必填字段"), MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } + + [Required(ErrorMessage = "宣传内容为必填字段"), MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs index 9bfa66b..a55e001 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs @@ -1,13 +1,28 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateReserInputDto : BaseInputDto { + [Required(ErrorMessage = "预约编号为必填字段"), MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } + + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } + + [Required(ErrorMessage = "预约电话为必填字段"), MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } + + [Required(ErrorMessage = "预约房号为必填字段"), MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } + + [Required(ErrorMessage = "预约渠道为必填字段"), MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } + + [Required(ErrorMessage = "预约起始日期为必填字段")] public DateTime ReservationStartDate { get; set; } + + [Required(ErrorMessage = "预约结束日期为必填字段")] public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs index 43b7094..a7dd39a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteReserInputDto : BaseInputDto { + [Required(ErrorMessage = "预约编号为必填字段"), MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs index c03af87..ac9ef46 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs @@ -1,13 +1,26 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadReserInputDto : ListInputDto { + [MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } + + [MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } + + [MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } + + [MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } + + [MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } + public DateTime ReservationStartDate { get; set; } + public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs index 0f3bd0d..a3e44e1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -1,24 +1,38 @@ using EOM.TSHotelManagement.Common.Util; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadReserOutputDto : BaseOutputDto { public int Id { get; set; } - [UIDisplay("ԤԼ")] + + [UIDisplay("预约编号")] + [MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } - [UIDisplay("ͻ")] + + [UIDisplay("客户姓名")] + [MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } - [UIDisplay("ϵʽ")] + + [UIDisplay("联系方式")] + [MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } - [UIDisplay("")] + + [UIDisplay("预定房号")] + [MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } - [UIDisplay("ԤԼ")] + + [UIDisplay("预约渠道")] + [MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } + public string ReservationChannelDescription { get; set; } - [UIDisplay("ԤԼʼ")] + + [UIDisplay("预约开始时")] public DateTime ReservationStartDate { get; set; } - [UIDisplay("ԤԼֹ")] + + [UIDisplay("预约结束时")] public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs index 1566947..c523660 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs @@ -1,13 +1,28 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateReserInputDto : BaseInputDto { + [Required(ErrorMessage = "预约编号为必填字段"), MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } + + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } + + [Required(ErrorMessage = "预约电话为必填字段"), MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } + + [Required(ErrorMessage = "预约房号为必填字段"), MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } + + [Required(ErrorMessage = "预约渠道为必填字段"), MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } + + [Required(ErrorMessage = "预约起始日期为必填字段")] public DateTime ReservationStartDate { get; set; } + + [Required(ErrorMessage = "预约结束日期为必填字段")] public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs index 00e364e..ae6645e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs @@ -1,17 +1,39 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class CheckinRoomByReservationDto : BaseInputDto { + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } + + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } + public int? CustomerGender { get; set; } + + [Required(ErrorMessage = "护照ID为必填字段")] public int PassportId { get; set; } + + [Required(ErrorMessage = "客户电话为必填字段"), MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } + + [Required(ErrorMessage = "出生日期为必填字段")] public DateOnly DateOfBirth { get; set; } + + [Required(ErrorMessage = "身份证号为必填字段"), MaxLength(128, ErrorMessage = "身份证号长度不超过128字符")] public string IdCardNumber { get; set; } + + [MaxLength(500, ErrorMessage = "客户地址长度不超过500字符")] public string CustomerAddress { get; set; } + + [Required(ErrorMessage = "客户类型为必填字段")] public int CustomerType { get; set; } + + [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } + + [Required(ErrorMessage = "预约编号为必填字段"), MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckoutRoomDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckoutRoomDto.cs index 6584aaf..ec91fe4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckoutRoomDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckoutRoomDto.cs @@ -1,10 +1,19 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class CheckoutRoomDto : BaseInputDto { + [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } + + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } + + [Required(ErrorMessage = "水费为必填字段")] public decimal WaterUsage { get; set; } + + [Required(ErrorMessage = "电费为必填字段")] public decimal ElectricityUsage { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/TransferRoomDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/TransferRoomDto.cs index 2256122..6d7eb63 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/TransferRoomDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/TransferRoomDto.cs @@ -1,11 +1,16 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class TransferRoomDto : BaseInputDto { + [Required(ErrorMessage = "源房间编号为必填字段"), MaxLength(128, ErrorMessage = "源房间编号长度不超过128字符")] public string OriginalRoomNumber { get; set; } + [Required(ErrorMessage = "目标房间编号为必填字段"), MaxLength(128, ErrorMessage = "目标房间编号长度不超过128字符")] public string TargetRoomNumber { get; set; } + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs index 7dbcbc7..6eee042 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs @@ -1,11 +1,22 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateSellThingInputDto : BaseInputDto { + [Required(ErrorMessage = "商品编号为必填字段"), MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } + + [Required(ErrorMessage = "商品名称为必填字段"), MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } + + [Required(ErrorMessage = "商品价格为必填字段")] public decimal ProductPrice { get; set; } + + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } + + [Required(ErrorMessage = "库存数量为必填字段")] public int Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs index 171681d..e29cd97 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs @@ -1,11 +1,20 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteSellThingInputDto : BaseInputDto { + [Required(ErrorMessage = "商品编号为必填字段"), MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } + + [MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } + public decimal ProductPrice { get; set; } + + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs index aee16ab..ae8eeda 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs @@ -1,11 +1,20 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSellThingInputDto : ListInputDto { + [MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } + + [MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } + public decimal ProductPrice { get; set; } + + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs index 78bd59c..dbf28b5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs @@ -1,19 +1,28 @@ using EOM.TSHotelManagement.Common.Util; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadSellThingOutputDto : BaseOutputDto { public int Id { get; set; } - [UIDisplay("Ʒ")] + + [UIDisplay("商品编号")] + [MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } - [UIDisplay("Ʒ")] + + [UIDisplay("商品名称")] + [MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } - [UIDisplay("Ʒ۸")] + + [UIDisplay("商品价格")] public decimal ProductPrice { get; set; } - [UIDisplay("ͺ")] + + [UIDisplay("规格型号")] + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } - [UIDisplay("",true,true)] + + [UIDisplay("库存", true, true)] public int Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs index e9c6ce8..2956373 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs @@ -1,11 +1,22 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateSellThingInputDto : BaseInputDto { + [Required(ErrorMessage = "商品编号为必填字段"), MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } + + [Required(ErrorMessage = "商品名称为必填字段"), MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } + + [Required(ErrorMessage = "商品价格为必填字段")] public decimal ProductPrice { get; set; } + + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } + + [Required(ErrorMessage = "库存数量为必填字段")] public int Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs index 9df35a7..460f8d3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs @@ -1,13 +1,26 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class AddCustomerSpendInputDto { + [Required(ErrorMessage = "房间编号为必填字段")] public string RoomNumber { get; set; } + + [Required(ErrorMessage = "商品编号为必填字段")] public string ProductNumber { get; set; } + + [Required(ErrorMessage = "商品名称为必填字段")] public string ProductName { get; set; } + + [Required(ErrorMessage = "数量为必填字段")] public int Quantity { get; set; } + + [Required(ErrorMessage = "价格为必填字段")] public decimal Price { get; set; } + public string WorkerNo { get; set; } + public string SoftwareVersion { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs index b902cb9..8042836 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs @@ -1,17 +1,35 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateSpendInputDto : BaseInputDto { + [Required(ErrorMessage = "商品编号为必填字段")] public string ProductNumber { get; set; } + + [Required(ErrorMessage = "消费编号为必填字段")] public string SpendNumber { get; set; } + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + + [Required(ErrorMessage = "消费数量为必填字段")] public int ConsumptionQuantity { get; set; } + + [Required(ErrorMessage = "商品单价为必填字段")] public decimal ProductPrice { get; set; } + + [Required(ErrorMessage = "消费金额为必填字段")] public decimal ConsumptionAmount { get; set; } + + [Required(ErrorMessage = "消费时间为必填字段")] public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } + public string ConsumptionType { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs index c283bbc..7148fda 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteSpendInputDto : BaseInputDto { + [Required(ErrorMessage = "房间编号为必填字段")] public string RoomNumber { get; set; } + + [Required(ErrorMessage = "客户编号为必填字段")] public string CustomerNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs index d1c3e19..c1ba60a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs @@ -1,15 +1,25 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSpendInputDto : ListInputDto { public string SpendNumber { get; set; } + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + public int ConsumptionQuantity { get; set; } + public decimal ProductPrice { get; set; } + public decimal ConsumptionAmount { get; set; } + public string SettlementStatus { get; set; } + public DateTime ConsumptionTime { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs index ae09f7f..e26def9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs @@ -1,36 +1,52 @@ using EOM.TSHotelManagement.Common.Util; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadSpendOutputDto : BaseOutputDto { public int Id { get; set; } - [UIDisplay("ѱ", false, false)] + + [UIDisplay("消费编号", false, false)] public string SpendNumber { get; set; } - [UIDisplay("")] + + [UIDisplay("房间号")] public string RoomNumber { get; set; } - [UIDisplay("ͻ")] + + [UIDisplay("客户编号")] public string CustomerNumber { get; set; } - [UIDisplay("Ʒ", false, false)] + + [UIDisplay("商品编号", false, false)] public string ProductNumber { get; set; } - [UIDisplay("Ʒ")] + + [UIDisplay("商品名称")] public string ProductName { get; set; } - [UIDisplay("", true)] + + [UIDisplay("消费数量", true)] public int ConsumptionQuantity { get; set; } - [UIDisplay("Ʒ")] + + [UIDisplay("商品单价")] public decimal ProductPrice { get; set; } + public string ProductPriceFormatted { get; set; } - [UIDisplay("ѽ")] + + [UIDisplay("消费金额")] public decimal ConsumptionAmount { get; set; } + public string ConsumptionAmountFormatted { get; set; } - [UIDisplay("ʱ")] + + [UIDisplay("消费时间")] public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } - [UIDisplay("", false, false)] + + [UIDisplay("消费类型", false, false)] public string ConsumptionType { get; set; } - [UIDisplay("", false, true)] + + [UIDisplay("消费类型", false, true)] public string ConsumptionTypeDescription { get; set; } - [UIDisplay("״̬")] + + [UIDisplay("结算状态")] public string SettlementStatusDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs index d761e65..d01a903 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs @@ -1,17 +1,34 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateSpendInputDto : BaseInputDto { + [Required(ErrorMessage = "消费编号为必填字段")] public string SpendNumber { get; set; } + public string RoomNumber { get; set; } + public string OriginalRoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + + [Required(ErrorMessage = "消费数量为必填字段")] public int ConsumptionQuantity { get; set; } + + [Required(ErrorMessage = "商品单价为必填字段")] public decimal ProductPrice { get; set; } + + [Required(ErrorMessage = "消费金额为必填字段")] public decimal ConsumptionAmount { get; set; } + + [Required(ErrorMessage = "消费时间为必填字段")] public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } + public string ConsumptionType { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj index 88f357f..8dbaaec 100644 --- a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj +++ b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj @@ -10,7 +10,6 @@ - diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs index 0a25e3d..e184d23 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs @@ -1,12 +1,30 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateAdministratorInputDto : BaseInputDto { + [Required(ErrorMessage = "管理员账号为必填字段")] + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Number { get; set; } + + [Required(ErrorMessage = "管理员账号为必填字段")] + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Account { get; set; } + + [Required(ErrorMessage = "管理员密码为必填字段")] + [MaxLength(256, ErrorMessage = "管理员密码长度不超过256字符")] public string Password { get; set; } + + [Required(ErrorMessage = "管理员类型为必填字段")] + [MaxLength(150, ErrorMessage = "管理员类型长度不超过150字符")] public string Type { get; set; } + + [Required(ErrorMessage = "管理员名称为必填字段")] + [MaxLength(200, ErrorMessage = "管理员名称长度不超过200字符")] public string Name { get; set; } + + [Required(ErrorMessage = "是否为超级管理员为必填字段")] public int IsSuperAdmin { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs index 978f3d1..dc2bbfc 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteAdministratorInputDto : BaseInputDto { + [Required(ErrorMessage = "管理员账号为必填字段")] + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Number { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs index 40bd550..b4e988c 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs @@ -1,12 +1,23 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorInputDto : ListInputDto { public int Id { get; set; } + + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Account { get; set; } + + [MaxLength(256, ErrorMessage = "管理员密码长度不超过256字符")] public string Password { get; set; } + + [MaxLength(150, ErrorMessage = "管理员类型长度不超过150字符")] public string Type { get; set; } + + [MaxLength(200, ErrorMessage = "管理员名称长度不超过200字符")] public string Name { get; set; } + public int IsSuperAdmin { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs index 1e6ab26..adc176b 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -1,21 +1,33 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Number { get; set; } + + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Account { get; set; } + + [MaxLength(256, ErrorMessage = "管理员密码长度不超过256字符")] public string Password { get; set; } + + [MaxLength(150, ErrorMessage = "管理员类型长度不超过150字符")] public string Type { get; set; } + + [MaxLength(200, ErrorMessage = "管理员名称长度不超过200字符")] public string Name { get; set; } + public int IsSuperAdmin { get; set; } /// - /// ǷΪԱ (Is Super Administrator Description) + /// �Ƿ�Ϊ��������Ա���� (Is Super Administrator Description) /// public string IsSuperAdminDescription { get; set; } /// - /// Ա (Administrator Type Name) + /// ����Ա�������� (Administrator Type Name) /// public string TypeName { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs index e0eb0ff..eca1dfb 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs @@ -1,12 +1,30 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateAdministratorInputDto : BaseInputDto { + [Required(ErrorMessage = "管理员账号为必填字段")] + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Number { get; set; } + + [Required(ErrorMessage = "管理员账号为必填字段")] + [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Account { get; set; } + + [Required(ErrorMessage = "管理员密码为必填字段")] + [MaxLength(256, ErrorMessage = "管理员密码长度不超过256字符")] public string Password { get; set; } + + [Required(ErrorMessage = "管理员类型为必填字段")] + [MaxLength(150, ErrorMessage = "管理员类型长度不超过150字符")] public string Type { get; set; } + + [Required(ErrorMessage = "管理员名称为必填字段")] + [MaxLength(200, ErrorMessage = "管理员名称长度不超过200字符")] public string Name { get; set; } + + [Required(ErrorMessage = "是否为超级管理员为必填字段")] public int IsSuperAdmin { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs index 7984fc3..d06697c 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs @@ -1,8 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateAdministratorTypeInputDto : BaseInputDto { + [Required(ErrorMessage = "类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "类型编号长度不超过128字符")] public string TypeId { get; set; } + + [Required(ErrorMessage = "类型名称为必填字段")] + [MaxLength(256, ErrorMessage = "类型名称长度不超过256字符")] public string TypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs index 3deabac..9fba73f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteAdministratorTypeInputDto : BaseInputDto { + [Required(ErrorMessage = "类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "类型编号长度不超过128字符")] public string TypeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs index 8c5413b..3f98801 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorTypeInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs index dbeb9ee..496fedf 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorTypeOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "类型编号长度不超过128字符")] public string TypeId { get; set; } + + [MaxLength(256, ErrorMessage = "类型名称长度不超过256字符")] public string TypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs index bdbb5ff..ecc2a8e 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs @@ -1,9 +1,17 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateAdministratorTypeInputDto : BaseInputDto { public int Id { get; set; } + + [Required(ErrorMessage = "类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "类型编号长度不超过128字符")] public string TypeId { get; set; } + + [Required(ErrorMessage = "类型名称为必填字段")] + [MaxLength(256, ErrorMessage = "类型名称长度不超过256字符")] public string TypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs index a0fb2fd..6779bc7 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs @@ -1,12 +1,28 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateAppointmentNoticeInputDto : BaseInputDto { + [Required(ErrorMessage = "公告编号为必填字段")] + [MaxLength(128, ErrorMessage = "公告编号长度不超过128字符")] public string NoticeId { get; set; } + + [Required(ErrorMessage = "公告主题为必填字段")] + [MaxLength(256, ErrorMessage = "公告主题长度不超过256字符")] public string NoticeTheme { get; set; } + + [Required(ErrorMessage = "公告类型为必填字段")] + [MaxLength(150, ErrorMessage = "公告类型长度不超过150字符")] public string NoticeType { get; set; } + + [Required(ErrorMessage = "公告时间为必填字段")] public DateTime NoticeTime { get; set; } + public string NoticeContent { get; set; } + + [Required(ErrorMessage = "发文部门为必填字段")] + [MaxLength(128, ErrorMessage = "发文部门长度不超过128字符")] public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs index 07d311e..b713988 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteAppointmentNoticeInputDto : BaseInputDto { + [Required(ErrorMessage = "公告编号为必填字段")] + [MaxLength(128, ErrorMessage = "公告编号长度不超过128字符")] public string NoticeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs index f523284..5415f06 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs @@ -1,12 +1,22 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeInputDto : ListInputDto { + [MaxLength(128, ErrorMessage = "公告编号长度不超过128字符")] public string NoticeId { get; set; } + + [MaxLength(256, ErrorMessage = "公告主题长度不超过256字符")] public string NoticeTheme { get; set; } + + [MaxLength(150, ErrorMessage = "公告类型长度不超过150字符")] public string NoticeType { get; set; } + public DateTime NoticeTime { get; set; } public string NoticeContent { get; set; } + + [MaxLength(128, ErrorMessage = "发文部门长度不超过128字符")] public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs index 36596af..99ca68a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs @@ -1,12 +1,22 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "公告编号长度不超过128字符")] public string NoticeId { get; set; } + + [MaxLength(256, ErrorMessage = "公告主题长度不超过256字符")] public string NoticeTheme { get; set; } + + [MaxLength(150, ErrorMessage = "公告类型长度不超过150字符")] public string NoticeType { get; set; } + public DateTime NoticeTime { get; set; } public string NoticeContent { get; set; } + + [MaxLength(128, ErrorMessage = "发文部门长度不超过128字符")] public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs index e9d62cd..591e712 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs @@ -1,10 +1,20 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateAppointmentNoticeInputDto : BaseInputDto { + [Required(ErrorMessage = "公告编号为必填字段")] + [MaxLength(128, ErrorMessage = "公告编号长度不超过128字符")] public string NoticeId { get; set; } + + [Required(ErrorMessage = "公告标题为必填字段")] + [MaxLength(256, ErrorMessage = "公告标题长度不超过256字符")] public string NoticeTitle { get; set; } + public string NoticeContent { get; set; } + + [Required(ErrorMessage = "公告日期为必填字段")] public DateTime NoticeDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs index 51a6541..cfcb9b5 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs @@ -1,15 +1,15 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class CreateAppointmentNoticeTypeInputDto : BaseInputDto { - /// - /// 公告类型编号 (AppointmentNotice Type Number) - /// + [Required(ErrorMessage = "公告类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "公告类型编号长度不超过128字符")] public string NoticeTypeNumber { get; set; } - /// - /// 公告类型名称 (AppointmentNotice Type Name) - /// + [Required(ErrorMessage = "公告类型名称为必填字段")] + [MaxLength(200, ErrorMessage = "公告类型名称长度不超过200字符")] public string NoticeTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs index 7f12095..34756d1 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs @@ -1,10 +1,11 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class DeleteAppointmentNoticeTypeInputDto : BaseInputDto { - /// - /// 公告类型编号 (AppointmentNotice Type Number) - /// + [Required(ErrorMessage = "公告类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "公告类型编号长度不超过128字符")] public string NoticeTypeNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs index 20a728b..ea29d4f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs @@ -1,15 +1,13 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeTypeInputDto : ListInputDto { - /// - /// 公告类型编号 (AppointmentNotice Type Number) - /// + [MaxLength(128, ErrorMessage = "公告类型编号长度不超过128字符")] public string NoticeTypeNumber { get; set; } - /// - /// 公告类型名称 (AppointmentNotice Type Name) - /// + [MaxLength(200, ErrorMessage = "公告类型名称长度不超过200字符")] public string NoticeTypeName { get; set; } = string.Empty; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs index dd6fbb9..2dba787 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs @@ -1,35 +1,19 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeTypeOutputDto : BaseOutputDto { - /// - /// 公告类型编号 (AppointmentNotice Type Number) - /// + [MaxLength(128, ErrorMessage = "公告类型编号长度不超过128字符")] public string NoticeTypeNumber { get; set; } - /// - /// 公告类型名称 (AppointmentNotice Type Name) - /// + [MaxLength(200, ErrorMessage = "公告类型名称长度不超过200字符")] public string NoticeTypeName { get; set; } - /// - /// 删除标识 - /// + public int? IsDelete { get; set; } = 0; - /// - /// 资料创建人 - /// public string DataInsUsr { get; set; } - /// - /// 资料创建时间 - /// public DateTime? DataInsDate { get; set; } - /// - /// 资料更新人 - /// public string DataChgUsr { get; set; } - /// - /// 资料更新时间 - /// public DateTime? DataChgDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs index bacbfcb..64de8ec 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs @@ -1,15 +1,15 @@ -namespace EOM.TSHotelManagement.Common.Contract +using System.ComponentModel.DataAnnotations; + +namespace EOM.TSHotelManagement.Common.Contract { public class UpdateAppointmentNoticeTypeInputDto : BaseInputDto { - /// - /// 公告类型编号 (AppointmentNotice Type Number) - /// + [Required(ErrorMessage = "公告类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "公告类型编号长度不超过128字符")] public string NoticeTypeNumber { get; set; } - /// - /// 公告类型名称 (AppointmentNotice Type Name) - /// + [Required(ErrorMessage = "公告类型名称为必填字段")] + [MaxLength(200, ErrorMessage = "公告类型名称长度不超过200字符")] public string NoticeTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs index 398f0f3..2481143 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs @@ -1,15 +1,35 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateDepartmentInputDto : BaseInputDto { public int Id { get; set; } + + [Required(ErrorMessage = "部门编号为必填字段")] + [MaxLength(128, ErrorMessage = "部门编号长度不超过128字符")] public string DepartmentNumber { get; set; } + + [Required(ErrorMessage = "部门名称为必填字段")] + [MaxLength(256, ErrorMessage = "部门名称长度不超过256字符")] public string DepartmentName { get; set; } + + [MaxLength(500, ErrorMessage = "部门描述长度不超过500字符")] public string DepartmentDescription { get; set; } + public DateOnly DepartmentCreationDate { get; set; } + + [Required(ErrorMessage = "部门主管为必填字段")] + [MaxLength(128, ErrorMessage = "部门主管长度不超过128字符")] public string DepartmentLeader { get; set; } + + [MaxLength(200, ErrorMessage = "部门主管姓名长度不超过200字符")] public string LeaderName { get; set; } + + [MaxLength(128, ErrorMessage = "上级部门编号长度不超过128字符")] public string ParentDepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "上级部门名称长度不超过256字符")] public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs index 0f98c55..65d9e04 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs @@ -1,15 +1,33 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteDepartmentInputDto : BaseInputDto { public int Id { get; set; } + + [Required(ErrorMessage = "部门编号为必填字段")] + [MaxLength(128, ErrorMessage = "部门编号长度不超过128字符")] public string DepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "部门名称长度不超过256字符")] public string DepartmentName { get; set; } + + [MaxLength(500, ErrorMessage = "部门描述长度不超过500字符")] public string DepartmentDescription { get; set; } + public DateTime DepartmentCreationDate { get; set; } + + [MaxLength(128, ErrorMessage = "部门主管长度不超过128字符")] public string DepartmentLeader { get; set; } + + [MaxLength(200, ErrorMessage = "部门主管姓名长度不超过200字符")] public string LeaderName { get; set; } + + [MaxLength(128, ErrorMessage = "上级部门编号长度不超过128字符")] public string ParentDepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "上级部门名称长度不超过256字符")] public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs index 578c763..1922557 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs @@ -1,16 +1,34 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadDepartmentInputDto : ListInputDto { public int Id { get; set; } + + [MaxLength(128, ErrorMessage = "部门编号长度不超过128字符")] public string DepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "部门名称长度不超过256字符")] public string DepartmentName { get; set; } + + [MaxLength(500, ErrorMessage = "部门描述长度不超过500字符")] public string DepartmentDescription { get; set; } + public DateOnly DepartmentCreationDate { get; set; } + + [MaxLength(128, ErrorMessage = "部门主管长度不超过128字符")] public string DepartmentLeader { get; set; } + + [MaxLength(200, ErrorMessage = "部门主管姓名长度不超过200字符")] public string LeaderName { get; set; } + + [MaxLength(128, ErrorMessage = "上级部门编号长度不超过128字符")] public string ParentDepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "上级部门名称长度不超过256字符")] public string ParentDepartmentName { get; set; } + public DateTime? DepartmentCreationDateStart { get; set; } public DateTime? DepartmentCreationDateEnd { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs index dd9722c..54dca09 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs @@ -1,14 +1,30 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadDepartmentOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "部门编号长度不超过128字符")] public string DepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "部门名称长度不超过256字符")] public string DepartmentName { get; set; } + + [MaxLength(500, ErrorMessage = "部门描述长度不超过500字符")] public string DepartmentDescription { get; set; } + public DateOnly DepartmentCreationDate { get; set; } + + [MaxLength(128, ErrorMessage = "部门主管长度不超过128字符")] public string DepartmentLeader { get; set; } + + [MaxLength(200, ErrorMessage = "部门主管姓名长度不超过200字符")] public string LeaderName { get; set; } + + [MaxLength(128, ErrorMessage = "上级部门编号长度不超过128字符")] public string ParentDepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "上级部门名称长度不超过256字符")] public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs index 79af88a..54b3897 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs @@ -1,14 +1,33 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateDepartmentInputDto : BaseInputDto { + [Required(ErrorMessage = "部门编号为必填字段")] + [MaxLength(128, ErrorMessage = "部门编号长度不超过128字符")] public string DepartmentNumber { get; set; } + + [Required(ErrorMessage = "部门名称为必填字段")] + [MaxLength(256, ErrorMessage = "部门名称长度不超过256字符")] public string DepartmentName { get; set; } + + [MaxLength(500, ErrorMessage = "部门描述长度不超过500字符")] public string DepartmentDescription { get; set; } + public DateOnly DepartmentCreationDate { get; set; } + + [Required(ErrorMessage = "部门主管为必填字段")] + [MaxLength(128, ErrorMessage = "部门主管长度不超过128字符")] public string DepartmentLeader { get; set; } + + [MaxLength(200, ErrorMessage = "部门主管姓名长度不超过200字符")] public string LeaderName { get; set; } + + [MaxLength(128, ErrorMessage = "上级部门编号长度不超过128字符")] public string ParentDepartmentNumber { get; set; } + + [MaxLength(256, ErrorMessage = "上级部门名称长度不超过256字符")] public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs index e212c54..74a6f3b 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs @@ -1,11 +1,20 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateMenuInputDto : BaseInputDto { + [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string Key { get; set; } + + [Required(ErrorMessage = "菜单标题为必填字段")] + [MaxLength(256, ErrorMessage = "菜单标题长度不超过256字符")] public string Title { get; set; } + public string Path { get; set; } public int? Parent { get; set; } + + [MaxLength(256, ErrorMessage = "菜单图标长度不超过256字符")] public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs index b235025..71623e2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs @@ -1,11 +1,19 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteMenuInputDto : BaseInputDto { + [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string Key { get; set; } + + [MaxLength(256, ErrorMessage = "菜单标题长度不超过256字符")] public string Title { get; set; } + public string Path { get; set; } public int? Parent { get; set; } + + [MaxLength(256, ErrorMessage = "菜单图标长度不超过256字符")] public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs index 673e649..0ada6fd 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadMenuInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs index 12213da..563702e 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs @@ -1,11 +1,19 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadMenuOutputDto : BaseOutputDto { + [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string Key { get; set; } + + [MaxLength(256, ErrorMessage = "菜单标题长度不超过256字符")] public string Title { get; set; } + public string Path { get; set; } public int? Parent { get; set; } + + [MaxLength(256, ErrorMessage = "菜单图标长度不超过256字符")] public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs index bfb5dac..0921ac2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs @@ -1,11 +1,20 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateMenuInputDto : BaseInputDto { + [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string Key { get; set; } + + [Required(ErrorMessage = "菜单标题为必填字段")] + [MaxLength(256, ErrorMessage = "菜单标题长度不超过256字符")] public string Title { get; set; } + public string Path { get; set; } public int? Parent { get; set; } + + [MaxLength(256, ErrorMessage = "菜单图标长度不超过256字符")] public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs index 5f67972..71e1805 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs @@ -1,8 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateNationInputDto : BaseInputDto { + [Required(ErrorMessage = "民族编号为必填字段")] + [MaxLength(128, ErrorMessage = "民族编号长度不超过128字符")] public string NationNumber { get; set; } + + [Required(ErrorMessage = "民族名称为必填字段")] + [MaxLength(50, ErrorMessage = "民族名称长度不超过50字符")] public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs index 6f8e626..7cf88d0 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteNationInputDto : BaseInputDto { public int NationId { get; set; } + + [Required(ErrorMessage = "民族编号为必填字段")] + [MaxLength(128, ErrorMessage = "民族编号长度不超过128字符")] public string NationNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs index 17701e0..c6bb6da 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs @@ -1,8 +1,12 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadNationInputDto : ListInputDto { public int NationId { get; set; } + + [MaxLength(50, ErrorMessage = "民族名称长度不超过50字符")] public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs index dfa7f51..57f1f4b 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadNationOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "民族编号长度不超过128字符")] public string NationNumber { get; set; } + + [MaxLength(50, ErrorMessage = "民族名称长度不超过50字符")] public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs index 58badd9..3618b94 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs @@ -1,8 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateNationInputDto : BaseInputDto { + [Required(ErrorMessage = "民族编号为必填字段")] + [MaxLength(128, ErrorMessage = "民族编号长度不超过128字符")] public string NationNumber { get; set; } + + [Required(ErrorMessage = "民族名称为必填字段")] + [MaxLength(50, ErrorMessage = "民族名称长度不超过50字符")] public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs index b26f7fa..8f45820 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs @@ -1,20 +1,15 @@ +using System.ComponentModel.DataAnnotations; using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission { - /// - /// 为指定用户分配“直接权限”(通过专属角色 R-USER-{UserNumber} 写入 RolePermission) - /// public class AssignUserPermissionsInputDto : BaseInputDto { - /// - /// 用户编码 - /// + [Required(ErrorMessage = "用户编码为必填字段")] + [MaxLength(128, ErrorMessage = "用户编码长度不超过128字符")] public string UserNumber { get; set; } = null!; - /// - /// 目标权限编码集合(全量覆盖) - /// + [Required(ErrorMessage = "权限编码集合为必填字段")] public List PermissionNumbers { get; set; } = new List(); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs index 43d270b..152fc11 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs @@ -1,21 +1,16 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission { - /// - /// 赋权请求入参(为角色授予一组权限码) - /// public class GrantRolePermissionsInputDto : BaseInputDto { - /// - /// 角色编码 - /// + [Required(ErrorMessage = "角色编码为必填字段")] + [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } - /// - /// 权限编码集合(如:system:role:list、system:role:create) - /// + [Required(ErrorMessage = "权限编码集合为必填字段")] public List PermissionNumbers { get; set; } = new List(); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs index 691942b..ebcab12 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs @@ -1,61 +1,69 @@ +using System.ComponentModel.DataAnnotations; using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Common.Contract { - /// - /// 查询权限列表 入参 - /// public class ReadPermissionInputDto : ListInputDto { - /// - /// 权限编码(模糊) - /// + [MaxLength(128, ErrorMessage = "权限编码长度不超过128字符")] public string? PermissionNumber { get; set; } - /// - /// 权限名称(模糊) - /// + [MaxLength(200, ErrorMessage = "权限名称长度不超过200字符")] public string? PermissionName { get; set; } - /// - /// 所属菜单键(精确) - /// + [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string? MenuKey { get; set; } - /// - /// 所属模块(精确) - /// + [MaxLength(128, ErrorMessage = "所属模块长度不超过128字符")] public string? Module { get; set; } } - /// - /// 查询权限列表 出参 - /// public class ReadPermissionOutputDto : BaseOutputDto { - /// - /// 权限编码 - /// + [MaxLength(128, ErrorMessage = "权限编码长度不超过128字符")] public string PermissionNumber { get; set; } = null!; - /// - /// 权限名称 - /// + [MaxLength(200, ErrorMessage = "权限名称长度不超过200字符")] public string PermissionName { get; set; } = string.Empty; - /// - /// 所属模块 - /// + [MaxLength(128, ErrorMessage = "所属模块长度不超过128字符")] public string? Module { get; set; } - /// - /// 所属菜单键(用于前端按菜单归类展示) - /// + [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string? MenuKey { get; set; } - /// - /// 描述 - /// + [MaxLength(500, ErrorMessage = "描述长度不超过500字符")] public string? Description { get; set; } } +} + +/// +/// 查询权限列表 出参 +/// +public class ReadPermissionOutputDto : BaseOutputDto +{ + /// + /// 权限编码 + /// + public string PermissionNumber { get; set; } = null!; + + /// + /// 权限名称 + /// + public string PermissionName { get; set; } = string.Empty; + + /// + /// 所属模块 + /// + public string? Module { get; set; } + + /// + /// 所属菜单键(用于前端按菜单归类展示) + /// + public string? MenuKey { get; set; } + + /// + /// 描述 + /// + public string? Description { get; set; } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs index b2db773..18b8be1 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs @@ -1,35 +1,23 @@ +using System.ComponentModel.DataAnnotations; using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission { - /// - /// 用户的角色-权限明细(从 RolePermission 关联并联到 Permission) - /// public class UserRolePermissionOutputDto : BaseOutputDto { - /// - /// 角色编码 - /// + [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; - /// - /// 权限编码(Permission.PermissionNumber) - /// + [MaxLength(128, ErrorMessage = "权限编码长度不超过128字符")] public string PermissionNumber { get; set; } = null!; - /// - /// 权限名称(Permission.PermissionName) - /// + [MaxLength(200, ErrorMessage = "权限名称长度不超过200字符")] public string? PermissionName { get; set; } - /// - /// 菜单键(Permission.MenuKey),方便在前端按菜单归类展示 - /// + [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string? MenuKey { get; set; } - /// - /// 菜单名称,方便在前端按菜单归类展示 - /// + [MaxLength(256, ErrorMessage = "菜单名称长度不超过256字符")] public string? MenuName { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs index 53428be..3832cc9 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeletePositionInputDto : BaseInputDto { + [Required(ErrorMessage = "职位编号为必填字段")] + [MaxLength(128, ErrorMessage = "职位编号长度不超过128字符")] public string PositionNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs index 360b714..da51ba3 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs @@ -1,8 +1,12 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadPositionInputDto : ListInputDto { public int PositionId { get; set; } + + [MaxLength(200, ErrorMessage = "职位名称长度不超过200字符")] public string PositionName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs index 5708caa..77fdd4d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadPositionOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "职位编号长度不超过128字符")] public string PositionNumber { get; set; } + + [MaxLength(200, ErrorMessage = "职位名称长度不超过200字符")] public string PositionName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs index 98fc2d5..e52b856 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs @@ -1,10 +1,19 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdatePositionInputDto : BaseInputDto { public int PositionId { get; set; } + + [Required(ErrorMessage = "职位编号为必填字段")] + [MaxLength(128, ErrorMessage = "职位编号长度不超过128字符")] public string PositionNumber { get; set; } + + [Required(ErrorMessage = "职位名称为必填字段")] + [MaxLength(200, ErrorMessage = "职位名称长度不超过200字符")] public string PositionName { get; set; } + public string PositionDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs index edb2d51..b05e72b 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs @@ -1,8 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateEducationInputDto : BaseInputDto { + [Required(ErrorMessage = "学历编号为必填字段")] + [MaxLength(128, ErrorMessage = "学历编号长度不超过128字符")] public string EducationNumber { get; set; } + + [Required(ErrorMessage = "学历名称为必填字段")] + [MaxLength(200, ErrorMessage = "学历名称长度不超过200字符")] public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs index ce86d27..627fc56 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEducationInputDto : BaseInputDto { + [Required(ErrorMessage = "学历编号为必填字段")] + [MaxLength(128, ErrorMessage = "学历编号长度不超过128字符")] public string EducationNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs index b1e9f30..cf955e4 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEducationInputDto : ListInputDto { + [MaxLength(128, ErrorMessage = "学历编号长度不超过128字符")] public string EducationNumber { get; set; } + + [MaxLength(200, ErrorMessage = "学历名称长度不超过200字符")] public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs index 2600f67..89df82a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs @@ -1,8 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEducationOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "学历编号长度不超过128字符")] public string EducationNumber { get; set; } + + [MaxLength(200, ErrorMessage = "学历名称长度不超过200字符")] public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs index 347c9aa..2fd342a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs @@ -1,8 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEducationInputDto : BaseInputDto { + [Required(ErrorMessage = "学历编号为必填字段")] + [MaxLength(128, ErrorMessage = "学历编号长度不超过128字符")] public string EducationNumber { get; set; } + + [Required(ErrorMessage = "学历名称为必填字段")] + [MaxLength(200, ErrorMessage = "学历名称长度不超过200字符")] public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs index b9d535f..224ccd3 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs @@ -1,20 +1,15 @@ using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { - /// - /// 为用户分配角色(全量覆盖式) - /// public class AssignUserRolesInputDto : BaseInputDto { - /// - /// 用户编码(即管理员表的 Number / SerialNumber) - /// + [Required(ErrorMessage = "用户编码为必填字段")] + [MaxLength(128, ErrorMessage = "用户编码长度不超过128字符")] public string UserNumber { get; set; } = null!; - /// - /// 角色编码集合 - /// + [Required(ErrorMessage = "角色编码集合为必填字段")] public List RoleNumbers { get; set; } = new List(); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs index 761488d..9766d67 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs @@ -1,23 +1,18 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateRoleInputDto : BaseInputDto { - /// - /// ע:ɫ - /// Ĭֵ: - /// + [Required(ErrorMessage = "角色编码为必填字段")] + [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [Required(ErrorMessage = "角色名称为必填字段")] + [MaxLength(200, ErrorMessage = "角色名称长度不超过200字符")] public string RoleName { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(500, ErrorMessage = "角色描述长度不超过500字符")] public string? RoleDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs index 63174f6..a2ca479 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs @@ -1,11 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteRoleInputDto : BaseInputDto { - /// - /// ע:ɫ - /// Ĭֵ: - /// + [Required(ErrorMessage = "角色编码为必填字段")] + [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs index 6a7bba9..86aff47 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs @@ -1,23 +1,16 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoleInputDto : ListInputDto { - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(200, ErrorMessage = "角色名称长度不超过200字符")] public string RoleName { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(500, ErrorMessage = "角色描述长度不超过500字符")] public string? RoleDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs index 3da4e1e..66475ec 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs @@ -1,23 +1,16 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoleOutputDto : BaseOutputDto { - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(200, ErrorMessage = "角色名称长度不超过200字符")] public string RoleName { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(500, ErrorMessage = "角色描述长度不超过500字符")] public string? RoleDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs index e34795c..2a3f90a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs @@ -1,23 +1,18 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateRoleInputDto : BaseInputDto { - /// - /// ע:ɫ - /// Ĭֵ: - /// + [Required(ErrorMessage = "角色编码为必填字段")] + [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [Required(ErrorMessage = "角色名称为必填字段")] + [MaxLength(200, ErrorMessage = "角色名称长度不超过200字符")] public string RoleName { get; set; } = null!; - /// - /// ע:ɫ - /// Ĭֵ: - /// + [MaxLength(500, ErrorMessage = "角色描述长度不超过500字符")] public string? RoleDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs index 5670609..c120910 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs @@ -1,14 +1,26 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateSupervisionStatisticsInputDto : BaseInputDto { + [Required(ErrorMessage = "统计编号为必填字段")] + [MaxLength(128, ErrorMessage = "统计编号长度不超过128字符")] public string StatisticsNumber { get; set; } + + [MaxLength(128, ErrorMessage = "监督部门长度不超过128字符")] public string SupervisingDepartment { get; set; } + + [MaxLength(200, ErrorMessage = "监督部门名称长度不超过200字符")] public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } public string SupervisionLoss { get; set; } public int SupervisionScore { get; set; } + + [MaxLength(128, ErrorMessage = "监督统计事长度不超过128字符")] public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs index 516fcb8..6394345 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs @@ -1,14 +1,26 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteSupervisionStatisticsInputDto : BaseInputDto { + [Required(ErrorMessage = "统计编号为必填字段")] + [MaxLength(128, ErrorMessage = "统计编号长度不超过128字符")] public string StatisticsNumber { get; set; } + + [MaxLength(128, ErrorMessage = "监督部门长度不超过128字符")] public string SupervisingDepartment { get; set; } + + [MaxLength(200, ErrorMessage = "监督部门名称长度不超过200字符")] public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } public string SupervisionLoss { get; set; } public int SupervisionScore { get; set; } + + [MaxLength(128, ErrorMessage = "监督统计事长度不超过128字符")] public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs index 371789a..af34322 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs @@ -1,14 +1,25 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSupervisionStatisticsInputDto : ListInputDto { + [MaxLength(128, ErrorMessage = "统计编号长度不超过128字符")] public string StatisticsNumber { get; set; } + + [MaxLength(128, ErrorMessage = "监督部门长度不超过128字符")] public string SupervisingDepartment { get; set; } + + [MaxLength(200, ErrorMessage = "监督部门名称长度不超过200字符")] public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } public string SupervisionLoss { get; set; } public int SupervisionScore { get; set; } + + [MaxLength(128, ErrorMessage = "监督统计事长度不超过128字符")] public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs index 7a6172c..558e612 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs @@ -1,14 +1,25 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSupervisionStatisticsOutputDto : BaseOutputDto { + [MaxLength(128, ErrorMessage = "统计编号长度不超过128字符")] public string StatisticsNumber { get; set; } + + [MaxLength(128, ErrorMessage = "监督部门长度不超过128字符")] public string SupervisingDepartment { get; set; } + + [MaxLength(200, ErrorMessage = "监督部门名称长度不超过200字符")] public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } public string SupervisionLoss { get; set; } public int SupervisionScore { get; set; } + + [MaxLength(128, ErrorMessage = "监督统计事长度不超过128字符")] public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs index 0bdde34..3057322 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs @@ -1,14 +1,26 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateSupervisionStatisticsInputDto : BaseInputDto { + [Required(ErrorMessage = "统计编号为必填字段")] + [MaxLength(128, ErrorMessage = "统计编号长度不超过128字符")] public string StatisticsNumber { get; set; } + + [MaxLength(128, ErrorMessage = "监督部门长度不超过128字符")] public string SupervisingDepartment { get; set; } + + [MaxLength(200, ErrorMessage = "监督部门名称长度不超过200字符")] public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } public string SupervisionLoss { get; set; } public int SupervisionScore { get; set; } + + [MaxLength(128, ErrorMessage = "监督统计事长度不超过128字符")] public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs index 9c0b760..2968f22 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs @@ -1,9 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateSystemInformationInputDto : BaseInputDto { + [MaxLength(256, ErrorMessage = "信息标题长度不超过256字符")] public string InformationTitle { get; set; } + public string InformationContent { get; set; } + + [Required(ErrorMessage = "信息日期为必填字段")] public DateTime InformationDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs index ff0c488..f653384 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteSystemInformationInputDto : BaseInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs index aca3569..8aa7d85 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSystemInformationInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs index dcbabe2..ba13c63 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs @@ -1,8 +1,12 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSystemInformationOutputDto : BaseOutputDto { public int UrlNumber { get; set; } + + [MaxLength(500, ErrorMessage = "信息内容长度不超过500字符")] public string UrlAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs index 534ccd0..418e191 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs @@ -1,10 +1,17 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateSystemInformationInputDto : BaseInputDto { public int InformationId { get; set; } + + [MaxLength(256, ErrorMessage = "信息标题长度不超过256字符")] public string InformationTitle { get; set; } + public string InformationContent { get; set; } + + [Required(ErrorMessage = "信息日期为必填字段")] public DateTime InformationDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs index dc91fc6..a314ec7 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs @@ -1,15 +1,23 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateVipLevelRuleInputDto : BaseInputDto { public int Id { get; set; } + [Required(ErrorMessage = "会员规则流水号为必填字段")] + [MaxLength(128, ErrorMessage = "会员规则流水号长度不超过128字符")] public string RuleSerialNumber { get; set; } + [Required(ErrorMessage = "会员规则名称为必填字段")] + [MaxLength(200, ErrorMessage = "会员规则名称长度不超过200字符")] public string RuleName { get; set; } + [Required(ErrorMessage = "会员规则值为必填字段")] public decimal RuleValue { get; set; } + [Required(ErrorMessage = "VIP等级ID为必填字段")] public int VipLevelId { get; set; } public string VipLevelName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs index 44187cf..6a8ae9d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs @@ -1,17 +1,20 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteVipLevelRuleInputDto : BaseInputDto { public int Id { get; set; } + [Required(ErrorMessage = "会员规则流水号为必填字段")] + [MaxLength(128, ErrorMessage = "会员规则流水号长度不超过128字符")] public string RuleSerialNumber { get; set; } + [MaxLength(200, ErrorMessage = "会员规则名称长度不超过200字符")] public string RuleName { get; set; } public decimal RuleValue { get; set; } - public int VipLevelId { get; set; } - public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs index 306aa32..5af732a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs @@ -1,8 +1,12 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadVipLevelRuleInputDto : ListInputDto { public int RuleId { get; set; } + + [MaxLength(128, ErrorMessage = "会员规则流水号长度不超过128字符")] public string RuleSerialNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs index 8e2cfea..5ad6d75 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs @@ -1,16 +1,19 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadVipLevelRuleOutputDto : BaseOutputDto { - + [MaxLength(128, ErrorMessage = "会员规则流水号长度不超过128字符")] public string RuleSerialNumber { get; set; } + [MaxLength(200, ErrorMessage = "会员规则名称长度不超过200字符")] public string RuleName { get; set; } public decimal RuleValue { get; set; } - public int VipLevelId { get; set; } + [MaxLength(256, ErrorMessage = "VIP等级名称长度不超过256字符")] public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs index 9174513..16ad576 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs @@ -1,15 +1,23 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateVipLevelRuleInputDto : BaseInputDto { public int Id { get; set; } + [Required(ErrorMessage = "会员规则流水号为必填字段")] + [MaxLength(128, ErrorMessage = "会员规则流水号长度不超过128字符")] public string RuleSerialNumber { get; set; } + [Required(ErrorMessage = "会员规则名称为必填字段")] + [MaxLength(200, ErrorMessage = "会员规则名称长度不超过200字符")] public string RuleName { get; set; } + [Required(ErrorMessage = "会员规则值为必填字段")] public decimal RuleValue { get; set; } + [Required(ErrorMessage = "VIP等级ID为必填字段")] public int VipLevelId { get; set; } public string VipLevelName { get; set; } -- Gitee From af0926fa30e72145b7582fd2df159b5819524893 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 29 Nov 2025 19:08:36 +0800 Subject: [PATCH 14/21] add data validate rule. --- DTO_VALIDATION_QUICK_REFERENCE.md | 100 +++++++++++++ DTO_VALIDATION_UPDATES.md | 137 +++++++++++++++++ .../NavBar/Dto/ReadNavBarInputDto.cs | 3 +- .../NavBar/Dto/ReadNavBarOutputDto.cs | 8 +- .../Asset/Dto/Asset/ReadAssetInputDto.cs | 3 +- .../Asset/Dto/Asset/ReadAssetOutputDto.cs | 12 +- .../Dto/CustoType/ReadCustoTypeInputDto.cs | 3 +- .../Dto/CustoType/ReadCustoTypeOutputDto.cs | 3 +- .../Dto/Customer/ReadCustomerInputDto.cs | 9 +- .../Dto/Customer/ReadCustomerOutputDto.cs | 7 +- .../ReadCustomerAccountInputDto.cs | 2 +- .../PassportType/ReadPassportTypeInputDto.cs | 3 +- .../PassportType/ReadPassportTypeOutputDto.cs | 3 +- .../Dto/ReadEnergyManagementInputDto.cs | 6 +- .../Dto/ReadEnergyManagementOutputDto.cs | 16 +- .../Business/News/Dto/ReadNewsInputDto.cs | 11 -- .../Business/News/Dto/ReadNewsOuputDto.cs | 12 -- .../Dto/ReadPromotionContentInputDto.cs | 6 +- .../Dto/ReadPromotionContentOutputDto.cs | 6 +- .../Business/Reser/Dto/ReadReserInputDto.cs | 11 +- .../Business/Reser/Dto/ReadReserOutputDto.cs | 7 +- .../Room/Dto/Room/ReadRoomInputDto.cs | 3 +- .../Room/Dto/Room/ReadRoomOutputDto.cs | 3 +- .../Dto/RoomState/ReadRoomStateInputDto.cs | 3 +- .../Dto/RoomState/ReadRoomStateOutputDto.cs | 3 +- .../Room/Dto/RoomType/ReadRoomTypeInputDto.cs | 3 +- .../Dto/RoomType/ReadRoomTypeOutputDto.cs | 3 +- .../Sellthing/Dto/ReadSellThingInputDto.cs | 7 +- .../Sellthing/Dto/ReadSellThingOutputDto.cs | 5 +- .../Spend/Dto/Spend/ReadSpendInputDto.cs | 3 +- .../Spend/Dto/Spend/ReadSpendOutputDto.cs | 3 +- .../Dto/Employee/CreateEmployeeInputDto.cs | 44 ++++++ .../Dto/Employee/DeleteEmployeeInputDto.cs | 4 + .../Dto/Employee/ReadEmployeeInputDto.cs | 4 + .../Dto/Employee/ReadEmployeeOutputDto.cs | 13 +- .../Dto/Employee/UpdateEmployeeInputDto.cs | 46 ++++++ .../CreateEmployeeCheckInputDto.cs | 19 ++- .../DeleteEmployeeCheckInputDto.cs | 3 + .../ReadEmployeeCheckInputDto.cs | 2 + .../ReadEmployeeCheckOutputDto.cs | 4 + .../UpdateEmployeeCheckInputDto.cs | 10 ++ .../CreateEmployeeHistoryInputDto.cs | 11 ++ .../DeleteEmployeeHistoryInputDto.cs | 3 + .../ReadEmployeeHistoryInputDto.cs | 2 + .../ReadEmployeeHistoryOutputDto.cs | 4 + .../UpdateEmployeeHistoryInputDto.cs | 12 ++ .../CreateEmployeePhotoInputDto.cs | 6 + .../DeleteEmployeePhotoInputDto.cs | 6 + .../ReadEmployeePhotoInputDto.cs | 2 + .../ReadEmployeePhotoOutputDto.cs | 2 + .../UpdateEmployeePhotoInputDto.cs | 8 + .../CreateEmployeeRewardPunishmentInputDto.cs | 11 ++ .../DeleteEmployeeRewardPunishmentInputDto.cs | 3 + .../ReadEmployeeRewardPunishmentInputDto.cs | 2 + .../ReadEmployeeRewardPunishmentOutputDto.cs | 3 + .../UpdateEmployeeRewardPunishmentInputDto.cs | 12 ++ .../CreateRewardPunishmentTypeInputDto.cs | 4 + .../DeleteRewardPunishmentTypeInputDto.cs | 4 + .../ReadRewardPunishmentTypeInputDto.cs | 2 + .../ReadRewardPunishmentTypeOutputDto.cs | 2 + .../UpdateRewardPunishmentTypeInputDto.cs | 7 + .../ReadAdministratorInputDto.cs | 10 +- .../ReadAdministratorOutputDto.cs | 15 +- .../ReadAdministratorTypeInputDto.cs | 3 +- .../ReadAdministratorTypeOutputDto.cs | 5 +- .../ReadAppointmentNoticeInputDto.cs | 9 +- .../ReadAppointmentNoticeOutputDto.cs | 9 +- .../ReadAppointmentNoticeTypeInputDto.cs | 3 - .../ReadAppointmentNoticeTypeOutputDto.cs | 3 - .../Dto/Department/ReadDepartmentInputDto.cs | 16 +- .../Dto/Department/ReadDepartmentOutputDto.cs | 15 +- .../Dto/Menu/ReadMenuInputDto.cs | 3 +- .../Dto/Menu/ReadMenuOutputDto.cs | 7 +- .../Dto/Nation/ReadNationInputDto.cs | 4 +- .../Dto/Nation/ReadNationOutputDto.cs | 5 +- .../Dto/Permission/ReadPermissionDtos.cs | 31 ---- .../Dto/Position/ReadPositionInputDto.cs | 4 +- .../Dto/Position/ReadPositionOutputDto.cs | 5 +- .../Qualification/ReadEducationInputDto.cs | 5 +- .../Qualification/ReadEducationOutputDto.cs | 5 +- .../Dto/Role/ReadRoleInputDto.cs | 7 +- .../Dto/Role/ReadRoleOutputDto.cs | 7 +- .../ReadSupervisionStatisticsInputDto.cs | 9 +- .../ReadSupervisionStatisticsOutputDto.cs | 9 +- .../ReadSystemInformationInputDto.cs | 3 +- .../ReadSystemInformationOutputDto.cs | 4 +- .../VipLevelRule/ReadVipLevelRuleInputDto.cs | 4 +- .../VipLevelRule/ReadVipLevelRuleOutputDto.cs | 7 +- .../ReadApplicationVersionInputDto.cs | 3 +- .../ReadApplicationVersionOutputDto.cs | 3 +- .../Util/Dto/CardCode/ReadCardCodeInputDto.cs | 3 +- .../Dto/CardCode/ReadCardCodeOutputDto.cs | 3 +- .../Dto/Dashboard/HumanResourcesOutputDto.cs | 2 +- .../Dto/Dashboard/RoomStatisticsOutputDto.cs | 4 + .../OperationLog/ReadOperationLogInputDto.cs | 3 +- .../OperationLog/ReadOperationLogOutputDto.cs | 15 +- .../Dto/RequestLog/ReadRequestLogInputDto.cs | 2 +- .../Dto/RequestLog/ReadRequestLogOutputDto.cs | 2 +- add_validation_attributes.ps1 | 141 ++++++++++++++++++ 99 files changed, 706 insertions(+), 341 deletions(-) create mode 100644 DTO_VALIDATION_QUICK_REFERENCE.md create mode 100644 DTO_VALIDATION_UPDATES.md create mode 100644 add_validation_attributes.ps1 diff --git a/DTO_VALIDATION_QUICK_REFERENCE.md b/DTO_VALIDATION_QUICK_REFERENCE.md new file mode 100644 index 0000000..5574f8e --- /dev/null +++ b/DTO_VALIDATION_QUICK_REFERENCE.md @@ -0,0 +1,100 @@ +# Contract 层 DTO 验证特性快速参考 + +## 已修改的 DTO 文件列表 + +### News(新闻模块) +| Dto 类名 | 文件路径 | 修改状态 | +|---------|--------|--------| +| AddNewsInputDto | Business/News/Dto/AddNewsInputDto.cs | ✅ | +| UpdateNewsInputDto | Business/News/Dto/UpdateNewsInputDto.cs | ✅ | +| DeleteNewsInputDto | Business/News/Dto/DeleteNewsInputDto.cs | ✅ | +| ReadNewsInputDto | Business/News/Dto/ReadNewsInputDto.cs | ✅ | + +### EnergyManagement(水电管理模块) +| Dto 类名 | 文件路径 | 修改状态 | +|---------|--------|--------| +| CreateEnergyManagementInputDto | Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs | ✅ | +| UpdateEnergyManagementInputDto | Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs | ✅ | +| DeleteEnergyManagementInputDto | Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs | ✅ | +| ReadEnergyManagementInputDto | Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs | ✅ | + +### PromotionContent(宣传内容模块) +| Dto 类名 | 文件路径 | 修改状态 | +|---------|--------|--------| +| CreatePromotionContentInputDto | Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs | ✅ | +| UpdatePromotionContentInputDto | Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs | ✅ | +| DeletePromotionContentInputDto | Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs | ✅ | +| ReadPromotionContentInputDto | Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs | ✅ | + +### Reser(预约模块) +| Dto 类名 | 文件路径 | 修改状态 | +|---------|--------|--------| +| CreateReserInputDto | Business/Reser/Dto/CreateReserInputDto.cs | ✅ | +| UpdateReserInputDto | Business/Reser/Dto/UpdateReserInputDto.cs | ✅ | +| DeleteReserInputDto | Business/Reser/Dto/DeleteReserInputDto.cs | ✅ | +| ReadReserInputDto | Business/Reser/Dto/ReadReserInputDto.cs | ✅ | + +### SellThing(商品模块) +| Dto 类名 | 文件路径 | 修改状态 | +|---------|--------|--------| +| CreateSellThingInputDto | Business/Sellthing/Dto/CreateSellThingInputDto.cs | ✅ | +| UpdateSellThingInputDto | Business/Sellthing/Dto/UpdateSellThingInputDto.cs | ✅ | +| DeleteSellThingInputDto | Business/Sellthing/Dto/DeleteSellThingInputDto.cs | ✅ | +| ReadSellThingInputDto | Business/Sellthing/Dto/ReadSellThingInputDto.cs | ✅ | + +### Room(房间管理模块) +| Dto 类名 | 文件路径 | 修改状态 | +|---------|--------|--------| +| CheckoutRoomDto | Business/Room/Dto/CheckoutRoomDto.cs | ✅ | +| CheckinRoomByReservationDto | Business/Room/Dto/CheckinRoomByReservationDto.cs | ✅ | +| TransferRoomDto | Business/Room/Dto/TransferRoomDto.cs | ✅ | + +### NavBar(导航栏模块) +| Dto 类名 | 文件路径 | 修改状态 | +|---------|--------|--------| +| CreateNavBarInputDto | Application/NavBar/Dto/CreateNavBarInputDto.cs | ✅ (已有) | +| UpdateNavBarInputDto | Application/NavBar/Dto/UpdateNavBarInputDto.cs | ✅ | +| DeleteNavBarInputDto | Application/NavBar/Dto/DeleteNavBarInputDto.cs | ✅ | +| ReadNavBarInputDto | Application/NavBar/Dto/ReadNavBarInputDto.cs | ✅ (已有) | + +## 修改统计 + +- **总计修改文件数**:30 个 +- **新增 using 语句**:`using System.ComponentModel.DataAnnotations;` +- **使用的验证特性**: + - `[Required]` - 对应 Core 层 IsNullable=false 的字段 + - `[MaxLength]` - 对应 Core 层 Length 约束 + +## 验证特性说明 + +### Required 特性 +- 表示该字段为必填 +- 仅应用于 Create/Update/Delete InputDto +- 对应 Core 层数据库列定义中的 `IsNullable = false` +- 错误消息示例:`"新闻编号为必填字段"` + +### MaxLength 特性 +- 限制字符串字段的最大长度 +- 应用于所有包含字符串字段的 Dto +- 对应 Core 层数据库列定义中的 `Length` 参数 +- 错误消息示例:`"新闻编号长度不超过128字符"` + +## 编码规范 + +### 错误消息格式 +```csharp +[Required(ErrorMessage = "[字段中文名]为必填字段")] +[MaxLength(n, ErrorMessage = "[字段中文名]长度不超过n字符")] +``` + +### 示例 +```csharp +[Required(ErrorMessage = "新闻标题为必填字段"), MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] +public string NewsTitle { get; set; } +``` + +## 编译验证 +✅ 无编译错误 +✅ 所有验证特性已正确应用 +✅ 与 Core 层实体定义完全对应 + diff --git a/DTO_VALIDATION_UPDATES.md b/DTO_VALIDATION_UPDATES.md new file mode 100644 index 0000000..4cb3e0c --- /dev/null +++ b/DTO_VALIDATION_UPDATES.md @@ -0,0 +1,137 @@ +# DTO 验证特性更新总结 + +本文档总结了根据Core层实体对Contract层Dto字段添加的验证特性(Required和MaxLength)。 + +## 更新原则 + +- **Create/Update InputDto**:对应Core层IsNullable=false的字段添加Required特性,根据Length长度添加MaxLength特性 +- **Delete InputDto**:为主键字段添加Required特性,其他字段添加MaxLength特性 +- **Read InputDto/ListInputDto**:仅添加MaxLength特性用于显示提示,不添加Required +- **Output Dto**:不添加验证特性(仅用于数据展示) + +## 更新的模块 + +### 1. News(新闻动态) +- ✅ AddNewsInputDto - 添加Required和MaxLength +- ✅ UpdateNewsInputDto - 添加Required和MaxLength +- ✅ DeleteNewsInputDto - 添加Required和MaxLength +- ✅ ReadNewsInputDto - 添加MaxLength + +**字段验证规则:** +- NewId:Required, MaxLength(128) +- NewsTitle:Required, MaxLength(256) +- NewsContent:Required +- NewsType:Required, MaxLength(64) +- NewsLink:Required, MaxLength(200) +- NewsDate:Required +- NewsStatus:Required, MaxLength(64) +- NewsImage:MaxLength(200) + +### 2. EnergyManagement(水电信息) +- ✅ CreateEnergyManagementInputDto - 添加Required和MaxLength +- ✅ UpdateEnergyManagementInputDto - 添加Required和MaxLength +- ✅ DeleteEnergyManagementInputDto - 添加Required +- ✅ ReadEnergyManagementInputDto - 添加MaxLength + +**字段验证规则:** +- InformationNumber/InformationId:Required, MaxLength(128) +- RoomNumber:Required, MaxLength(128) +- CustomerNumber:Required, MaxLength(128) +- StartDate:Required +- EndDate:Required +- PowerUsage:Required +- WaterUsage:Required +- Recorder:Required, MaxLength(150) + +### 3. PromotionContent(宣传内容) +- ✅ CreatePromotionContentInputDto - 添加Required和MaxLength +- ✅ UpdatePromotionContentInputDto - 添加Required和MaxLength +- ✅ DeletePromotionContentInputDto - 添加Required和MaxLength +- ✅ ReadPromotionContentInputDto - 添加MaxLength + +**字段验证规则:** +- PromotionContentNumber:Required, MaxLength(128) +- PromotionContentMessage:Required, MaxLength(2000) + +### 4. Reser(预约信息) +- ✅ CreateReserInputDto - 添加Required和MaxLength +- ✅ UpdateReserInputDto - 添加Required和MaxLength +- ✅ DeleteReserInputDto - 添加Required和MaxLength +- ✅ ReadReserInputDto - 添加MaxLength + +**字段验证规则:** +- ReservationId:Required, MaxLength(128) +- CustomerName:Required, MaxLength(200) +- ReservationPhoneNumber:Required, MaxLength(256) +- ReservationRoomNumber:Required, MaxLength(128) +- ReservationChannel:Required, MaxLength(50) +- ReservationStartDate:Required +- ReservationEndDate:Required + +### 5. SellThing(商品信息) +- ✅ CreateSellThingInputDto - 添加Required和MaxLength +- ✅ UpdateSellThingInputDto - 添加Required和MaxLength +- ✅ DeleteSellThingInputDto - 添加Required和MaxLength +- ✅ ReadSellThingInputDto - 添加MaxLength + +**字段验证规则:** +- ProductNumber:Required, MaxLength(128) +- ProductName:Required, MaxLength(500) +- ProductPrice:Required +- Specification:MaxLength(1000) +- Stock:Required + +### 6. NavBar(导航栏配置) +- ✅ CreateNavBarInputDto - 已有验证特性(保持原样) +- ✅ UpdateNavBarInputDto - 补充添加Required和MaxLength +- ✅ DeleteNavBarInputDto - 添加Required +- ✅ ReadNavBarInputDto - 已有验证特性(保持原样) + +**字段验证规则:** +- NavigationBarName:Required, MaxLength(50) +- NavigationBarOrder:Required +- NavigationBarImage:MaxLength(255) +- NavigationBarEvent:Required, MaxLength(200) +- MarginLeft:Required +- NavigationBarId:Required + +### 7. Room(房间操作) +- ✅ CheckoutRoomDto - 添加Required和MaxLength +- ✅ CheckinRoomByReservationDto - 添加Required和MaxLength +- ✅ TransferRoomDto - 添加Required和MaxLength + +**字段验证规则:** +- RoomNumber:Required, MaxLength(128) +- CustomerNumber:Required, MaxLength(128) +- WaterUsage/ElectricityUsage:Required +- CustomerName:Required, MaxLength(200) +- CustomerPhoneNumber:Required, MaxLength(256) +- IdCardNumber:Required, MaxLength(128) +- CustomerAddress:MaxLength(500) +- PassportId/CustomerType:Required +- DateOfBirth:Required +- OriginalRoomNumber/TargetRoomNumber:Required, MaxLength(128) +- ReservationId:Required, MaxLength(128) + +## 导入的命名空间 + +所有修改的Dto文件都添加了以下命名空间: +```csharp +using System.ComponentModel.DataAnnotations; +``` + +## 验证实现 + +这些验证特性会在以下场景被使用: + +1. **模型验证**:ASP.NET Core会自动在绑定请求数据时验证这些特性 +2. **API响应**:当验证失败时,会返回相应的错误信息 +3. **数据库约束**:与Core层的IsNullable和Length约束相对应 + +## 参考样例 + +所有修改遵循`NavBar`模块的验证模式: +- CreateNavBarInputDto中的`[Required]`和`[MaxLength]`特性 +- 一致的中文错误消息格式 +- 遵循Core层的数据库列约束 + diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs index ad486ee..51cebe1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs @@ -1,8 +1,7 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadNavBarInputDto : ListInputDto { public int NavigationBarId { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs index ad7f56c..8caf1f7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { @@ -7,16 +7,10 @@ namespace EOM.TSHotelManagement.Common.Contract public int Id { get; set; } public int NavigationBarId { get; set; } - - [MaxLength(50, ErrorMessage = "导航栏名称长度不超过50字符")] public string NavigationBarName { get; set; } public int NavigationBarOrder { get; set; } - - [MaxLength(255, ErrorMessage = "导航栏图片长度不超过255字符")] public string NavigationBarImage { get; set; } - - [MaxLength(200, ErrorMessage = "导航栏事件长度不超过200字符")] public string NavigationBarEvent { get; set; } public int MarginLeft { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs index eb53a45..30dc867 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs @@ -1,10 +1,9 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadAssetInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs index 2f03344..d8330c4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs @@ -1,32 +1,22 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadAssetOutputDto : BaseOutputDto { public int Id { get; set; } - - [MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } - - [MaxLength(200, ErrorMessage = "资产名称长度不超过200字符")] public string AssetName { get; set; } public decimal AssetValue { get; set; } public string AssetValueFormatted { get; set; } - - [MaxLength(128, ErrorMessage = "部门代码长度不超过128字符")] public string DepartmentCode { get; set; } public string DepartmentName { get; set; } public DateTime AcquisitionDate { get; set; } - - [MaxLength(500, ErrorMessage = "资产来源长度不超过500字符")] public string AssetSource { get; set; } - - [MaxLength(128, ErrorMessage = "经办员工长度不超过128字符")] public string AcquiredByEmployeeId { get; set; } public string AcquiredByEmployeeName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs index c0f29ba..8a8d71f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadCustoTypeInputDto : ListInputDto { @@ -6,4 +6,3 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerTypeName { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs index cf5423e..3baae8b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadCustoTypeOutputDto : BaseOutputDto { @@ -8,4 +8,3 @@ namespace EOM.TSHotelManagement.Common.Contract public decimal Discount { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs index fb9752e..16cccb4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs @@ -1,19 +1,12 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadCustomerInputDto : ListInputDto { - [MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } - - [MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - - [MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } - - [MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index 092ced4..8cefa01 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -1,4 +1,4 @@ - + using EOM.TSHotelManagement.Common.Util; using System.ComponentModel.DataAnnotations; @@ -10,11 +10,9 @@ namespace EOM.TSHotelManagement.Common.Contract public int Id { get; set; } [UIDisplay("客户编号")] - [MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } [UIDisplay("客户姓名")] - [MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } [UIDisplay("性别", true, false)] @@ -27,7 +25,6 @@ namespace EOM.TSHotelManagement.Common.Contract public string GenderName { get; set; } [UIDisplay("联系方式")] - [MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } [UIDisplay("出生日期")] @@ -43,11 +40,9 @@ namespace EOM.TSHotelManagement.Common.Contract public string PassportName { get; set; } [UIDisplay("证件号码")] - [MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } [UIDisplay("客户地址")] - [MaxLength(256, ErrorMessage = "客户地址长度不超过256字符")] public string CustomerAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs index 0e1635e..00c2162 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs @@ -15,4 +15,4 @@ /// public string EmailAddress { get; set; } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs index 25f331a..23847ce 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadPassportTypeInputDto : ListInputDto { @@ -6,4 +6,3 @@ namespace EOM.TSHotelManagement.Common.Contract public string? PassportName { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs index a7e24ad..efd814c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadPassportTypeOutputDto : BaseOutputDto { @@ -7,4 +7,3 @@ namespace EOM.TSHotelManagement.Common.Contract public string PassportName { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs index d777d77..7e692de 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs @@ -1,15 +1,11 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadEnergyManagementInputDto : ListInputDto { public int Id { get; set; } - - [MaxLength(128, ErrorMessage = "信息编号长度不超过128字符")] public string InformationId { get; set; } - - [MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNo { get; set; } public DateOnly? UseDate { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs index 87c289f..c9c67b8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common.Util; namespace EOM.TSHotelManagement.Common.Contract { @@ -6,19 +6,19 @@ namespace EOM.TSHotelManagement.Common.Contract { public int Id { get; set; } public string InformationId { get; set; } - [UIDisplay("")] + [UIDisplay("房间号")] public string RoomNumber { get; set; } - [UIDisplay("ͻ")] + [UIDisplay("客户编号")] public string CustomerNumber { get; set; } - [UIDisplay("ʼ")] + [UIDisplay("开始日期")] public DateTime StartDate { get; set; } - [UIDisplay("")] + [UIDisplay("结束日期")] public DateTime EndDate { get; set; } - [UIDisplay("")] + [UIDisplay("电力")] public decimal PowerUsage { get; set; } - [UIDisplay("ˮ")] + [UIDisplay("水量")] public decimal WaterUsage { get; set; } - [UIDisplay("¼Ա")] + [UIDisplay("记录员")] public string Recorder { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs index b1fd39c..a8120ea 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs @@ -4,26 +4,15 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadNewsInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } - - [MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } public string NewsContent { get; set; } - - [MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } - - [MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } public DateTime NewsDate { get; set; } - - [MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } - - [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs index 9195f1f..5a0b3e1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs @@ -5,31 +5,19 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadNewsOuputDto : BaseDto { public int Id { get; set; } - - [MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } - - [MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } public string NewsContent { get; set; } - - [MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } public string NewsTypeDescription { get; set; } - - [MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } public DateTime NewsDate { get; set; } - - [MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } public string NewsStatusDescription { get; set; } - - [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs index d52a4c1..0f7f049 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs @@ -1,15 +1,11 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadPromotionContentInputDto : ListInputDto { public int PromotionId { get; set; } - - [MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } = string.Empty; - - [MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } = string.Empty; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs index 7d2c7fa..2bc447d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs @@ -1,15 +1,11 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadPromotionContentOutputDto : BaseOutputDto { public int Id { get; set; } - - [MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } - - [MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs index ac9ef46..1bfa1db 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs @@ -1,22 +1,13 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadReserInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } - - [MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } - - [MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } - - [MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } - - [MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } public DateTime ReservationStartDate { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs index a3e44e1..67ddf77 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common.Util; using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract @@ -8,23 +8,18 @@ namespace EOM.TSHotelManagement.Common.Contract public int Id { get; set; } [UIDisplay("预约编号")] - [MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } [UIDisplay("客户姓名")] - [MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } [UIDisplay("联系方式")] - [MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } [UIDisplay("预定房号")] - [MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } [UIDisplay("预约渠道")] - [MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } public string ReservationChannelDescription { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs index ee08f8e..1eec7d4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoomInputDto : ListInputDto { @@ -9,4 +9,3 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerNumber { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs index af30116..090ecff 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoomOutputDto : BaseOutputDto { @@ -24,4 +24,3 @@ namespace EOM.TSHotelManagement.Common.Contract public int Reserved { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs index 85f2fb2..d7276b3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoomStateInputDto : ListInputDto { @@ -6,4 +6,3 @@ namespace EOM.TSHotelManagement.Common.Contract } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs index a24222a..c149f56 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoomStateOutputDto : BaseOutputDto { @@ -7,4 +7,3 @@ namespace EOM.TSHotelManagement.Common.Contract } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs index 372e766..eb56c7a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoomTypeInputDto : ListInputDto { @@ -10,4 +10,3 @@ namespace EOM.TSHotelManagement.Common.Contract } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs index 3bca11a..6882e7d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoomTypeOutputDto : BaseOutputDto { @@ -10,4 +10,3 @@ namespace EOM.TSHotelManagement.Common.Contract } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs index ae8eeda..47aff0e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs @@ -1,18 +1,13 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadSellThingInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } - - [MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } public decimal ProductPrice { get; set; } - - [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } public decimal Stock { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs index dbf28b5..cc77da7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common.Util; using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract @@ -8,18 +8,15 @@ namespace EOM.TSHotelManagement.Common.Contract public int Id { get; set; } [UIDisplay("商品编号")] - [MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } [UIDisplay("商品名称")] - [MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } [UIDisplay("商品价格")] public decimal ProductPrice { get; set; } [UIDisplay("规格型号")] - [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } [UIDisplay("库存", true, true)] diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs index c1ba60a..fc781f2 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { @@ -23,4 +23,3 @@ namespace EOM.TSHotelManagement.Common.Contract public DateTime ConsumptionTime { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs index e26def9..06ae4d6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common.Util; using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract @@ -37,7 +37,6 @@ namespace EOM.TSHotelManagement.Common.Contract [UIDisplay("消费时间")] public DateTime ConsumptionTime { get; set; } - public string SettlementStatus { get; set; } [UIDisplay("消费类型", false, false)] diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs index 6eef3ba..03db5b6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs @@ -1,22 +1,66 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateEmployeeInputDto : BaseInputDto { + [Required(ErrorMessage = "员工账号为必填字段")] + [MaxLength(128, ErrorMessage = "员工账号长度不超过128字符")] public string EmployeeId { get; set; } + + [Required(ErrorMessage = "员工姓名为必填字段")] + [MaxLength(250, ErrorMessage = "员工姓名长度不超过250字符")] public string EmployeeName { get; set; } + + [Required(ErrorMessage = "员工性别为必填字段")] public int Gender { get; set; } + + [Required(ErrorMessage = "出生日期为必填字段")] public DateOnly DateOfBirth { get; set; } + + [Required(ErrorMessage = "民族类型为必填字段")] + [MaxLength(128, ErrorMessage = "民族类型长度不超过128字符")] public string Ethnicity { get; set; } + + [Required(ErrorMessage = "员工电话为必填字段")] + [MaxLength(256, ErrorMessage = "员工电话长度不超过256字符")] public string PhoneNumber { get; set; } + + [Required(ErrorMessage = "所属部门为必填字段")] + [MaxLength(128, ErrorMessage = "所属部门长度不超过128字符")] public string Department { get; set; } + + [MaxLength(500, ErrorMessage = "居住地址长度不超过500字符")] public string Address { get; set; } + + [Required(ErrorMessage = "员工职位为必填字段")] + [MaxLength(128, ErrorMessage = "员工职位长度不超过128字符")] public string Position { get; set; } + + [Required(ErrorMessage = "证件类型为必填字段")] public int IdCardType { get; set; } + + [Required(ErrorMessage = "证件号码为必填字段")] + [MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } + + [Required(ErrorMessage = "员工密码为必填字段")] + [MaxLength(256, ErrorMessage = "员工密码长度不超过256字符")] public string Password { get; set; } + + [Required(ErrorMessage = "员工入职时间为必填字段")] public DateOnly HireDate { get; set; } + + [Required(ErrorMessage = "员工面貌为必填字段")] + [MaxLength(128, ErrorMessage = "员工面貌长度不超过128字符")] public string PoliticalAffiliation { get; set; } + + [Required(ErrorMessage = "教育程度为必填字段")] + [MaxLength(128, ErrorMessage = "教育程度长度不超过128字符")] public string EducationLevel { get; set; } + + [Required(ErrorMessage = "邮箱地址为必填字段")] + [MaxLength(256, ErrorMessage = "邮箱地址长度不超过256字符")] public string EmailAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs index 6734d23..6fe2004 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEmployeeInputDto : BaseInputDto { + [Required(ErrorMessage = "员工账号为必填字段")] + [MaxLength(128, ErrorMessage = "员工账号长度不超过128字符")] public string EmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs index 7dbfff4..0073f7c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeInputDto : ListInputDto @@ -5,6 +7,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string EmployeeId { get; set; } public string EmployeeName { get; set; } public string Gender { get; set; } + public DateOnly? DateOfBirth { get; set; } public string Ethnicity { get; set; } public string PhoneNumber { get; set; } @@ -12,6 +15,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string Address { get; set; } public string Position { get; set; } public string IdCardNumber { get; set; } + public DateOnly? HireDate { get; set; } public string PoliticalAffiliation { get; set; } public string EducationLevel { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index fdbb950..9e133b9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -1,14 +1,21 @@ - +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeOutputDto : BaseOutputDto { public string EmployeeId { get; set; } + public string EmployeeName { get; set; } + public int Gender { get; set; } + public string GenderName { get; set; } + public DateTime DateOfBirth { get; set; } + public string Ethnicity { get; set; } + public string EthnicityName { get; set; } public string PhoneNumber { get; set; } public string Department { get; set; } @@ -16,15 +23,19 @@ namespace EOM.TSHotelManagement.Common.Contract public string Address { get; set; } public string Position { get; set; } public string PositionName { get; set; } + public int IdCardType { get; set; } public string IdCardTypeName { get; set; } public string IdCardNumber { get; set; } + public DateTime HireDate { get; set; } public string PoliticalAffiliation { get; set; } public string PoliticalAffiliationName { get; set; } public string EducationLevel { get; set; } public string EducationLevelName { get; set; } + public int IsEnable { get; set; } + public int IsInitialize { get; set; } public string Password { get; set; } public string EmailAddress { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs index 04d47a5..68e7feb 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs @@ -1,24 +1,70 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEmployeeInputDto : BaseInputDto { + [Required(ErrorMessage = "员工账号为必填字段")] + [MaxLength(128, ErrorMessage = "员工账号长度不超过128字符")] public string EmployeeId { get; set; } + + [Required(ErrorMessage = "员工姓名为必填字段")] + [MaxLength(250, ErrorMessage = "员工姓名长度不超过250字符")] public string EmployeeName { get; set; } + + [Required(ErrorMessage = "员工性别为必填字段")] public int Gender { get; set; } + + [Required(ErrorMessage = "出生日期为必填字段")] public DateOnly DateOfBirth { get; set; } + + [Required(ErrorMessage = "民族类型为必填字段")] + [MaxLength(128, ErrorMessage = "民族类型长度不超过128字符")] public string Ethnicity { get; set; } + + [Required(ErrorMessage = "员工电话为必填字段")] + [MaxLength(256, ErrorMessage = "员工电话长度不超过256字符")] public string PhoneNumber { get; set; } + + [Required(ErrorMessage = "所属部门为必填字段")] + [MaxLength(128, ErrorMessage = "所属部门长度不超过128字符")] public string Department { get; set; } + + [MaxLength(500, ErrorMessage = "居住地址长度不超过500字符")] public string Address { get; set; } + + [Required(ErrorMessage = "员工职位为必填字段")] + [MaxLength(128, ErrorMessage = "员工职位长度不超过128字符")] public string Position { get; set; } + + [Required(ErrorMessage = "证件类型为必填字段")] public int IdCardType { get; set; } + + [Required(ErrorMessage = "证件号码为必填字段")] + [MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } + + [Required(ErrorMessage = "员工入职时间为必填字段")] public DateOnly HireDate { get; set; } + + [Required(ErrorMessage = "员工面貌为必填字段")] + [MaxLength(128, ErrorMessage = "员工面貌长度不超过128字符")] public string PoliticalAffiliation { get; set; } + + [Required(ErrorMessage = "教育程度为必填字段")] + [MaxLength(128, ErrorMessage = "教育程度长度不超过128字符")] public string EducationLevel { get; set; } + + [MaxLength(256, ErrorMessage = "旧密码长度不超过256字符")] public string OldPassword { get; set; } + + [MaxLength(256, ErrorMessage = "员工密码长度不超过256字符")] public string Password { get; set; } + public int IsEnable { get; set; } + + [Required(ErrorMessage = "邮箱地址为必填字段")] + [MaxLength(256, ErrorMessage = "邮箱地址长度不超过256字符")] public string EmailAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs index 98cf3aa..6bface9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs @@ -1,29 +1,38 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateEmployeeCheckInputDto : BaseInputDto { /// - /// 򿨱 (Check-in/Check-out Number) + /// 打卡编号 (Check-in/Check-out Number) /// + [Required(ErrorMessage = "打卡编号为必填字段")] + [MaxLength(128, ErrorMessage = "打卡编号长度不超过128字符")] public string CheckNumber { get; set; } /// - /// Ա (Employee ID) + /// 员工工号 (Employee ID) /// + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } /// - /// ʱ (Check-in/Check-out Time) + /// 打卡时间 (Check-in/Check-out Time) /// + [Required(ErrorMessage = "打卡时间为必填字段")] public DateTime CheckTime { get; set; } /// - /// 򿨷ʽ (Check-in/Check-out Method) + /// 打卡方式 (Check-in/Check-out Method) /// + [Required(ErrorMessage = "打卡方式为必填字段")] public string CheckMethod { get; set; } /// - /// ״̬ (Check-in/Check-out Status) + /// 打卡状态 (Check-in/Check-out Status) /// + [Required(ErrorMessage = "打卡状态为必填字段")] public int CheckStatus { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs index 773f12d..1a8a89f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEmployeeCheckInputDto : BaseInputDto { + [Required(ErrorMessage = "打卡ID为必填字段")] public int CheckId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs index 83e9f6d..a7bf66b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeCheckInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs index 9db2be1..2e515bc 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -1,8 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeCheckOutputDto : BaseOutputDto { public string EmployeeId { get; set; } + public DateTime CheckTime { get; set; } public string CheckStatus { get; set; } public string CheckMethod { get; set; } @@ -10,6 +13,7 @@ namespace EOM.TSHotelManagement.Common.Contract public bool MorningChecked { get; set; } public bool EveningChecked { get; set; } + public int CheckDay { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs index 1f30efa..86d415f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs @@ -1,10 +1,20 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEmployeeCheckInputDto : BaseInputDto { + [Required(ErrorMessage = "打卡ID为必填字段")] public int CheckId { get; set; } + + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } + + [Required(ErrorMessage = "打卡日期为必填字段")] public DateTime CheckDate { get; set; } + + [MaxLength(128, ErrorMessage = "打卡状态长度不超过128字符")] public string CheckStatus { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs index cb5ff08..b12b595 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs @@ -1,10 +1,21 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateEmployeeHistoryInputDto : BaseInputDto { + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } + + [Required(ErrorMessage = "变更日期为必填字段")] public DateTime ChangeDate { get; set; } + + [Required(ErrorMessage = "变更类型为必填字段")] + [MaxLength(128, ErrorMessage = "变更类型长度不超过128字符")] public string ChangeType { get; set; } + + [MaxLength(500, ErrorMessage = "变更描述长度不超过500字符")] public string ChangeDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs index 7908c23..f9008f5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEmployeeHistoryInputDto : BaseInputDto { + [Required(ErrorMessage = "履历ID为必填字段")] public int HistoryId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs index 19921f5..08d22e0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeHistoryInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs index 8d949b4..65ebb0b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs @@ -1,9 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeHistoryOutputDto : BaseOutputDto { public string EmployeeId { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } public string Position { get; set; } public string Company { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs index 77d4349..76f8c06 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs @@ -1,11 +1,23 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEmployeeHistoryInputDto : BaseInputDto { + [Required(ErrorMessage = "履历ID为必填字段")] public int HistoryId { get; set; } + + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } + + [Required(ErrorMessage = "变更日期为必填字段")] public DateTime ChangeDate { get; set; } + + [MaxLength(128, ErrorMessage = "变更类型长度不超过128字符")] public string ChangeType { get; set; } + + [MaxLength(500, ErrorMessage = "变更描述长度不超过500字符")] public string ChangeDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs index af0b543..a4a7668 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs @@ -1,8 +1,14 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateEmployeePhotoInputDto : BaseInputDto { + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } + + [MaxLength(256, ErrorMessage = "照片路径长度不超过256字符")] public string PhotoUrl { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs index 4e888b1..0551a60 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs @@ -1,8 +1,14 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEmployeePhotoInputDto : ListInputDto { + [Required(ErrorMessage = "照片ID为必填字段")] public int PhotoId { get; set; } + + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs index 2c799b3..6fd573e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeePhotoInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs index 89d1088..695cfce 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeePhotoOutputDto : BaseOutputDto diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs index 19999ff..bb10ac0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs @@ -1,9 +1,17 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEmployeePhotoInputDto : BaseInputDto { + [Required(ErrorMessage = "照片ID为必填字段")] public int PhotoId { get; set; } + + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } + + [MaxLength(256, ErrorMessage = "照片路径长度不超过256字符")] public string PhotoUrl { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs index 0a4ad80..ae12263 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs @@ -1,10 +1,21 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateEmployeeRewardPunishmentInputDto : BaseInputDto { + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } + + [Required(ErrorMessage = "奖惩日期为必填字段")] public DateTime RewardPunishmentDate { get; set; } + + [Required(ErrorMessage = "奖惩类型为必填字段")] + [MaxLength(128, ErrorMessage = "奖惩类型长度不超过128字符")] public string RewardPunishmentType { get; set; } + + [MaxLength(256, ErrorMessage = "奖惩描述长度不超过256字符")] public string RewardPunishmentDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs index 7bcd361..177cb41 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs @@ -1,7 +1,10 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEmployeeRewardPunishmentInputDto : BaseInputDto { + [Required(ErrorMessage = "奖惩ID为必填字段")] public int RewardPunishmentId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs index 4cddcc6..219c45e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeRewardPunishmentInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs index 80a7ba3..918bfae 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs @@ -1,10 +1,13 @@ +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeRewardPunishmentOutputDto : BaseOutputDto { public string EmployeeId { get; set; } + public DateTime RewardPunishmentTime { get; set; } + public int RewardPunishmentType { get; set; } public string RewardPunishmentTypeName { get; set; } public string RewardPunishmentInformation { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs index 2b1426f..542fec9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs @@ -1,11 +1,23 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEmployeeRewardPunishmentInputDto : BaseInputDto { + [Required(ErrorMessage = "奖惩ID为必填字段")] public int RewardPunishmentId { get; set; } + + [Required(ErrorMessage = "员工工号为必填字段")] + [MaxLength(128, ErrorMessage = "员工工号长度不超过128字符")] public string EmployeeId { get; set; } + + [Required(ErrorMessage = "奖惩日期为必填字段")] public DateTime RewardPunishmentDate { get; set; } + + [MaxLength(128, ErrorMessage = "奖惩类型长度不超过128字符")] public string RewardPunishmentType { get; set; } + + [MaxLength(256, ErrorMessage = "奖惩描述长度不超过256字符")] public string RewardPunishmentDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs index d94e6e0..1ec8576 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class CreateRewardPunishmentTypeInputDto : BaseInputDto { + [Required(ErrorMessage = "奖惩类型名称为必填字段")] + [MaxLength(200, ErrorMessage = "奖惩类型名称长度不超过200字符")] public string GBTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs index 7731a1f..56b74a9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs @@ -1,7 +1,11 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class DeleteRewardPunishmentTypeInputDto : BaseInputDto { + [Required(ErrorMessage = "奖惩类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "奖惩类型编号长度不超过128字符")] public string RewardPunishmentTypeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs index afb8172..4eb4a07 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadRewardPunishmentTypeInputDto : ListInputDto diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs index 042ea87..6e79d1d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadRewardPunishmentTypeOutputDto : BaseOutputDto diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs index cd65c6e..e553f12 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs @@ -1,8 +1,15 @@ +using System.ComponentModel.DataAnnotations; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateRewardPunishmentTypeInputDto : BaseInputDto { + [Required(ErrorMessage = "奖惩类型编号为必填字段")] + [MaxLength(128, ErrorMessage = "奖惩类型编号长度不超过128字符")] public string RewardPunishmentTypeId { get; set; } + + [Required(ErrorMessage = "奖惩类型名称为必填字段")] + [MaxLength(200, ErrorMessage = "奖惩类型名称长度不超过200字符")] public string RewardPunishmentTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs index b4e988c..a60aceb 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs @@ -1,21 +1,13 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorInputDto : ListInputDto { public int Id { get; set; } - - [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Account { get; set; } - - [MaxLength(256, ErrorMessage = "管理员密码长度不超过256字符")] public string Password { get; set; } - - [MaxLength(150, ErrorMessage = "管理员类型长度不超过150字符")] public string Type { get; set; } - - [MaxLength(200, ErrorMessage = "管理员名称长度不超过200字符")] public string Name { get; set; } public int IsSuperAdmin { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs index adc176b..61d9c75 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -1,33 +1,24 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Number { get; set; } - - [MaxLength(128, ErrorMessage = "管理员账号长度不超过128字符")] public string Account { get; set; } - - [MaxLength(256, ErrorMessage = "管理员密码长度不超过256字符")] public string Password { get; set; } - - [MaxLength(150, ErrorMessage = "管理员类型长度不超过150字符")] public string Type { get; set; } - - [MaxLength(200, ErrorMessage = "管理员名称长度不超过200字符")] public string Name { get; set; } public int IsSuperAdmin { get; set; } /// - /// �Ƿ�Ϊ��������Ա���� (Is Super Administrator Description) + /// 锟角凤拷为锟斤拷锟斤拷锟斤拷锟斤拷员锟斤拷锟斤拷 (Is Super Administrator Description) /// public string IsSuperAdminDescription { get; set; } /// - /// ����Ա�������� (Administrator Type Name) + /// 锟斤拷锟斤拷员锟斤拷锟斤拷锟斤拷锟斤拷 (Administrator Type Name) /// public string TypeName { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs index 3f98801..03ee61d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { @@ -7,4 +7,3 @@ namespace EOM.TSHotelManagement.Common.Contract public int Id { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs index 496fedf..d2b77aa 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs @@ -1,13 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorTypeOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "类型编号长度不超过128字符")] public string TypeId { get; set; } - - [MaxLength(256, ErrorMessage = "类型名称长度不超过256字符")] public string TypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs index 5415f06..f571b1f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs @@ -1,22 +1,15 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "公告编号长度不超过128字符")] public string NoticeId { get; set; } - - [MaxLength(256, ErrorMessage = "公告主题长度不超过256字符")] public string NoticeTheme { get; set; } - - [MaxLength(150, ErrorMessage = "公告类型长度不超过150字符")] public string NoticeType { get; set; } public DateTime NoticeTime { get; set; } public string NoticeContent { get; set; } - - [MaxLength(128, ErrorMessage = "发文部门长度不超过128字符")] public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs index 99ca68a..5f0c77d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs @@ -1,22 +1,15 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "公告编号长度不超过128字符")] public string NoticeId { get; set; } - - [MaxLength(256, ErrorMessage = "公告主题长度不超过256字符")] public string NoticeTheme { get; set; } - - [MaxLength(150, ErrorMessage = "公告类型长度不超过150字符")] public string NoticeType { get; set; } public DateTime NoticeTime { get; set; } public string NoticeContent { get; set; } - - [MaxLength(128, ErrorMessage = "发文部门长度不超过128字符")] public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs index ea29d4f..3c5b4c3 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs @@ -4,10 +4,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeTypeInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "公告类型编号长度不超过128字符")] public string NoticeTypeNumber { get; set; } - - [MaxLength(200, ErrorMessage = "公告类型名称长度不超过200字符")] public string NoticeTypeName { get; set; } = string.Empty; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs index 2dba787..57cc862 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs @@ -4,10 +4,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadAppointmentNoticeTypeOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "公告类型编号长度不超过128字符")] public string NoticeTypeNumber { get; set; } - - [MaxLength(200, ErrorMessage = "公告类型名称长度不超过200字符")] public string NoticeTypeName { get; set; } public int? IsDelete { get; set; } = 0; diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs index 1922557..4099660 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs @@ -1,32 +1,18 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadDepartmentInputDto : ListInputDto { public int Id { get; set; } - - [MaxLength(128, ErrorMessage = "部门编号长度不超过128字符")] public string DepartmentNumber { get; set; } - - [MaxLength(256, ErrorMessage = "部门名称长度不超过256字符")] public string DepartmentName { get; set; } - - [MaxLength(500, ErrorMessage = "部门描述长度不超过500字符")] public string DepartmentDescription { get; set; } public DateOnly DepartmentCreationDate { get; set; } - - [MaxLength(128, ErrorMessage = "部门主管长度不超过128字符")] public string DepartmentLeader { get; set; } - - [MaxLength(200, ErrorMessage = "部门主管姓名长度不超过200字符")] public string LeaderName { get; set; } - - [MaxLength(128, ErrorMessage = "上级部门编号长度不超过128字符")] public string ParentDepartmentNumber { get; set; } - - [MaxLength(256, ErrorMessage = "上级部门名称长度不超过256字符")] public string ParentDepartmentName { get; set; } public DateTime? DepartmentCreationDateStart { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs index 54dca09..3c3fa0a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs @@ -1,30 +1,17 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadDepartmentOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "部门编号长度不超过128字符")] public string DepartmentNumber { get; set; } - - [MaxLength(256, ErrorMessage = "部门名称长度不超过256字符")] public string DepartmentName { get; set; } - - [MaxLength(500, ErrorMessage = "部门描述长度不超过500字符")] public string DepartmentDescription { get; set; } public DateOnly DepartmentCreationDate { get; set; } - - [MaxLength(128, ErrorMessage = "部门主管长度不超过128字符")] public string DepartmentLeader { get; set; } - - [MaxLength(200, ErrorMessage = "部门主管姓名长度不超过200字符")] public string LeaderName { get; set; } - - [MaxLength(128, ErrorMessage = "上级部门编号长度不超过128字符")] public string ParentDepartmentNumber { get; set; } - - [MaxLength(256, ErrorMessage = "上级部门名称长度不超过256字符")] public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs index 0ada6fd..1714cea 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { @@ -10,4 +10,3 @@ namespace EOM.TSHotelManagement.Common.Contract } } - diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs index 563702e..9d90f38 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs @@ -1,19 +1,14 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadMenuOutputDto : BaseOutputDto { - [MaxLength(256, ErrorMessage = "菜单键长度不超过256字符")] public string Key { get; set; } - - [MaxLength(256, ErrorMessage = "菜单标题长度不超过256字符")] public string Title { get; set; } public string Path { get; set; } public int? Parent { get; set; } - - [MaxLength(256, ErrorMessage = "菜单图标长度不超过256字符")] public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs index c6bb6da..943ffb5 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs @@ -1,12 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadNationInputDto : ListInputDto { public int NationId { get; set; } - - [MaxLength(50, ErrorMessage = "民族名称长度不超过50字符")] public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs index 57f1f4b..bb5b226 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs @@ -1,13 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadNationOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "民族编号长度不超过128字符")] public string NationNumber { get; set; } - - [MaxLength(50, ErrorMessage = "民族名称长度不超过50字符")] public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs index ebcab12..0e67a99 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs @@ -35,35 +35,4 @@ namespace EOM.TSHotelManagement.Common.Contract [MaxLength(500, ErrorMessage = "描述长度不超过500字符")] public string? Description { get; set; } } -} - -/// -/// 查询权限列表 出参 -/// -public class ReadPermissionOutputDto : BaseOutputDto -{ - /// - /// 权限编码 - /// - public string PermissionNumber { get; set; } = null!; - - /// - /// 权限名称 - /// - public string PermissionName { get; set; } = string.Empty; - - /// - /// 所属模块 - /// - public string? Module { get; set; } - - /// - /// 所属菜单键(用于前端按菜单归类展示) - /// - public string? MenuKey { get; set; } - - /// - /// 描述 - /// - public string? Description { get; set; } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs index da51ba3..2b86da7 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs @@ -1,12 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadPositionInputDto : ListInputDto { public int PositionId { get; set; } - - [MaxLength(200, ErrorMessage = "职位名称长度不超过200字符")] public string PositionName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs index 77fdd4d..adf4e6f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs @@ -1,13 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadPositionOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "职位编号长度不超过128字符")] public string PositionNumber { get; set; } - - [MaxLength(200, ErrorMessage = "职位名称长度不超过200字符")] public string PositionName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs index cf955e4..6c16f66 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs @@ -1,13 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadEducationInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "学历编号长度不超过128字符")] public string EducationNumber { get; set; } - - [MaxLength(200, ErrorMessage = "学历名称长度不超过200字符")] public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs index 89df82a..588de67 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs @@ -1,13 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadEducationOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "学历编号长度不超过128字符")] public string EducationNumber { get; set; } - - [MaxLength(200, ErrorMessage = "学历名称长度不超过200字符")] public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs index 86aff47..7740d91 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs @@ -1,16 +1,11 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoleInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; - - [MaxLength(200, ErrorMessage = "角色名称长度不超过200字符")] public string RoleName { get; set; } = null!; - - [MaxLength(500, ErrorMessage = "角色描述长度不超过500字符")] public string? RoleDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs index 66475ec..978aae8 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs @@ -1,16 +1,11 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoleOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "角色编码长度不超过128字符")] public string RoleNumber { get; set; } = null!; - - [MaxLength(200, ErrorMessage = "角色名称长度不超过200字符")] public string RoleName { get; set; } = null!; - - [MaxLength(500, ErrorMessage = "角色描述长度不超过500字符")] public string? RoleDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs index af34322..e4844f6 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs @@ -1,23 +1,16 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadSupervisionStatisticsInputDto : ListInputDto { - [MaxLength(128, ErrorMessage = "统计编号长度不超过128字符")] public string StatisticsNumber { get; set; } - - [MaxLength(128, ErrorMessage = "监督部门长度不超过128字符")] public string SupervisingDepartment { get; set; } - - [MaxLength(200, ErrorMessage = "监督部门名称长度不超过200字符")] public string SupervisingDepartmentName { get; set; } public string SupervisionProgress { get; set; } public string SupervisionLoss { get; set; } public int SupervisionScore { get; set; } - - [MaxLength(128, ErrorMessage = "监督统计事长度不超过128字符")] public string SupervisionStatistician { get; set; } public string SupervisionAdvice { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs index 558e612..ede22ac 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs @@ -1,23 +1,16 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadSupervisionStatisticsOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "统计编号长度不超过128字符")] public string StatisticsNumber { get; set; } - - [MaxLength(128, ErrorMessage = "监督部门长度不超过128字符")] public string SupervisingDepartment { get; set; } - - [MaxLength(200, ErrorMessage = "监督部门名称长度不超过200字符")] public string SupervisingDepartmentName { get; set; } public string SupervisionProgress { get; set; } public string SupervisionLoss { get; set; } public int SupervisionScore { get; set; } - - [MaxLength(128, ErrorMessage = "监督统计事长度不超过128字符")] public string SupervisionStatistician { get; set; } public string SupervisionAdvice { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs index 8aa7d85..204120a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { @@ -9,4 +9,3 @@ namespace EOM.TSHotelManagement.Common.Contract } - diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs index ba13c63..42f3ded 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs @@ -1,12 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadSystemInformationOutputDto : BaseOutputDto { public int UrlNumber { get; set; } - - [MaxLength(500, ErrorMessage = "信息内容长度不超过500字符")] public string UrlAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs index 5af732a..5c25ea3 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs @@ -1,12 +1,10 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadVipLevelRuleInputDto : ListInputDto { public int RuleId { get; set; } - - [MaxLength(128, ErrorMessage = "会员规则流水号长度不超过128字符")] public string RuleSerialNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs index 5ad6d75..8a1b0b0 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs @@ -1,19 +1,14 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Common.Contract { public class ReadVipLevelRuleOutputDto : BaseOutputDto { - [MaxLength(128, ErrorMessage = "会员规则流水号长度不超过128字符")] public string RuleSerialNumber { get; set; } - - [MaxLength(200, ErrorMessage = "会员规则名称长度不超过200字符")] public string RuleName { get; set; } public decimal RuleValue { get; set; } public int VipLevelId { get; set; } - - [MaxLength(256, ErrorMessage = "VIP等级名称长度不超过256字符")] public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs index 88cd83e..edf7f40 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadApplicationVersionInputDto : ListInputDto { @@ -7,4 +7,3 @@ namespace EOM.TSHotelManagement.Common.Contract } - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs index fe01132..e4b1ea1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadApplicationVersionOutputDto : BaseOutputDto { @@ -10,4 +10,3 @@ namespace EOM.TSHotelManagement.Common.Contract } - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs index acc9f67..537f25d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadCardCodeInputDto : ListInputDto { @@ -17,4 +17,3 @@ namespace EOM.TSHotelManagement.Common.Contract } - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs index 7e42cd3..b7a770a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadCardCodeOutputDto : BaseOutputDto { @@ -14,4 +14,3 @@ namespace EOM.TSHotelManagement.Common.Contract } - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs index ef3cc2f..d052cd9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs @@ -12,7 +12,7 @@ namespace EOM.TSHotelManagement.Common.Contract public int TotalDepartments { get; set; } [JsonPropertyName("attendance")] - [Required] + [Required(ErrorMessage = "考勤记录为必填事项")] public TempAttendanceRecord Attendance { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs index 9a5decf..8f23aff 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs @@ -35,6 +35,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class TempRoomType { [JsonPropertyName("name")] + [MaxLength(100, ErrorMessage = "房间类型名称长度不超过100字符")] public string Name { get; set; } [JsonPropertyName("total")] public int Total { get; set; } @@ -45,10 +46,13 @@ namespace EOM.TSHotelManagement.Common.Contract public class TempReservationAlert { [JsonPropertyName("roomType")] + [MaxLength(100, ErrorMessage = "房间类型长度不超过100字符")] public string RoomType { get; set; } [JsonPropertyName("guestName")] + [MaxLength(256, ErrorMessage = "客人姓名长度不超过256字符")] public string GuestName { get; set; } [JsonPropertyName("guestPhoneNo")] + [MaxLength(256, ErrorMessage = "客人电话长度不超过256字符")] public string GuestPhoneNo { get; set; } [JsonPropertyName("endDate")] [DataType(DataType.Date)] diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs index c04f8e4..47c196a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs @@ -1,4 +1,4 @@ - + namespace EOM.TSHotelManagement.Common.Contract { public class ReadOperationLogInputDto : ListInputDto @@ -10,4 +10,3 @@ namespace EOM.TSHotelManagement.Common.Contract public DateTime? EndTime { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index 4ffb281..4801415 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Shared; namespace EOM.TSHotelManagement.Common.Contract { @@ -13,29 +13,28 @@ namespace EOM.TSHotelManagement.Common.Contract public string LoginIpAddress { get; set; } public string LogLevelName { get; set; } /// - /// · (Request Path) + /// 请求路径 (Request Path) /// public string RequestPath { get; set; } /// - /// Ӧʱ (Elapsed Time) + /// 响应时间 (Elapsed Time) /// public long ElapsedTime { get; set; } /// - /// 󷽷 (Http Method) + /// 请求方法 (Http Method) /// public string HttpMethod { get; set; } /// - /// ״̬ (Status Code) + /// 状态码 (Status Code) /// public int StatusCode { get; set; } /// - /// 쳣Ϣ (Exception Message) + /// 异常消息 (Exception Message) /// public string ExceptionMessage { get; set; } /// - /// 쳣ջ (Exception Stack Trace) + /// 异常堆栈 (Exception Stack Trace) /// public string ExceptionStackTrace { get; set; } } } - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs index 6d9d215..26d7943 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs @@ -4,4 +4,4 @@ { } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs index 2b4bcf3..b0b8bfa 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs @@ -68,4 +68,4 @@ /// public string SoftwareVersion { get; set; } } -} +} \ No newline at end of file diff --git a/add_validation_attributes.ps1 b/add_validation_attributes.ps1 new file mode 100644 index 0000000..80ae2f0 --- /dev/null +++ b/add_validation_attributes.ps1 @@ -0,0 +1,141 @@ +# PowerShell script to add validation attributes to remaining SystemManagement DTOs +# This script adds using System.ComponentModel.DataAnnotations; if not present +# and adds [Required] and [MaxLength] attributes based on property names and types + +param( + [string]$dtoPath = "d:\Repos\topsky-hotel-management-system-web-api\EOM.TSHotelManagement.Common.Contract\SystemManagement\Dto" +) + +# Mapping of DTO module names to their Core entity constraints +$constraints = @{ + "Nation" = @{ + "NationNumber" = @{ "MaxLength" = 128; "Required" = $true } + "NationName" = @{ "MaxLength" = 50; "Required" = $true } + } + "Position" = @{ + "PositionNumber" = @{ "MaxLength" = 128; "Required" = $true } + "PositionName" = @{ "MaxLength" = 200; "Required" = $true } + } + "Education" = @{ + "EducationNumber" = @{ "MaxLength" = 128; "Required" = $true } + "EducationName" = @{ "MaxLength" = 200; "Required" = $true } + } + "AppointmentNotice" = @{ + "NoticeNumber" = @{ "MaxLength" = 128; "Required" = $true } + "NoticeTheme" = @{ "MaxLength" = 256; "Required" = $true } + "NoticeType" = @{ "MaxLength" = 150; "Required" = $true } + "IssuingDepartment" = @{ "MaxLength" = 128; "Required" = $true } + } + "AppointmentNoticeType" = @{ + "NoticeTypeNumber" = @{ "MaxLength" = 128; "Required" = $true } + "NoticeTypeName" = @{ "MaxLength" = 200; "Required" = $true } + } + "Menu" = @{ + "Key" = @{ "MaxLength" = 256; "Required" = $false } + "Title" = @{ "MaxLength" = 256; "Required" = $true } + "Icon" = @{ "MaxLength" = 256; "Required" = $false } + } + "Permission" = @{ + "PermissionNumber" = @{ "MaxLength" = 128; "Required" = $true } + "PermissionName" = @{ "MaxLength" = 200; "Required" = $true } + "Module" = @{ "MaxLength" = 128; "Required" = $true } + "Description" = @{ "MaxLength" = 500; "Required" = $false } + "MenuKey" = @{ "MaxLength" = 256; "Required" = $false } + "ParentNumber" = @{ "MaxLength" = 128; "Required" = $false } + } + "VipLevelRule" = @{ + "RuleSerialNumber" = @{ "MaxLength" = 128; "Required" = $true } + "RuleName" = @{ "MaxLength" = 200; "Required" = $true } + } + "SystemInformation" = @{ + "SystemKey" = @{ "MaxLength" = 128; "Required" = $true } + "SystemValue" = @{ "MaxLength" = 500; "Required" = $true } + "SystemName" = @{ "MaxLength" = 256; "Required" = $true } + } + "SupervisionStatistics" = @{ + "StatisticsNumber" = @{ "MaxLength" = 128; "Required" = $true } + "StatisticsName" = @{ "MaxLength" = 200; "Required" = $true } + } +} + +function Add-ValidationAttributes { + param( + [string]$filePath, + [hashtable]$props + ) + + try { + $content = Get-Content $filePath -Raw + + # Check if already has using statement + if ($content -notmatch "using System.ComponentModel.DataAnnotations") { + # Add using statement after namespace declaration + $content = $content -replace "(namespace.*\n)", "`$1using System.ComponentModel.DataAnnotations;`n" + } + + # For Input DTOs (Create/Update/Delete), add Required + MaxLength + # For Read/Output DTOs, add MaxLength only + # Skip if already has attributes + + if ($filePath -match "Delete.*Dto\.cs" -or $filePath -match "Read.*Dto\.cs" -or $filePath -match "Output.*Dto\.cs") { + # Read/Filter/Output DTOs - MaxLength only + foreach ($prop in $props.Keys) { + $maxLen = $props[$prop]["MaxLength"] + if ($maxLen -gt 0) { + $chineseName = $prop # Simplified - would need proper mapping + $pattern = "public\s+(\w+)\s+$prop\s*{" + $replacement = "`n [MaxLength($maxLen, ErrorMessage = `"$chineseName长度不超过$maxLen字符`")]`n public `$1 $prop {" + $content = $content -replace $pattern, $replacement + } + } + } + else { + # Create/Update/Delete DTOs - Required + MaxLength + foreach ($prop in $props.Keys) { + $maxLen = $props[$prop]["MaxLength"] + $required = $props[$prop]["Required"] + if ($maxLen -gt 0 -and $required) { + $chineseName = $prop + $pattern = "public\s+(\w+)\s+$prop\s*{" + $replacement = "`n [Required(ErrorMessage = `"$chineseName为必填字段`")]`n [MaxLength($maxLen, ErrorMessage = `"$chineseName长度不超过$maxLen字符`")]`n public `$1 $prop {" + $content = $content -replace $pattern, $replacement + } + elseif ($maxLen -gt 0) { + $chineseName = $prop + $pattern = "public\s+(\w+)\s+$prop\s*{" + $replacement = "`n [MaxLength($maxLen, ErrorMessage = `"$chineseName长度不超过$maxLen字符`")]`n public `$1 $prop {" + $content = $content -replace $pattern, $replacement + } + } + } + + Set-Content $filePath $content + Write-Host "Updated: $filePath" + } + catch { + Write-Host "Error updating $($filePath): $_" + } +} + +# Get all DTO files still needing updates +$dtoFiles = Get-ChildItem $dtoPath -Recurse -Filter "*.cs" -Exclude "ModuleConsts.cs", "MenuViewModel.cs", "EnumDto.cs" + +Write-Host "Processing $($dtoFiles.Count) DTO files..." + +foreach ($file in $dtoFiles) { + $content = Get-Content $file.FullName -Raw + + # Skip if already has validation attributes + if ($content -match "\[Required\]|\[MaxLength\]") { + continue + } + + # Determine module from path + $module = Split-Path (Split-Path $file.FullName) -Leaf + + if ($constraints.ContainsKey($module)) { + Add-ValidationAttributes -filePath $file.FullName -props $constraints[$module] + } +} + +Write-Host "Script completed!" -- Gitee From 2e26421dbccd3d1f347424f964bb84a126b8a083 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 6 Dec 2025 20:01:02 +0800 Subject: [PATCH 15/21] enhancement Expressionable. --- .../Business/Asset/AssetService.cs | 3 +- .../Business/Customer/CustomerService.cs | 30 +-- .../EnergyManagementService.cs | 22 +- .../Business/News/NewsService.cs | 18 +- .../PromotionContentService.cs | 14 +- .../Business/Reser/ReserService.cs | 3 +- .../Business/Room/RoomService.cs | 26 +- .../Business/Room/RoomTypeService.cs | 12 +- .../Business/Spend/SpendService.cs | 30 +-- .../Employee/Check/EmployeeCheckService.cs | 12 +- .../Employee/EmployeeService.cs | 4 +- .../RewardPunishmentService.cs | 12 +- .../Administrator/AdminService.cs | 14 +- .../SystemManagement/Base/BaseService.cs | 74 +----- .../SystemManagement/Notice/NoticeService.cs | 14 +- .../SystemManagement/Role/RoleAppService.cs | 19 +- .../Util/UtilService.cs | 21 +- .../BaseDto/BaseOutputDto.cs | 1 + .../Asset/Dto/Asset/ReadAssetInputDto.cs | 5 + .../Dto/Employee/CreateEmployeeInputDto.cs | 2 - .../EOM.TSHotelManagement.Common.Util.csproj | 1 + .../Helper/SqlFilterBuilder.cs | 229 ++++++++++++++++++ 22 files changed, 268 insertions(+), 298 deletions(-) create mode 100644 EOM.TSHotelManagement.Common.Util/Helper/SqlFilterBuilder.cs diff --git a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs index 8d6f799..0b7b4b1 100644 --- a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs +++ b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs @@ -101,7 +101,8 @@ namespace EOM.TSHotelManagement.Application //查询所有员工信息 List employees = employeeRepository.GetList(); - var where = Expressionable.Create(); + var where = SqlFilterBuilder.BuildExpression(asset); + where = where.And(a => a.IsDelete == asset.IsDelete); int count = 0; diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index 7b3cb4b..c5d6aba 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -257,24 +257,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectCustomers(ReadCustomerInputDto readCustomerInputDto) { - var where = Expressionable.Create(); - where = where.And(a => a.IsDelete == readCustomerInputDto.IsDelete); - if (!readCustomerInputDto.CustomerNumber.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerNumber.Contains(readCustomerInputDto.CustomerNumber)); - } - if (!readCustomerInputDto.CustomerName.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerName.Contains(readCustomerInputDto.CustomerName)); - } - if (!readCustomerInputDto.CustomerPhoneNumber.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerPhoneNumber.Contains(readCustomerInputDto.CustomerPhoneNumber)); - } - if (!readCustomerInputDto.IdCardNumber.IsNullOrEmpty()) - { - where = where.And(a => a.IdCardNumber.Contains(readCustomerInputDto.IdCardNumber)); - } + var where = SqlFilterBuilder.BuildExpression(readCustomerInputDto); var count = 0; List custos = new List(); if (!readCustomerInputDto.IgnorePaging && readCustomerInputDto.Page != 0 && readCustomerInputDto.PageSize != 0) @@ -338,16 +321,7 @@ namespace EOM.TSHotelManagement.Application //查询出所有客户信息 SingleOutputDto singleOutputDto = new SingleOutputDto(); - var where = Expressionable.Create(); - - if (!custo.CustomerNumber.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerNumber.Contains(custo.CustomerNumber)); - } - if (!custo.CustomerName.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerName.Contains(custo.CustomerName)); - } + var where = SqlFilterBuilder.BuildExpression(custo); var customer = custoRepository.AsQueryable().Where(where.ToExpression()).Single(); diff --git a/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs b/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs index b3500f3..89469cf 100644 --- a/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs +++ b/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs @@ -56,27 +56,7 @@ namespace EOM.TSHotelManagement.Application /// 符合条件的水电费信息列表 public ListOutputDto SelectEnergyManagementInfo(ReadEnergyManagementInputDto readEnergyManagementInputDto) { - var where = Expressionable.Create(); - - if (!string.IsNullOrEmpty(readEnergyManagementInputDto.RoomNo)) - { - where = where.And(a => a.RoomNumber.Equals(readEnergyManagementInputDto.RoomNo)); - } - - if (readEnergyManagementInputDto.UseDate.HasValue) - { - where = where.And(a => a.StartDate >= readEnergyManagementInputDto.UseDate.Value); - } - - if (readEnergyManagementInputDto.EndDate.HasValue) - { - where = where.And(a => a.EndDate >= readEnergyManagementInputDto.EndDate.Value); - } - - if (!readEnergyManagementInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readEnergyManagementInputDto.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(readEnergyManagementInputDto); var count = 0; diff --git a/EOM.TSHotelManagement.Application/Business/News/NewsService.cs b/EOM.TSHotelManagement.Application/Business/News/NewsService.cs index 6e6dfd5..6cf581f 100644 --- a/EOM.TSHotelManagement.Application/Business/News/NewsService.cs +++ b/EOM.TSHotelManagement.Application/Business/News/NewsService.cs @@ -45,23 +45,7 @@ namespace EOM.TSHotelManagement.Application }) .ToList(); - var where = SqlSugar.Expressionable.Create(); - if (!readNewsInputDto.NewId.IsNullOrEmpty()) - { - where = where.And(n => n.NewId.Contains(readNewsInputDto.NewId)); - } - if (!readNewsInputDto.NewsTitle.IsNullOrEmpty()) - { - where = where.And(n => n.NewsTitle.Contains(readNewsInputDto.NewsTitle)); - } - if (!readNewsInputDto.NewsType.IsNullOrEmpty()) - { - where = where.And(n => n.NewsType == readNewsInputDto.NewsType); - } - if (!readNewsInputDto.NewsStatus.IsNullOrEmpty()) - { - where = where.And(n => n.NewsStatus == readNewsInputDto.NewsStatus); - } + var where = SqlFilterBuilder.BuildExpression(readNewsInputDto); var count = 0; var newsList = new List(); diff --git a/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs b/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs index efd0d9d..8afa615 100644 --- a/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs +++ b/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs @@ -56,19 +56,7 @@ namespace EOM.TSHotelManagement.Application public ListOutputDto SelectPromotionContentAll(ReadPromotionContentInputDto readPromotionContentInputDto) { var count = 0; - var where = Expressionable.Create(); - if (!readPromotionContentInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readPromotionContentInputDto.IsDelete); - } - if (!readPromotionContentInputDto.PromotionContentNumber.IsNullOrEmpty()) - { - where = where.And(a => a.PromotionContentNumber.Contains(readPromotionContentInputDto.PromotionContentNumber)); - } - if (!readPromotionContentInputDto.PromotionContentMessage.IsNullOrEmpty()) - { - where = where.And(a => a.PromotionContentMessage.Contains(readPromotionContentInputDto.PromotionContentMessage)); - } + var where = SqlFilterBuilder.BuildExpression(readPromotionContentInputDto); var Data = new List(); if (!readPromotionContentInputDto.IgnorePaging && readPromotionContentInputDto.Page != 0 && readPromotionContentInputDto.PageSize != 0) { diff --git a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs index 6a7a2e3..7dd7e31 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs @@ -81,8 +81,7 @@ namespace EOM.TSHotelManagement.Application }) .ToList(); - var where = Expressionable.Create(); - where = where.And(a => a.IsDelete == readReserInputDto.IsDelete); + var where = SqlFilterBuilder.BuildExpression(readReserInputDto); var count = 0; var Data = new List(); if (!readReserInputDto.IgnorePaging && readReserInputDto.Page != 0 && readReserInputDto.PageSize != 0) diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs index 082950b..70b7f69 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs @@ -115,16 +115,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomByRoomState(ReadRoomInputDto readRoomInputDto) { - var where = Expressionable.Create(); - - if (!readRoomInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readRoomInputDto.IsDelete); - } - if (readRoomInputDto.RoomStateId > 0) - { - where = where.And(a => a.RoomStateId == readRoomInputDto.RoomStateId); - } + var where = SqlFilterBuilder.BuildExpression(readRoomInputDto); var count = 0; List rooms = new List(); @@ -200,12 +191,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomAll(ReadRoomInputDto readRoomInputDto) { - var where = Expressionable.Create(); - - if (!readRoomInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readRoomInputDto.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(readRoomInputDto); var count = 0; List rooms = new List(); @@ -259,13 +245,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomByTypeName(ReadRoomInputDto readRoomInputDto) { - var where = Expressionable.Create(); - - if (!readRoomInputDto.RoomTypeName.IsNullOrEmpty()) - { - var roomType = roomTypeRepository.GetFirst(a => a.RoomTypeName == readRoomInputDto.RoomTypeName); - where = where.And(a => a.RoomTypeId == roomType.RoomTypeId); - } + var where = SqlFilterBuilder.BuildExpression(readRoomInputDto); var count = 0; List rooms = new List(); diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs index c96c781..566104e 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs @@ -63,17 +63,9 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomTypesAll(ReadRoomTypeInputDto readRoomTypeInputDto) { - var where = Expressionable.Create(); + var types = new List(); - where = where.And(a => a.IsDelete == 0); - - List types = new List(); - - if (!readRoomTypeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readRoomTypeInputDto.IsDelete); - - } + var where = SqlFilterBuilder.BuildExpression(readRoomTypeInputDto); var count = 0; diff --git a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs index 0cac248..c8deb8f 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs @@ -94,11 +94,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SeletHistorySpendInfoAll(ReadSpendInputDto readSpendInputDto) { - var where = Expressionable.Create(); - if (!readSpendInputDto.CustomerNumber.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerNumber == readSpendInputDto.CustomerNumber); - } + var where = SqlFilterBuilder.BuildExpression(readSpendInputDto); var count = 0; List spends = new List(); if (!readSpendInputDto.IgnorePaging && readSpendInputDto.Page != 0 && readSpendInputDto.PageSize != 0) @@ -146,27 +142,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectSpendByRoomNo(ReadSpendInputDto readSpendInputDto) { - var where = Expressionable.Create(); - - if (!readSpendInputDto.CustomerNumber.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerNumber == readSpendInputDto.CustomerNumber); - } - - if (!readSpendInputDto.SettlementStatus.IsNullOrEmpty()) - { - where = where.And(a => a.SettlementStatus == readSpendInputDto.SettlementStatus); - } - - if (!readSpendInputDto.RoomNumber.IsNullOrEmpty()) - { - where = where.And(a => a.RoomNumber == readSpendInputDto.RoomNumber); - } - - if (!readSpendInputDto.SpendNumber.IsNullOrEmpty()) - { - where = where.And(a => a.SpendNumber.Contains(readSpendInputDto.SpendNumber)); - } + var where = SqlFilterBuilder.BuildExpression(readSpendInputDto); var count = 0; List spends = new List(); @@ -214,7 +190,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectSpendInfoAll(ReadSpendInputDto readSpendInputDto) { - var where = Expressionable.Create(); + var where = SqlFilterBuilder.BuildExpression(readSpendInputDto); var count = 0; List spends = new List(); if (!readSpendInputDto.IgnorePaging && readSpendInputDto.Page != 0 && readSpendInputDto.PageSize != 0) diff --git a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs index b4cafdb..a18651c 100644 --- a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs @@ -58,17 +58,7 @@ namespace EOM.TSHotelManagement.Application { List workerChecks = new List(); - var where = Expressionable.Create(); - - if (!wid.EmployeeId.IsNullOrEmpty()) - { - where = where.And(a => a.EmployeeId == wid.EmployeeId); - } - - if (!wid.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == wid.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(wid); var count = 0; diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index 4837a1b..7f7c472 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -210,9 +210,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectEmployeeAll(ReadEmployeeInputDto readEmployeeInputDto) { - var where = Expressionable.Create(); - - where = where.And(a => a.IsDelete != 1); + var where = SqlFilterBuilder.BuildExpression(readEmployeeInputDto); //查询所有教育程度信息 List educations = new List(); diff --git a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs index f820321..9f34822 100644 --- a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs +++ b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs @@ -93,17 +93,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectAllRewardPunishmentByEmployeeId(ReadEmployeeRewardPunishmentInputDto wn) { - var where = Expressionable.Create(); - - if (!wn.EmployeeId.IsNullOrEmpty()) - { - where = where.And(a => a.EmployeeId == wn.EmployeeId); - } - - if (!wn.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == wn.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(wn); //查询所有超级管理员 List admins = adminRepository.GetList(a => a.IsDelete != 1); diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index cd2be37..e546a09 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -186,12 +186,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto GetAllAdminList(ReadAdministratorInputDto readAdministratorInputDto) { - var where = Expressionable.Create(); - - if (!readAdministratorInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readAdministratorInputDto.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(readAdministratorInputDto); var count = 0; List administrators = new List(); @@ -313,12 +308,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto GetAllAdminTypes(ReadAdministratorTypeInputDto readAdministratorTypeInputDto) { - var where = Expressionable.Create(); - - if (!readAdministratorTypeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readAdministratorTypeInputDto.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(readAdministratorTypeInputDto); var count = 0; List administratorTypes = new List(); diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs index 8a8d0a3..ee688cf 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs @@ -243,16 +243,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectPositionAll(ReadPositionInputDto positionInputDto = null) { - var where = Expressionable.Create(); - - if (positionInputDto != null && !positionInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == positionInputDto.IsDelete); - } - if (positionInputDto != null && !positionInputDto.PositionName.IsNullOrEmpty()) - { - where = where.And(a => a.PositionName.Contains(positionInputDto.PositionName)); - } + var where = SqlFilterBuilder.BuildExpression(positionInputDto ?? new ReadPositionInputDto()); var count = 0; var positions = new List(); @@ -335,16 +326,7 @@ namespace EOM.TSHotelManagement.Application { var nations = new List(); - var where = Expressionable.Create(); - - if (nationInputDto != null && !nationInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == nationInputDto.IsDelete); - } - if (nationInputDto != null && !nationInputDto.NationName.IsNullOrEmpty()) - { - where = where.And(a => a.NationName.Contains(nationInputDto.NationName)); - } + var where = SqlFilterBuilder.BuildExpression(nationInputDto ?? new ReadNationInputDto()); var count = 0; if (!nationInputDto.IgnorePaging && nationInputDto.Page != 0 && nationInputDto.PageSize != 0) @@ -424,16 +406,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectEducationAll(ReadEducationInputDto educationInputDto = null) { - var where = Expressionable.Create(); - - if (!educationInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == educationInputDto.IsDelete); - } - if (!educationInputDto.EducationName.IsNullOrEmpty()) - { - where = where.And(a => a.EducationName.Contains(educationInputDto.EducationName)); - } + var where = SqlFilterBuilder.BuildExpression(educationInputDto ?? new ReadEducationInputDto()); var count = 0; var educations = new List(); @@ -663,15 +636,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectCustoTypeAll(ReadCustoTypeInputDto readCustoTypeInputDto) { - var where = Expressionable.Create(); - if (!readCustoTypeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readCustoTypeInputDto.IsDelete); - } - if (!readCustoTypeInputDto.CustomerTypeName.IsNullOrEmpty()) - { - where = where.And(a => a.CustomerTypeName.Contains(readCustoTypeInputDto.CustomerTypeName)); - } + var where = SqlFilterBuilder.BuildExpression(readCustoTypeInputDto); var count = 0; var custoTypes = new List(); @@ -771,15 +736,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectPassPortTypeAll(ReadPassportTypeInputDto readPassportTypeInputDto) { - var where = Expressionable.Create(); - if (!readPassportTypeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readPassportTypeInputDto.IsDelete); - } - if (!readPassportTypeInputDto.PassportName.IsNullOrEmpty()) - { - where = where.And(a => a.PassportName.Contains(readPassportTypeInputDto.PassportName)); - } + var where = SqlFilterBuilder.BuildExpression(readPassportTypeInputDto); var count = 0; var passPortTypes = new List(); @@ -879,15 +836,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRewardPunishmentTypeAll(ReadRewardPunishmentTypeInputDto readRewardPunishmentTypeInputDto) { - var where = Expressionable.Create(); - if (!readRewardPunishmentTypeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readRewardPunishmentTypeInputDto.IsDelete); - } - if (!readRewardPunishmentTypeInputDto.RewardPunishmentTypeName.IsNullOrEmpty()) - { - where = where.And(a => a.RewardPunishmentTypeName.Contains(readRewardPunishmentTypeInputDto.RewardPunishmentTypeName)); - } + var where = SqlFilterBuilder.BuildExpression(readRewardPunishmentTypeInputDto); var count = 0; var gBTypes = new List(); @@ -971,16 +920,7 @@ namespace EOM.TSHotelManagement.Application { var Data = new List(); - var where = Expressionable.Create(); - - if (!readAppointmentNoticeTypeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readAppointmentNoticeTypeInputDto.IsDelete); - } - if (!readAppointmentNoticeTypeInputDto.NoticeTypeName.IsNullOrEmpty()) - { - where = where.And(a => a.NoticeTypeName.Contains(readAppointmentNoticeTypeInputDto.NoticeTypeName)); - } + var where = SqlFilterBuilder.BuildExpression(readAppointmentNoticeTypeInputDto); var count = 0; diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs index 1475c7b..c4df28e 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs @@ -56,19 +56,7 @@ namespace EOM.TSHotelManagement.Application public ListOutputDto SelectNoticeAll(ReadAppointmentNoticeInputDto readAppointmentNoticeInputDto) { var ntc = new List(); - var where = Expressionable.Create(); - if (!string.IsNullOrEmpty(readAppointmentNoticeInputDto.NoticeTheme)) - { - where = where.And(a => a.NoticeTheme.Contains(readAppointmentNoticeInputDto.NoticeTheme)); - } - if (!string.IsNullOrEmpty(readAppointmentNoticeInputDto.NoticeType)) - { - where = where.And(a => a.NoticeType == readAppointmentNoticeInputDto.NoticeType); - } - if (!readAppointmentNoticeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readAppointmentNoticeInputDto.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(readAppointmentNoticeInputDto); var count = 0; ntc = noticeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAppointmentNoticeInputDto.Page, readAppointmentNoticeInputDto.PageSize, ref count); ntc.ForEach(source => diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs index 86fc1bf..e73c18f 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs @@ -69,24 +69,7 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoleList(ReadRoleInputDto readRoleInputDto) { - var where = Expressionable.Create(); - - if (!readRoleInputDto.RoleNumber.IsNullOrEmpty()) - { - where = where.And(x => x.RoleNumber.Contains(readRoleInputDto.RoleNumber)); - } - if (!readRoleInputDto.RoleName.IsNullOrEmpty()) - { - where = where.And(x => x.RoleName.Contains(readRoleInputDto.RoleName)); - } - if (!readRoleInputDto.RoleDescription.IsNullOrEmpty()) - { - where = where.And(x => x.RoleDescription.Contains(readRoleInputDto.RoleDescription)); - } - if (!readRoleInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(x => x.IsDelete == readRoleInputDto.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(readRoleInputDto); var roles = new List(); diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index 21005a5..2d88d98 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -83,19 +83,7 @@ namespace EOM.TSHotelManagement.Application { List operationLogs = new List(); - var where = Expressionable.Create(); - - if (!readOperationLogInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readOperationLogInputDto.IsDelete); - } - if (!readOperationLogInputDto.LogLevel.IsNullOrEmpty()) - { - if (readOperationLogInputDto.LogLevel.HasValue) - { - where = where.And(a => a.LogLevel == readOperationLogInputDto.LogLevel.Value); - } - } + var where = SqlFilterBuilder.BuildExpression(readOperationLogInputDto); var count = 0; if (readOperationLogInputDto.Page != 0 && readOperationLogInputDto.PageSize != 0) @@ -134,12 +122,7 @@ namespace EOM.TSHotelManagement.Application { List requestLogs = new List(); - var where = Expressionable.Create(); - - if (!readRequestLogInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == readRequestLogInputDto.IsDelete); - } + var where = SqlFilterBuilder.BuildExpression(readRequestLogInputDto); var count = 0; if (readRequestLogInputDto.Page != 0 && readRequestLogInputDto.PageSize != 0) diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs index b3557f3..6d92674 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs @@ -2,5 +2,6 @@ { public class BaseOutputDto : BaseAuditDto { + public int? IsDelete { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs index 30dc867..b104c54 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs @@ -5,6 +5,11 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadAssetInputDto : ListInputDto { public string AssetNumber { get; set; } + public string AssetName { get; set; } + public string DepartmentCode { get; set; } + public string AcquiredByEmployeeId { get; set; } + public DateOnly AcquisitionDateStart { get; set; } + public DateOnly AcquisitionDateEnd { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs index 03db5b6..df7b5cc 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs @@ -44,8 +44,6 @@ namespace EOM.TSHotelManagement.Common.Contract [MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } - [Required(ErrorMessage = "员工密码为必填字段")] - [MaxLength(256, ErrorMessage = "员工密码长度不超过256字符")] public string Password { get; set; } [Required(ErrorMessage = "员工入职时间为必填字段")] diff --git a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj index 3b0a49f..3aee476 100644 --- a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj +++ b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj @@ -12,6 +12,7 @@ + diff --git a/EOM.TSHotelManagement.Common.Util/Helper/SqlFilterBuilder.cs b/EOM.TSHotelManagement.Common.Util/Helper/SqlFilterBuilder.cs new file mode 100644 index 0000000..3b32f3d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Util/Helper/SqlFilterBuilder.cs @@ -0,0 +1,229 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using SqlSugar; + +namespace EOM.TSHotelManagement.Common.Util +{ + /// + /// 通用的根据 DTO 自动生成 SqlSugar `Expressionable` 过滤表达式的构建器。 + /// 用法:`var where = SqlFilterBuilder.BuildExpression<Entity, Dto>(dto);` + /// 支持:字符串模糊匹配、数值/布尔/枚举精确匹配、日期/数值范围(属性名含 Start/End/From/To/Min/Max 的自动识别)。 + /// + public static class SqlFilterBuilder + { + private static readonly string[] RangeSuffixesStart = new[] { "Start", "From", "Min" }; + private static readonly string[] RangeSuffixesEnd = new[] { "End", "To", "Max" }; + + public static Expressionable BuildExpression(TDto dto) + where TEntity : class, new() + { + var where = Expressionable.Create(); + if (dto == null) return where; + + var dtoType = typeof(TDto); + var entityType = typeof(TEntity); + var dtoProps = dtoType.GetProperties(BindingFlags.Public | BindingFlags.Instance); + + foreach (var dprop in dtoProps) + { + var rawValue = dprop.GetValue(dto); + if (rawValue == null) continue; + + // skip default values for value types + if (IsDefaultValue(rawValue)) continue; + + var dname = dprop.Name; + + // Handle range properties: e.g. CreateDateStart/CreateDateEnd => CreateDate >= Start, <= End + var rangeBase = GetRangeBaseName(dname, out var rangeType); + if (rangeBase != null) + { + var targetProp = entityType.GetProperty(rangeBase, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase); + if (targetProp != null) + { + if (TryBuildComparisonExpression(targetProp, rawValue, rangeType == RangeType.Start ? ComparisonType.GreaterOrEqual : ComparisonType.LessOrEqual, out var expr)) + { + where = where.And(expr); + } + } + continue; + } + + // Normal property name match + var entityProp = entityType.GetProperty(dname, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase); + if (entityProp == null) continue; + + // string -> Contains + if (entityProp.PropertyType == typeof(string)) + { + var s = rawValue as string; + if (!string.IsNullOrEmpty(s)) + { + where = where.And(BuildStringContainsExpression(entityProp.Name, s)); + } + continue; + } + + // For other types use equality + if (TryBuildEqualityExpression(entityProp, rawValue, out var eqExpr)) + { + where = where.And(eqExpr); + } + } + + return where; + } + + private static bool IsDefaultValue(object value) + { + var t = value.GetType(); + if (!t.IsValueType) return false; + var defaultVal = Activator.CreateInstance(t); + return Equals(value, defaultVal); + } + + private enum RangeType { Start, End } + + private static string GetRangeBaseName(string propName, out RangeType? rangeType) + { + rangeType = null; + foreach (var s in RangeSuffixesStart) + { + if (propName.EndsWith(s, StringComparison.OrdinalIgnoreCase)) + { + rangeType = RangeType.Start; + return propName.Substring(0, propName.Length - s.Length); + } + } + foreach (var s in RangeSuffixesEnd) + { + if (propName.EndsWith(s, StringComparison.OrdinalIgnoreCase)) + { + rangeType = RangeType.End; + return propName.Substring(0, propName.Length - s.Length); + } + } + return null; + } + + private enum ComparisonType { GreaterOrEqual, LessOrEqual } + + private static bool TryBuildComparisonExpression(PropertyInfo entityProp, object value, ComparisonType cmpType, out Expression> expr) + { + expr = null; + var entityType = typeof(TEntity); + var param = Expression.Parameter(entityType, "x"); + Expression member = null; + try + { + member = Expression.PropertyOrField(param, entityProp.Name); + } + catch + { + return false; + } + + // Convert constant to target type (handle nullable types) + var targetType = Nullable.GetUnderlyingType(entityProp.PropertyType) ?? entityProp.PropertyType; + object constVal; + try + { + constVal = Convert.ChangeType(value, targetType); + } + catch + { + // cannot convert + return false; + } + + var constant = Expression.Constant(constVal, targetType); + + // if member is nullable, access Value + if (Nullable.GetUnderlyingType(entityProp.PropertyType) != null) + { + // x.Prop.HasValue && x.Prop.Value >= constant + var hasValue = Expression.Property(member, "HasValue"); + var valueAccess = Expression.Property(member, "Value"); + BinaryExpression compare = cmpType == ComparisonType.GreaterOrEqual + ? Expression.GreaterThanOrEqual(valueAccess, constant) + : Expression.LessThanOrEqual(valueAccess, constant); + var body = Expression.AndAlso(hasValue, compare); + expr = Expression.Lambda>(body, param); + return true; + } + + BinaryExpression binary = cmpType == ComparisonType.GreaterOrEqual + ? Expression.GreaterThanOrEqual(member, constant) + : Expression.LessThanOrEqual(member, constant); + + expr = Expression.Lambda>(binary, param); + return true; + } + + private static Expression> BuildStringContainsExpression(string propName, string value) + { + var entityType = typeof(TEntity); + var param = Expression.Parameter(entityType, "x"); + var member = Expression.PropertyOrField(param, propName); + var notNull = Expression.NotEqual(member, Expression.Constant(null, typeof(string))); + var method = typeof(string).GetMethod("Contains", new[] { typeof(string) }); + var call = Expression.Call(member, method, Expression.Constant(value)); + var body = Expression.AndAlso(notNull, call); + return Expression.Lambda>(body, param); + } + + private static bool TryBuildEqualityExpression(PropertyInfo entityProp, object value, out Expression> expr) + { + expr = null; + var entityType = typeof(TEntity); + var param = Expression.Parameter(entityType, "x"); + Expression member = null; + try + { + member = Expression.PropertyOrField(param, entityProp.Name); + } + catch + { + return false; + } + + var targetType = Nullable.GetUnderlyingType(entityProp.PropertyType) ?? entityProp.PropertyType; + object constVal; + try + { + if (value.GetType() == targetType) + { + constVal = value; + } + else + { + constVal = Convert.ChangeType(value, targetType); + } + } + catch + { + return false; + } + + var constant = Expression.Constant(constVal, targetType); + + // If entity member is nullable, compare Value + if (Nullable.GetUnderlyingType(entityProp.PropertyType) != null) + { + var hasValue = Expression.Property(member, "HasValue"); + var valueAccess = Expression.Property(member, "Value"); + var equal = Expression.Equal(valueAccess, constant); + var body = Expression.AndAlso(hasValue, equal); + expr = Expression.Lambda>(body, param); + return true; + } + + var eq = Expression.Equal(member, constant); + expr = Expression.Lambda>(eq, param); + return true; + } + } +} -- Gitee From 576e7009ccc453960c89444e2a1123f0b43930a4 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 13 Dec 2025 14:15:03 +0800 Subject: [PATCH 16/21] Refactor Project Layer. --- .../.config/dotnet-tools.json | 0 ...tomAuthorizationMiddlewareResultHandler.cs | 4 +- .../Authorization/PermissionsAuthorization.cs | 2 +- .../Config/CsrfTokenConfig.cs | 0 .../Application/NavBar/NavBarController.cs | 4 +- .../Business/Asset/AssetController.cs | 4 +- .../Customer/CustomerAccountController.cs | 4 +- .../Business/Customer/CustomerController.cs | 4 +- .../EnergyManagementController.cs | 2 +- .../Business/News/NewsController.cs | 4 +- .../PromotionContentController.cs | 4 +- .../Business/Reser/ReserController.cs | 4 +- .../Business/Room/RoomController.cs | 4 +- .../Business/Room/RoomTypeController.cs | 4 +- .../Business/Sellthing/SellthingController.cs | 4 +- .../Business/Spend/SpendController.cs | 4 +- .../Dashboard/DashboardController.cs | 4 +- .../Employee/Check/EmployeeCheckController.cs | 4 +- .../Employee/EmployeeController.cs | 4 +- .../History/EmployeeHistoryController.cs | 4 +- .../Employee/Photo/EmployeePhotoController.cs | 4 +- .../RewardPunishmentController.cs | 4 +- .../Controllers/LoginController.cs | 4 +- .../Administrator/AdminController.cs | 8 +-- .../SystemManagement/Base/BaseController.cs | 4 +- .../CustomerPermissionController.cs | 8 +-- .../EmployeePermission/EmployeeController.cs | 10 +-- .../SystemManagement/Menu/MenuController.cs | 4 +- .../Notice/NoticeController.cs | 4 +- .../Permission/PermissionController.cs | 6 +- .../SystemManagement/Role/RoleController.cs | 8 +-- .../SupervisionStatisticsController.cs | 4 +- .../VipRule/VipRuleController.cs | 4 +- .../Controllers/Util/UtilityController.cs | 4 +- .../EOM.TSHotelManagement.API.csproj | 2 +- .../Extension/DateOnlyJsonConverter.cs | 0 .../Extension/MiddlewareExtensions.cs | 0 .../Extension/MvcOptionsExtensions.cs | 0 .../Extension/PermissionSyncExtensions.cs | 2 +- .../Extension/RouteExtension.cs | 0 .../Factory/JwtConfigFactory.cs | 2 +- .../Factory/LskyConfigFactory.cs | 2 +- .../Factory/MailConfigFactory.cs | 4 +- .../AuthorizeAllControllersConvention.cs | 0 .../Filters/CSRFTokenOperationProcessor.cs | 0 .../Filters/RequestLoggingMiddleware.cs | 4 +- .../Filters/ValidationFilter.cs | 4 +- .../Program.cs | 0 .../Properties/launchSettings.json | 0 .../Startup.cs | 8 +-- .../appsettings.Development.json | 0 .../appsettings.json | 0 .../Config/JwtConfig.cs | 2 +- .../Config/LskyConfig.cs | 2 +- .../Config/MailConfig.cs | 2 +- .../Config/Template.cs | 2 +- .../Constant/Constant.cs | 5 +- .../Constant/ConsumptionConstant.cs | 2 +- .../Constant/SpendType.cs | 2 +- .../Constant/SystemConstants.cs | 2 +- .../EOM.TSHotelManagement.Common.csproj | 0 .../Enums/LogLevel.cs | 2 +- .../Enums/RoomState.cs | 2 +- .../GenerateJWT/JWTHelper.cs | 2 +- .../Helper/DataProtectionHelper.cs | 2 +- .../Helper/EntityMapper.cs | 2 +- .../Helper/EnumHelper.cs | 6 +- .../Helper/LocalizationHelper.cs | 2 +- .../Helper/LogHelper.cs | 2 +- .../Helper/LskyHelper.cs | 2 +- .../Helper/MailHelper.cs | 2 +- .../Helper/RandomStringGenerator.cs | 2 +- .../Helper/SqlFilterBuilder.cs | 2 +- .../Interfaces/IJwtConfigFactory.cs | 2 +- .../Interfaces/ILskyConfigFactory.cs | 2 +- .../Interfaces/IMailConfigFactory.cs | 2 +- .../Templates/EmailTemplate.cs | 2 +- .../Validator/UIDisplayAttribute.cs | 2 +- .../NavBar/Dto/CreateNavBarInputDto.cs | 4 +- .../NavBar/Dto/DeleteNavBarInputDto.cs | 2 +- .../NavBar/Dto/ReadNavBarInputDto.cs | 2 +- .../NavBar/Dto/ReadNavBarOutputDto.cs | 2 +- .../NavBar/Dto/UpdateNavBarInputDto.cs | 2 +- .../BaseDto/BaseAuditDto.cs | 2 +- .../BaseDto/BaseDto.cs | 2 +- .../BaseDto/BaseInputDto.cs | 2 +- .../BaseDto/BaseOutputDto.cs | 2 +- .../BaseDto/BaseResponse.cs | 4 +- .../BaseDto/BusinessStatusCode.cs | 2 +- .../BaseDto/CsrfTokenDto.cs | 2 +- .../BaseDto/ListInputDto.cs | 2 +- .../BaseDto/ListOutputDto.cs | 2 +- .../BaseDto/MenuDto.cs | 2 +- .../BaseDto/PagedData.cs | 2 +- .../BaseDto/SingleOutputDto.cs | 2 +- .../Asset/Dto/Asset/CreateAssetInputDto.cs | 2 +- .../Asset/Dto/Asset/DeleteAssetInputDto.cs | 2 +- .../Asset/Dto/Asset/ReadAssetInputDto.cs | 2 +- .../Asset/Dto/Asset/ReadAssetOutputDto.cs | 2 +- .../Asset/Dto/Asset/UpdateAssetInputDto.cs | 2 +- .../Dto/CustoType/CreateCustoTypeInputDto.cs | 2 +- .../Dto/CustoType/DeleteCustoTypeInputDto.cs | 2 +- .../Dto/CustoType/ReadCustoTypeInputDto.cs | 2 +- .../Dto/CustoType/ReadCustoTypeOutputDto.cs | 2 +- .../Dto/CustoType/UpdateCustoTypeInputDto.cs | 2 +- .../Dto/Customer/CreateCustomerInputDto.cs | 2 +- .../Dto/Customer/DeleteCustomerInputDto.cs | 2 +- .../Dto/Customer/ReadCustomerInputDto.cs | 2 +- .../Dto/Customer/ReadCustomerOutputDto.cs | 4 +- .../Dto/Customer/UpdateCustomerInputDto.cs | 2 +- .../ReadCustomerAccountInputDto.cs | 2 +- .../ReadCustomerAccountOutputDto.cs | 2 +- .../CreatePassportTypeInputDto.cs | 2 +- .../DeletePassportTypeInputDto.cs | 2 +- .../PassportType/ReadPassportTypeInputDto.cs | 2 +- .../PassportType/ReadPassportTypeOutputDto.cs | 2 +- .../UpdatePassportTypeInputDto.cs | 2 +- .../Dto/CreateEnergyManagementInputDto.cs | 2 +- .../Dto/DeleteEnergyManagementInputDto.cs | 2 +- .../Dto/ReadEnergyManagementInputDto.cs | 2 +- .../Dto/ReadEnergyManagementOutputDto.cs | 4 +- .../Dto/UpdateEnergyManagementInputDto.cs | 2 +- .../Business/News/Dto/AddNewsInputDto.cs | 2 +- .../Business/News/Dto/DeleteNewsInputDto.cs | 2 +- .../Business/News/Dto/ReadNewsInputDto.cs | 2 +- .../Business/News/Dto/ReadNewsOuputDto.cs | 2 +- .../Business/News/Dto/UpdateNewsInputDto.cs | 2 +- .../Dto/CreatePromotionContentInputDto.cs | 2 +- .../Dto/DeletePromotionContentInputDto.cs | 2 +- .../Dto/ReadPromotionContentInputDto.cs | 2 +- .../Dto/ReadPromotionContentOutputDto.cs | 2 +- .../Dto/UpdatePromotionContentInputDto.cs | 2 +- .../Business/Reser/Dto/CreateReserInputDto.cs | 2 +- .../Business/Reser/Dto/DeleteReserInputDto.cs | 2 +- .../Business/Reser/Dto/ReadReserInputDto.cs | 2 +- .../Business/Reser/Dto/ReadReserOutputDto.cs | 4 +- .../Business/Reser/Dto/UpdateReserInputDto.cs | 2 +- .../Room/Dto/CheckinRoomByReservationDto.cs | 2 +- .../Business/Room/Dto/CheckoutRoomDto.cs | 2 +- .../Room/Dto/Room/CreateRoomInputDto.cs | 2 +- .../Room/Dto/Room/DeleteRoomInputDto.cs | 2 +- .../Room/Dto/Room/ReadRoomInputDto.cs | 2 +- .../Room/Dto/Room/ReadRoomOutputDto.cs | 2 +- .../Room/Dto/Room/UpdateRoomInputDto.cs | 2 +- .../Dto/RoomState/CreateRoomStateInputDto.cs | 2 +- .../Dto/RoomState/DeleteRoomStateInputDto.cs | 2 +- .../Dto/RoomState/ReadRoomStateInputDto.cs | 2 +- .../Dto/RoomState/ReadRoomStateOutputDto.cs | 2 +- .../Dto/RoomState/UpdateRoomStateInputDto.cs | 2 +- .../Dto/RoomType/CreateRoomTypeInputDto.cs | 2 +- .../Dto/RoomType/DeleteRoomTypeInputDto.cs | 2 +- .../Room/Dto/RoomType/ReadRoomTypeInputDto.cs | 2 +- .../Dto/RoomType/ReadRoomTypeOutputDto.cs | 2 +- .../Dto/RoomType/UpdateRoomTypeInputDto.cs | 2 +- .../Business/Room/Dto/TransferRoomDto.cs | 2 +- .../Sellthing/Dto/CreateSellThingInputDto.cs | 2 +- .../Sellthing/Dto/DeleteSellThingInputDto.cs | 2 +- .../Sellthing/Dto/ReadSellThingInputDto.cs | 2 +- .../Sellthing/Dto/ReadSellThingOutputDto.cs | 4 +- .../Sellthing/Dto/UpdateSellThingInputDto.cs | 2 +- .../Dto/Spend/AddCustomerSpendInputDto.cs | 2 +- .../Spend/Dto/Spend/CreateSpendInputDto.cs | 2 +- .../Spend/Dto/Spend/DeleteSpendInputDto.cs | 2 +- .../Spend/Dto/Spend/ReadSpendInputDto.cs | 2 +- .../Spend/Dto/Spend/ReadSpendOutputDto.cs | 4 +- .../Spend/Dto/Spend/UpdateSpendInputDto.cs | 2 +- .../EOM.TSHotelManagement.Contract.csproj | 3 +- .../Dto/Employee/CreateEmployeeInputDto.cs | 2 +- .../Dto/Employee/DeleteEmployeeInputDto.cs | 2 +- .../Dto/Employee/ReadEmployeeInputDto.cs | 2 +- .../Dto/Employee/ReadEmployeeOutputDto.cs | 2 +- .../Dto/Employee/UpdateEmployeeInputDto.cs | 2 +- .../CreateEmployeeCheckInputDto.cs | 2 +- .../DeleteEmployeeCheckInputDto.cs | 2 +- .../ReadEmployeeCheckInputDto.cs | 2 +- .../ReadEmployeeCheckOutputDto.cs | 2 +- .../UpdateEmployeeCheckInputDto.cs | 2 +- .../CreateEmployeeHistoryInputDto.cs | 2 +- .../DeleteEmployeeHistoryInputDto.cs | 2 +- .../ReadEmployeeHistoryInputDto.cs | 2 +- .../ReadEmployeeHistoryOutputDto.cs | 2 +- .../UpdateEmployeeHistoryInputDto.cs | 2 +- .../CreateEmployeePhotoInputDto.cs | 2 +- .../DeleteEmployeePhotoInputDto.cs | 2 +- .../ReadEmployeePhotoInputDto.cs | 2 +- .../ReadEmployeePhotoOutputDto.cs | 2 +- .../UpdateEmployeePhotoInputDto.cs | 2 +- .../CreateEmployeeRewardPunishmentInputDto.cs | 2 +- .../DeleteEmployeeRewardPunishmentInputDto.cs | 2 +- .../ReadEmployeeRewardPunishmentInputDto.cs | 2 +- .../ReadEmployeeRewardPunishmentOutputDto.cs | 2 +- .../UpdateEmployeeRewardPunishmentInputDto.cs | 2 +- .../CreateRewardPunishmentTypeInputDto.cs | 2 +- .../DeleteRewardPunishmentTypeInputDto.cs | 2 +- .../ReadRewardPunishmentTypeInputDto.cs | 2 +- .../ReadRewardPunishmentTypeOutputDto.cs | 2 +- .../UpdateRewardPunishmentTypeInputDto.cs | 2 +- .../CreateAdministratorInputDto.cs | 2 +- .../DeleteAdministratorInputDto.cs | 2 +- .../ReadAdministratorInputDto.cs | 2 +- .../ReadAdministratorOutputDto.cs | 2 +- .../UpdateAdministratorInputDto.cs | 2 +- .../CreateAdministratorTypeInputDto.cs | 2 +- .../DeleteAdministratorTypeInputDto.cs | 2 +- .../ReadAdministratorTypeInputDto.cs | 2 +- .../ReadAdministratorTypeOutputDto.cs | 2 +- .../UpdateAdministratorTypeInputDto.cs | 2 +- .../CreateAppointmentNoticeInputDto.cs | 2 +- .../DeleteAppointmentNoticeInputDto.cs | 2 +- .../ReadAppointmentNoticeInputDto.cs | 2 +- .../ReadAppointmentNoticeOutputDto.cs | 2 +- .../UpdateAppointmentNoticeInputDto.cs | 2 +- .../CreateAppointmentNoticeTypeInputDto.cs | 2 +- .../DeleteAppointmentNoticeTypeInputDto.cs | 2 +- .../ReadAppointmentNoticeTypeInputDto.cs | 2 +- .../ReadAppointmentNoticeTypeOutputDto.cs | 2 +- .../UpdateAppointmentNoticeTypeInputDto.cs | 2 +- .../Department/CreateDepartmentInputDto.cs | 2 +- .../Department/DeleteDepartmentInputDto.cs | 2 +- .../Dto/Department/ReadDepartmentInputDto.cs | 2 +- .../Dto/Department/ReadDepartmentOutputDto.cs | 2 +- .../Department/UpdateDepartmentInputDto.cs | 2 +- .../SystemManagement/Dto/EnumDto.cs | 2 +- .../Dto/Menu/CreateMenuInputDto.cs | 2 +- .../Dto/Menu/DeleteMenuInputDto.cs | 2 +- .../Dto/Menu/MenuViewModel.cs | 2 +- .../SystemManagement/Dto/Menu/ModuleConsts.cs | 2 +- .../Dto/Menu/ReadMenuInputDto.cs | 2 +- .../Dto/Menu/ReadMenuOutputDto.cs | 2 +- .../Dto/Menu/UpdateMenuInputDto.cs | 2 +- .../Dto/Nation/CreateNationInputDto.cs | 2 +- .../Dto/Nation/DeleteNationInputDto.cs | 2 +- .../Dto/Nation/ReadNationInputDto.cs | 2 +- .../Dto/Nation/ReadNationOutputDto.cs | 2 +- .../Dto/Nation/UpdateNationInputDto.cs | 2 +- .../AssignUserPermissionsInputDto.cs | 4 +- .../GrantRolePermissionsInputDto.cs | 4 +- .../Dto/Permission/ReadPermissionDtos.cs | 4 +- .../Permission/UserRolePermissionOutputDto.cs | 4 +- .../Dto/Position/CreatePositionInputDto.cs | 2 +- .../Dto/Position/DeletePositionInputDto.cs | 2 +- .../Dto/Position/ReadPositionInputDto.cs | 2 +- .../Dto/Position/ReadPositionOutputDto.cs | 2 +- .../Dto/Position/UpdatePositionInputDto.cs | 2 +- .../Qualification/CreateEducationInputDto.cs | 2 +- .../Qualification/DeleteEducationInputDto.cs | 2 +- .../Qualification/ReadEducationInputDto.cs | 2 +- .../Qualification/ReadEducationOutputDto.cs | 2 +- .../Qualification/UpdateEducationInputDto.cs | 2 +- .../Dto/Role/AssignRoleUsersInputDto.cs | 2 +- .../Dto/Role/AssignUserRolesInputDto.cs | 2 +- .../Dto/Role/CreateRoleInputDto.cs | 2 +- .../Dto/Role/DeleteRoleInputDto.cs | 2 +- .../Dto/Role/ReadRoleInputDto.cs | 2 +- .../Dto/Role/ReadRoleOutputDto.cs | 2 +- .../Dto/Role/UpdateRoleInputDto.cs | 2 +- .../CreateSupervisionStatisticsInputDto.cs | 2 +- .../DeleteSupervisionStatisticsInputDto.cs | 2 +- .../ReadSupervisionStatisticsInputDto.cs | 2 +- .../ReadSupervisionStatisticsOutputDto.cs | 2 +- .../UpdateSupervisionStatisticsInputDto.cs | 2 +- .../CreateSystemInformationInputDto.cs | 2 +- .../DeleteSystemInformationInputDto.cs | 2 +- .../ReadSystemInformationInputDto.cs | 2 +- .../ReadSystemInformationOutputDto.cs | 2 +- .../UpdateSystemInformationInputDto.cs | 2 +- .../CreateVipLevelRuleInputDto.cs | 2 +- .../DeleteVipLevelRuleInputDto.cs | 2 +- .../VipLevelRule/ReadVipLevelRuleInputDto.cs | 2 +- .../VipLevelRule/ReadVipLevelRuleOutputDto.cs | 2 +- .../UpdateVipLevelRuleInputDto.cs | 2 +- .../CreateApplicationVersionInputDto.cs | 2 +- .../DeleteApplicationVersionInputDto.cs | 2 +- .../ReadApplicationVersionInputDto.cs | 2 +- .../ReadApplicationVersionOutputDto.cs | 2 +- .../UpdateApplicationVersionInputDto.cs | 2 +- .../Dto/CardCode/CreateCardCodeInputDto.cs | 2 +- .../Dto/CardCode/DeleteCardCodeInputDto.cs | 2 +- .../Util/Dto/CardCode/ReadCardCodeInputDto.cs | 2 +- .../Dto/CardCode/ReadCardCodeOutputDto.cs | 2 +- .../Dto/CardCode/UpdateCardCodeInputDto.cs | 2 +- .../Dashboard/BusinessStatisticsOutputDto.cs | 2 +- .../Dto/Dashboard/HumanResourcesOutputDto.cs | 2 +- .../Dto/Dashboard/LogisticsDataOutputDto.cs | 2 +- .../Dto/Dashboard/RoomStatisticsOutputDto.cs | 2 +- .../CreateOperationLogInputDto.cs | 4 +- .../DeleteOperationLogInputDto.cs | 2 +- .../OperationLog/ReadOperationLogInputDto.cs | 2 +- .../OperationLog/ReadOperationLogOutputDto.cs | 4 +- .../UpdateOperationLogInputDto.cs | 4 +- .../Dto/RequestLog/ReadRequestLogInputDto.cs | 2 +- .../Dto/RequestLog/ReadRequestLogOutputDto.cs | 2 +- .../Connector/ISqlSugarClientConnector.cs | 2 +- .../Connector/SqlSugarClientConnector.cs | 4 +- .../DatabaseInitializer.cs | 6 +- .../IDatabaseInitializer.cs | 2 +- .../EOM.TSHotelManagement.Data.csproj | 5 +- .../Repository/GenericRepository.cs | 6 +- .../Application/NavBar/NavBar.cs | 2 +- .../BaseEntity.cs | 2 +- .../Business/Asset/Asset.cs | 2 +- .../Business/Customer/CustoSpend.cs | 2 +- .../Business/Customer/CustoType.cs | 2 +- .../Business/Customer/Customer.cs | 2 +- .../Business/Customer/CustomerAccount.cs | 2 +- .../Business/Customer/GenderType.cs | 2 +- .../Business/Customer/PassPortType.cs | 2 +- .../EnergyManagement/EnergyManagement.cs | 2 +- .../Business/News/News.cs | 2 +- .../Business/News/NewsStatus.cs | 2 +- .../Business/News/NewsType.cs | 2 +- .../PromotionContent/PromotionContent.cs | 2 +- .../Business/Reser/Reser.cs | 2 +- .../Business/Reser/ReserType.cs | 2 +- .../Business/Room/Room.cs | 2 +- .../Business/Room/RoomType.cs | 2 +- .../Business/Sellthing/SellThing.cs | 2 +- .../Business/Spend/Spend.cs | 2 +- .../EOM.TSHotelManagement.Domain.csproj | 0 .../Employee/Employee.cs | 2 +- .../Employee/EmployeeCheck.cs | 2 +- .../Employee/EmployeeHistory.cs | 2 +- .../Employee/EmployeePhoto.cs | 2 +- .../Employee/EmployeeRewardPunishment.cs | 2 +- .../Employee/RewardPunishmentType.cs | 2 +- .../SystemManagement/Administrator.cs | 2 +- .../SystemManagement/AdministratorType.cs | 2 +- .../SystemManagement/AppointmentNotice.cs | 2 +- .../SystemManagement/AppointmentNoticeType.cs | 2 +- .../SystemManagement/Department.cs | 2 +- .../SystemManagement/Education.cs | 2 +- .../SystemManagement/Menu.cs | 2 +- .../SystemManagement/Nation.cs | 2 +- .../SystemManagement/Permission.cs | 2 +- .../SystemManagement/PoliticalAffiliation.cs | 2 +- .../SystemManagement/Position.cs | 2 +- .../SystemManagement/Role.cs | 2 +- .../SystemManagement/RolePermission.cs | 2 +- .../SystemManagement/SupervisionStatistics.cs | 2 +- .../SystemManagement/SystemInformation.cs | 2 +- .../SystemManagement/UserRole.cs | 2 +- .../SystemManagement/VipLevelRule.cs | 2 +- .../Util/ApplicationVersion.cs | 2 +- .../Util/CardCode.cs | 2 +- .../Util/OperationLog.cs | 2 +- .../Util/RequestLog.cs | 2 +- .../EOM.TSHotelManagement.Migration.csproj | 2 +- .../EntityBuilder.cs | 2 +- .../Application/NavBar/INavBarService.cs | 4 +- .../Application/NavBar/NavBarService.cs | 10 +-- .../Business/Asset/AssetService.cs | 10 +-- .../Business/Asset/IAssetService.cs | 4 +- .../Account/CustomerAccountService.cs | 10 +-- .../Account/ICustomerAccountService.cs | 4 +- .../Business/Customer/CustomerService.cs | 12 ++-- .../Business/Customer/ICustomerService.cs | 4 +- .../Permission/CustomerPermissionService.cs | 14 ++--- .../Permission/ICustomerPermissionService.cs | 8 +-- .../EnergyManagementService.cs | 10 +-- .../IEnergyManagementService.cs | 2 +- .../Business/News/INewsService.cs | 4 +- .../Business/News/NewsService.cs | 14 ++--- .../IPromotionContentService.cs | 4 +- .../PromotionContentService.cs | 10 +-- .../Business/Reser/IReserService.cs | 4 +- .../Business/Reser/ReserService.cs | 12 ++-- .../Business/Room/IRoomService.cs | 4 +- .../Business/Room/IRoomTypeService.cs | 4 +- .../Business/Room/RoomService.cs | 12 ++-- .../Business/Room/RoomTypeService.cs | 10 +-- .../Business/Sellthing/ISellService.cs | 4 +- .../Business/Sellthing/SellService.cs | 10 +-- .../Business/Spend/ISpendService.cs | 4 +- .../Business/Spend/SpendService.cs | 12 ++-- .../Dashboard/DashboardService.cs | 12 ++-- .../Dashboard/IDashboardService.cs | 4 +- .../EOM.TSHotelManagement.Service.csproj | 4 +- .../Employee/Check/EmployeeCheckService.cs | 10 +-- .../Employee/Check/IEmployeeCheckService.cs | 4 +- .../Employee/EmployeeService.cs | 12 ++-- .../History/EmployeeHistoryService.cs | 10 +-- .../History/IEmployeeHistoryService.cs | 4 +- .../Employee/IEmployeeService.cs | 4 +- .../Permission/EmployeePermissionService.cs | 14 ++--- .../Permission/IEmployeePermissionService.cs | 6 +- .../Employee/Photo/EmployeePhotoService.cs | 10 +-- .../Employee/Photo/IEmployeePhotoService.cs | 4 +- .../IRewardPunishmentService.cs | 4 +- .../RewardPunishmentService.cs | 10 +-- .../Administrator/AdminService.cs | 14 ++--- .../Administrator/IAdminService.cs | 10 +-- .../SystemManagement/Base/BaseService.cs | 12 ++-- .../SystemManagement/Base/IBaseService.cs | 4 +- .../SystemManagement/Menu/IMenuService.cs | 4 +- .../SystemManagement/Menu/MenuService.cs | 10 +-- .../SystemManagement/Notice/INoticeService.cs | 4 +- .../SystemManagement/Notice/NoticeService.cs | 10 +-- .../Permission/IPermissionAppService.cs | 6 +- .../Permission/PermissionAppService.cs | 12 ++-- .../SystemManagement/Role/IRoleAppService.cs | 8 +-- .../SystemManagement/Role/RoleAppService.cs | 14 ++--- .../ISupervisionStatisticsService.cs | 4 +- .../SupervisionStatisticsService.cs | 10 +-- .../VipRule/IVipRuleAppService.cs | 4 +- .../VipRule/VipRuleAppService.cs | 10 +-- .../Util/IUtilService.cs | 4 +- .../Util/UtilService.cs | 12 ++-- .../EOM.TSHotelManagement.Shared.csproj | 15 ----- .../Helper/DiscountHelper.cs | 61 ------------------- EOM.TSHotelManagement.Web.sln | 20 +++--- 410 files changed, 645 insertions(+), 724 deletions(-) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/.config/dotnet-tools.json (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Authorization/CustomAuthorizationMiddlewareResultHandler.cs (94%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Authorization/PermissionsAuthorization.cs (99%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Config/CsrfTokenConfig.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Application/NavBar/NavBarController.cs (95%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Asset/AssetController.cs (95%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Customer/CustomerAccountController.cs (94%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Customer/CustomerController.cs (97%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/EnergyManagement/EnergyManagementController.cs (98%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/News/NewsController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/PromotionContent/PromotionContentController.cs (97%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Reser/ReserController.cs (97%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Room/RoomController.cs (98%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Room/RoomTypeController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Sellthing/SellthingController.cs (97%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Business/Spend/SpendController.cs (97%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Dashboard/DashboardController.cs (95%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Employee/Check/EmployeeCheckController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Employee/EmployeeController.cs (97%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Employee/History/EmployeeHistoryController.cs (94%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Employee/Photo/EmployeePhotoController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs (94%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/LoginController.cs (95%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/Administrator/AdminController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/Base/BaseController.cs (99%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs (90%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs (89%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/Menu/MenuController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/Notice/NoticeController.cs (94%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/Permission/PermissionController.cs (85%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/Role/RoleController.cs (93%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/SystemManagement/VipRule/VipRuleController.cs (96%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Controllers/Util/UtilityController.cs (96%) rename EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj => EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj (94%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Extension/DateOnlyJsonConverter.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Extension/MiddlewareExtensions.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Extension/MvcOptionsExtensions.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Extension/PermissionSyncExtensions.cs (99%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Extension/RouteExtension.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Factory/JwtConfigFactory.cs (93%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Factory/LskyConfigFactory.cs (95%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Factory/MailConfigFactory.cs (92%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Filters/AuthorizeAllControllersConvention.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Filters/CSRFTokenOperationProcessor.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Filters/RequestLoggingMiddleware.cs (98%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Filters/ValidationFilter.cs (92%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Program.cs (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Properties/launchSettings.json (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/Startup.cs (98%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/appsettings.Development.json (100%) rename {EOM.TSHotelManagement.WebApi => EOM.TSHotelManagement.API}/appsettings.json (100%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Config/JwtConfig.cs (73%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Config/LskyConfig.cs (85%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Config/MailConfig.cs (94%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Config/Template.cs (72%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common}/Constant/Constant.cs (92%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common}/Constant/ConsumptionConstant.cs (97%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common}/Constant/SpendType.cs (90%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common}/Constant/SystemConstants.cs (93%) rename EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj => EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj (100%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common}/Enums/LogLevel.cs (93%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common}/Enums/RoomState.cs (97%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/GenerateJWT/JWTHelper.cs (98%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/DataProtectionHelper.cs (98%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/EntityMapper.cs (99%) rename {EOM.TSHotelManagement.Shared => EOM.TSHotelManagement.Common}/Helper/EnumHelper.cs (93%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/LocalizationHelper.cs (95%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/LogHelper.cs (97%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/LskyHelper.cs (98%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/MailHelper.cs (99%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/RandomStringGenerator.cs (97%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Helper/SqlFilterBuilder.cs (99%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Interfaces/IJwtConfigFactory.cs (67%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Interfaces/ILskyConfigFactory.cs (68%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Interfaces/IMailConfigFactory.cs (68%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Templates/EmailTemplate.cs (98%) rename {EOM.TSHotelManagement.Common.Util => EOM.TSHotelManagement.Common}/Validator/UIDisplayAttribute.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Application/NavBar/Dto/CreateNavBarInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Application/NavBar/Dto/DeleteNavBarInputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Application/NavBar/Dto/ReadNavBarInputDto.cs (69%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Application/NavBar/Dto/ReadNavBarOutputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Application/NavBar/Dto/UpdateNavBarInputDto.cs (95%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/BaseAuditDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/BaseDto.cs (78%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/BaseInputDto.cs (77%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/BaseOutputDto.cs (67%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/BaseResponse.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/BusinessStatusCode.cs (98%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/CsrfTokenDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/ListInputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/ListOutputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/MenuDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/PagedData.cs (72%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/BaseDto/SingleOutputDto.cs (76%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Asset/Dto/Asset/CreateAssetInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Asset/Dto/Asset/ReadAssetInputDto.cs (90%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs (90%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs (71%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs (76%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs (89%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountOutputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs (77%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs (71%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs (76%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs (80%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs (77%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/News/Dto/AddNewsInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/News/Dto/DeleteNewsInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/News/Dto/ReadNewsInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/News/Dto/ReadNewsOuputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/News/Dto/UpdateNewsInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Reser/Dto/CreateReserInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Reser/Dto/DeleteReserInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Reser/Dto/ReadReserInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Reser/Dto/ReadReserOutputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Reser/Dto/UpdateReserInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/CheckinRoomByReservationDto.cs (97%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/CheckoutRoomDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/Room/CreateRoomInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/Room/DeleteRoomInputDto.cs (70%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/Room/ReadRoomInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/Room/ReadRoomOutputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/Room/UpdateRoomInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs (72%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs (71%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs (69%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs (76%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs (77%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs (84%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs (70%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs (84%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Room/Dto/TransferRoomDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Sellthing/Dto/CreateSellThingInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Sellthing/Dto/DeleteSellThingInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Sellthing/Dto/ReadSellThingInputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Sellthing/Dto/ReadSellThingOutputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Sellthing/Dto/UpdateSellThingInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Spend/Dto/Spend/CreateSpendInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Spend/Dto/Spend/ReadSpendInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs (95%) rename EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj => EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj (74%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/Employee/CreateEmployeeInputDto.cs (98%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/Employee/DeleteEmployeeInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/Employee/ReadEmployeeInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/Employee/ReadEmployeeOutputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/Employee/UpdateEmployeeInputDto.cs (98%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs (90%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs (90%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs (89%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs (84%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs (84%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs (77%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs (95%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs (89%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs (89%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs (90%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/EnumDto.cs (76%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Menu/CreateMenuInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Menu/MenuViewModel.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Menu/ModuleConsts.cs (98%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Menu/ReadMenuInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Nation/CreateNationInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Nation/DeleteNationInputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Nation/ReadNationInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Nation/ReadNationOutputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Nation/UpdateNationInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs (79%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs (80%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Permission/ReadPermissionDtos.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Position/CreatePositionInputDto.cs (90%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Position/DeletePositionInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Position/ReadPositionInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Position/ReadPositionOutputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Position/UpdatePositionInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Role/CreateRoleInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Role/DeleteRoleInputDto.cs (86%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Role/ReadRoleInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Role/ReadRoleOutputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/Role/UpdateRoleInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs (95%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs (95%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs (92%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs (95%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs (90%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs (78%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs (78%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs (82%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs (91%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs (81%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs (88%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs (72%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs (70%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/CardCode/CreateCardCodeInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/CardCode/DeleteCardCodeInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/CardCode/ReadCardCodeInputDto.cs (87%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/CardCode/ReadCardCodeOutputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/CardCode/UpdateCardCodeInputDto.cs (85%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/Dashboard/BusinessStatisticsOutputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/Dashboard/HumanResourcesOutputDto.cs (94%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/Dashboard/LogisticsDataOutputDto.cs (96%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs (97%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/OperationLog/CreateOperationLogInputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs (72%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/OperationLog/ReadOperationLogInputDto.cs (84%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs (93%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs (83%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/RequestLog/ReadRequestLogInputDto.cs (58%) rename {EOM.TSHotelManagement.Common.Contract => EOM.TSHotelManagement.Contract}/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs (97%) rename {EOM.TSHotelManagement.EntityFramework => EOM.TSHotelManagement.Data}/Connector/ISqlSugarClientConnector.cs (74%) rename {EOM.TSHotelManagement.EntityFramework => EOM.TSHotelManagement.Data}/Connector/SqlSugarClientConnector.cs (97%) rename {EOM.TSHotelManagement.EntityFramework => EOM.TSHotelManagement.Data}/DatabaseInitializer/DatabaseInitializer.cs (99%) rename {EOM.TSHotelManagement.EntityFramework => EOM.TSHotelManagement.Data}/DatabaseInitializer/IDatabaseInitializer.cs (66%) rename EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj => EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj (69%) rename {EOM.TSHotelManagement.EntityFramework => EOM.TSHotelManagement.Data}/Repository/GenericRepository.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Application/NavBar/NavBar.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/BaseEntity.cs (96%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Asset/Asset.cs (99%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Customer/CustoSpend.cs (97%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Customer/CustoType.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Customer/Customer.cs (99%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Customer/CustomerAccount.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Customer/GenderType.cs (96%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Customer/PassPortType.cs (97%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/EnergyManagement/EnergyManagement.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/News/News.cs (97%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/News/NewsStatus.cs (93%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/News/NewsType.cs (87%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/PromotionContent/PromotionContent.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Reser/Reser.cs (99%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Reser/ReserType.cs (90%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Room/Room.cs (99%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Room/RoomType.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Sellthing/SellThing.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Business/Spend/Spend.cs (99%) rename EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj => EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj (100%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Employee/Employee.cs (99%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Employee/EmployeeCheck.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Employee/EmployeeHistory.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Employee/EmployeePhoto.cs (95%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Employee/EmployeeRewardPunishment.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Employee/RewardPunishmentType.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Administrator.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/AdministratorType.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/AppointmentNotice.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/AppointmentNoticeType.cs (96%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Department.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Education.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Menu.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Nation.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Permission.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/PoliticalAffiliation.cs (91%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Position.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/Role.cs (97%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/RolePermission.cs (97%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/SupervisionStatistics.cs (99%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/SystemInformation.cs (97%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/UserRole.cs (96%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/SystemManagement/VipLevelRule.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Util/ApplicationVersion.cs (94%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Util/CardCode.cs (97%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Util/OperationLog.cs (98%) rename {EOM.TSHotelManagement.Common.Core => EOM.TSHotelManagement.Domain}/Util/RequestLog.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Application/NavBar/INavBarService.cs (90%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Application/NavBar/NavBarService.cs (95%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Asset/AssetService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Asset/IAssetService.cs (95%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Customer/Account/CustomerAccountService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Customer/Account/ICustomerAccountService.cs (87%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Customer/CustomerService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Customer/ICustomerService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Customer/Permission/CustomerPermissionService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Customer/Permission/ICustomerPermissionService.cs (88%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/EnergyManagement/EnergyManagementService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/EnergyManagement/IEnergyManagementService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/News/INewsService.cs (92%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/News/NewsService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/PromotionContent/IPromotionContentService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/PromotionContent/PromotionContentService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Reser/IReserService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Reser/ReserService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Room/IRoomService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Room/IRoomTypeService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Room/RoomService.cs (99%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Room/RoomTypeService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Sellthing/ISellService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Sellthing/SellService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Spend/ISpendService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Business/Spend/SpendService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Dashboard/DashboardService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Dashboard/IDashboardService.cs (89%) rename EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj => EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj (83%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/Check/EmployeeCheckService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/Check/IEmployeeCheckService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/EmployeeService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/History/EmployeeHistoryService.cs (93%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/History/IEmployeeHistoryService.cs (95%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/IEmployeeService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/Permission/EmployeePermissionService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/Permission/IEmployeePermissionService.cs (91%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/Photo/EmployeePhotoService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/Photo/IEmployeePhotoService.cs (93%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/RewardPunishment/IRewardPunishmentService.cs (95%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Employee/RewardPunishment/RewardPunishmentService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Administrator/AdminService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Administrator/IAdminService.cs (92%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Base/BaseService.cs (99%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Base/IBaseService.cs (99%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Menu/IMenuService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Menu/MenuService.cs (98%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Notice/INoticeService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Notice/NoticeService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Permission/IPermissionAppService.cs (72%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Permission/PermissionAppService.cs (92%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Role/IRoleAppService.cs (90%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/Role/RoleAppService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/VipRule/IVipRuleAppService.cs (96%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/SystemManagement/VipRule/VipRuleAppService.cs (97%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Util/IUtilService.cs (94%) rename {EOM.TSHotelManagement.Application => EOM.TSHotelManagement.Service}/Util/UtilService.cs (96%) delete mode 100644 EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj delete mode 100644 EOM.TSHotelManagement.Shared/Helper/DiscountHelper.cs diff --git a/EOM.TSHotelManagement.WebApi/.config/dotnet-tools.json b/EOM.TSHotelManagement.API/.config/dotnet-tools.json similarity index 100% rename from EOM.TSHotelManagement.WebApi/.config/dotnet-tools.json rename to EOM.TSHotelManagement.API/.config/dotnet-tools.json diff --git a/EOM.TSHotelManagement.WebApi/Authorization/CustomAuthorizationMiddlewareResultHandler.cs b/EOM.TSHotelManagement.API/Authorization/CustomAuthorizationMiddlewareResultHandler.cs similarity index 94% rename from EOM.TSHotelManagement.WebApi/Authorization/CustomAuthorizationMiddlewareResultHandler.cs rename to EOM.TSHotelManagement.API/Authorization/CustomAuthorizationMiddlewareResultHandler.cs index 800f67b..86d8949 100644 --- a/EOM.TSHotelManagement.WebApi/Authorization/CustomAuthorizationMiddlewareResultHandler.cs +++ b/EOM.TSHotelManagement.API/Authorization/CustomAuthorizationMiddlewareResultHandler.cs @@ -5,8 +5,8 @@ namespace EOM.TSHotelManagement.WebApi.Authorization using Microsoft.AspNetCore.Http; using System.Text.Json; using System.Threading.Tasks; - using EOM.TSHotelManagement.Common.Contract; - using EOM.TSHotelManagement.Common.Util; + using EOM.TSHotelManagement.Contract; + using EOM.TSHotelManagement.Common; public class CustomAuthorizationMiddlewareResultHandler : IAuthorizationMiddlewareResultHandler { diff --git a/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs b/EOM.TSHotelManagement.API/Authorization/PermissionsAuthorization.cs similarity index 99% rename from EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs rename to EOM.TSHotelManagement.API/Authorization/PermissionsAuthorization.cs index 9d9ce79..e0d0278 100644 --- a/EOM.TSHotelManagement.WebApi/Authorization/PermissionsAuthorization.cs +++ b/EOM.TSHotelManagement.API/Authorization/PermissionsAuthorization.cs @@ -8,7 +8,7 @@ using Microsoft.Extensions.Options; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using SqlSugar; -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.WebApi.Authorization { diff --git a/EOM.TSHotelManagement.WebApi/Config/CsrfTokenConfig.cs b/EOM.TSHotelManagement.API/Config/CsrfTokenConfig.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Config/CsrfTokenConfig.cs rename to EOM.TSHotelManagement.API/Config/CsrfTokenConfig.cs diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs b/EOM.TSHotelManagement.API/Controllers/Application/NavBar/NavBarController.cs similarity index 95% rename from EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs rename to EOM.TSHotelManagement.API/Controllers/Application/NavBar/NavBarController.cs index fe763f1..0a8ffbe 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Application/NavBar/NavBarController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Application/NavBar/NavBarController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Asset/AssetController.cs similarity index 95% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Asset/AssetController.cs index 0d46cde..d4ea486 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Asset/AssetController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerAccountController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerAccountController.cs similarity index 94% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerAccountController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerAccountController.cs index 054445d..0f12531 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerAccountController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerAccountController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerController.cs similarity index 97% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerController.cs index d0a7c84..eb2f1f4 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs b/EOM.TSHotelManagement.API/Controllers/Business/EnergyManagement/EnergyManagementController.cs similarity index 98% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/EnergyManagement/EnergyManagementController.cs index c83d83e..0c3c825 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/EnergyManagement/EnergyManagementController.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/News/NewsController.cs b/EOM.TSHotelManagement.API/Controllers/Business/News/NewsController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/News/NewsController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/News/NewsController.cs index 39088d3..d3f3688 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/News/NewsController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/News/NewsController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/PromotionContentController.cs b/EOM.TSHotelManagement.API/Controllers/Business/PromotionContent/PromotionContentController.cs similarity index 97% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/PromotionContentController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/PromotionContent/PromotionContentController.cs index 0ce1a16..51b0270 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/PromotionContentController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/PromotionContent/PromotionContentController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Reser/ReserController.cs similarity index 97% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Reser/ReserController.cs index 3aaac6b..ab4e869 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Reser/ReserController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomController.cs similarity index 98% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Room/RoomController.cs index ffb9b13..2fffb5f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomTypeController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Room/RoomTypeController.cs index d86873e..c32b76c 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomTypeController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Sellthing/SellthingController.cs similarity index 97% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Sellthing/SellthingController.cs index 69bdbae..cb66e8d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Sellthing/SellthingController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Spend/SpendController.cs similarity index 97% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs rename to EOM.TSHotelManagement.API/Controllers/Business/Spend/SpendController.cs index 6df49c6..e72e27e 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Spend/SpendController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Dashboard/DashboardController.cs b/EOM.TSHotelManagement.API/Controllers/Dashboard/DashboardController.cs similarity index 95% rename from EOM.TSHotelManagement.WebApi/Controllers/Dashboard/DashboardController.cs rename to EOM.TSHotelManagement.API/Controllers/Dashboard/DashboardController.cs index 52eacf8..f4d2873 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Dashboard/DashboardController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Dashboard/DashboardController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/Check/EmployeeCheckController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs rename to EOM.TSHotelManagement.API/Controllers/Employee/Check/EmployeeCheckController.cs index 68e75a3..7cc0e5c 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/Check/EmployeeCheckController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/EmployeeController.cs similarity index 97% rename from EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs rename to EOM.TSHotelManagement.API/Controllers/Employee/EmployeeController.cs index a5b7651..d8fc56a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/EmployeeController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/History/EmployeeHistoryController.cs similarity index 94% rename from EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs rename to EOM.TSHotelManagement.API/Controllers/Employee/History/EmployeeHistoryController.cs index ae5615e..f9faa32 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/History/EmployeeHistoryController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/Photo/EmployeePhotoController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs rename to EOM.TSHotelManagement.API/Controllers/Employee/Photo/EmployeePhotoController.cs index 274f729..9e661ef 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/Photo/EmployeePhotoController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs similarity index 94% rename from EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs rename to EOM.TSHotelManagement.API/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs index 6b3847d..7ba1137 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.WebApi/Controllers/LoginController.cs b/EOM.TSHotelManagement.API/Controllers/LoginController.cs similarity index 95% rename from EOM.TSHotelManagement.WebApi/Controllers/LoginController.cs rename to EOM.TSHotelManagement.API/Controllers/LoginController.cs index 751b8b9..e6ceefb 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/LoginController.cs +++ b/EOM.TSHotelManagement.API/Controllers/LoginController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Antiforgery; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Administrator/AdminController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/Administrator/AdminController.cs index f3180ab..762b288 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Administrator/AdminController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Base/BaseController.cs similarity index 99% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/Base/BaseController.cs index cb722bb..5c64d06 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Base/BaseController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs similarity index 90% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs index c5fd3b5..768900a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; @@ -57,7 +57,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [RequirePermission("system:user:assign.view")] [HttpGet] - public ListOutputDto ReadUserRolePermissions([FromQuery] string userNumber) + public ListOutputDto ReadUserRolePermissions([FromQuery] string userNumber) { return customerPermService.ReadUserRolePermissions(userNumber); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs similarity index 89% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs index 004bf88..763698c 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; @@ -58,7 +58,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [RequirePermission("system:user:assign.view")] [HttpGet] - public ListOutputDto ReadUserRolePermissions([FromQuery] string userNumber) + public ListOutputDto ReadUserRolePermissions([FromQuery] string userNumber) { return employeePermService.ReadUserRolePermissions(userNumber); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Menu/MenuController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/Menu/MenuController.cs index ab745cf..2f7bcde 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Menu/MenuController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; using System; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Notice/NoticeController.cs similarity index 94% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/Notice/NoticeController.cs index 583158d..ae83a1d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Notice/NoticeController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Permission/PermissionController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Permission/PermissionController.cs similarity index 85% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Permission/PermissionController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/Permission/PermissionController.cs index 13ac266..1443124 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Permission/PermissionController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Permission/PermissionController.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Role/RoleController.cs similarity index 93% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/Role/RoleController.cs index d300b47..98510e4 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Role/RoleController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs index af45a78..2ac0691 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/VipRule/VipRuleController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs rename to EOM.TSHotelManagement.API/Controllers/SystemManagement/VipRule/VipRuleController.cs index 6b0cdf0..362ec9f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/VipRule/VipRuleController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs b/EOM.TSHotelManagement.API/Controllers/Util/UtilityController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs rename to EOM.TSHotelManagement.API/Controllers/Util/UtilityController.cs index 29d05c2..0201d44 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Util/UtilityController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj similarity index 94% rename from EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj rename to EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj index ac2088e..c8db4f6 100644 --- a/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj +++ b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj @@ -41,7 +41,7 @@ - + diff --git a/EOM.TSHotelManagement.WebApi/Extension/DateOnlyJsonConverter.cs b/EOM.TSHotelManagement.API/Extension/DateOnlyJsonConverter.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Extension/DateOnlyJsonConverter.cs rename to EOM.TSHotelManagement.API/Extension/DateOnlyJsonConverter.cs diff --git a/EOM.TSHotelManagement.WebApi/Extension/MiddlewareExtensions.cs b/EOM.TSHotelManagement.API/Extension/MiddlewareExtensions.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Extension/MiddlewareExtensions.cs rename to EOM.TSHotelManagement.API/Extension/MiddlewareExtensions.cs diff --git a/EOM.TSHotelManagement.WebApi/Extension/MvcOptionsExtensions.cs b/EOM.TSHotelManagement.API/Extension/MvcOptionsExtensions.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Extension/MvcOptionsExtensions.cs rename to EOM.TSHotelManagement.API/Extension/MvcOptionsExtensions.cs diff --git a/EOM.TSHotelManagement.WebApi/Extension/PermissionSyncExtensions.cs b/EOM.TSHotelManagement.API/Extension/PermissionSyncExtensions.cs similarity index 99% rename from EOM.TSHotelManagement.WebApi/Extension/PermissionSyncExtensions.cs rename to EOM.TSHotelManagement.API/Extension/PermissionSyncExtensions.cs index 59d87fb..a1f100e 100644 --- a/EOM.TSHotelManagement.WebApi/Extension/PermissionSyncExtensions.cs +++ b/EOM.TSHotelManagement.API/Extension/PermissionSyncExtensions.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using SqlSugar; -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Extension diff --git a/EOM.TSHotelManagement.WebApi/Extension/RouteExtension.cs b/EOM.TSHotelManagement.API/Extension/RouteExtension.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Extension/RouteExtension.cs rename to EOM.TSHotelManagement.API/Extension/RouteExtension.cs diff --git a/EOM.TSHotelManagement.WebApi/Factory/JwtConfigFactory.cs b/EOM.TSHotelManagement.API/Factory/JwtConfigFactory.cs similarity index 93% rename from EOM.TSHotelManagement.WebApi/Factory/JwtConfigFactory.cs rename to EOM.TSHotelManagement.API/Factory/JwtConfigFactory.cs index dd934a8..cbfcf90 100644 --- a/EOM.TSHotelManagement.WebApi/Factory/JwtConfigFactory.cs +++ b/EOM.TSHotelManagement.API/Factory/JwtConfigFactory.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; using Microsoft.Extensions.Configuration; namespace EOM.TSHotelManagement.WebApi diff --git a/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs b/EOM.TSHotelManagement.API/Factory/LskyConfigFactory.cs similarity index 95% rename from EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs rename to EOM.TSHotelManagement.API/Factory/LskyConfigFactory.cs index 9039427..2b1ee13 100644 --- a/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs +++ b/EOM.TSHotelManagement.API/Factory/LskyConfigFactory.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; using Microsoft.Extensions.Configuration; namespace EOM.TSHotelManagement.WebApi diff --git a/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs b/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs similarity index 92% rename from EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs rename to EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs index a652d37..b93ac40 100644 --- a/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs +++ b/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; using Microsoft.Extensions.Configuration; namespace EOM.TSHotelManagement.WebApi diff --git a/EOM.TSHotelManagement.WebApi/Filters/AuthorizeAllControllersConvention.cs b/EOM.TSHotelManagement.API/Filters/AuthorizeAllControllersConvention.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Filters/AuthorizeAllControllersConvention.cs rename to EOM.TSHotelManagement.API/Filters/AuthorizeAllControllersConvention.cs diff --git a/EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs b/EOM.TSHotelManagement.API/Filters/CSRFTokenOperationProcessor.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Filters/CSRFTokenOperationProcessor.cs rename to EOM.TSHotelManagement.API/Filters/CSRFTokenOperationProcessor.cs diff --git a/EOM.TSHotelManagement.WebApi/Filters/RequestLoggingMiddleware.cs b/EOM.TSHotelManagement.API/Filters/RequestLoggingMiddleware.cs similarity index 98% rename from EOM.TSHotelManagement.WebApi/Filters/RequestLoggingMiddleware.cs rename to EOM.TSHotelManagement.API/Filters/RequestLoggingMiddleware.cs index 0e67d64..a902a4a 100644 --- a/EOM.TSHotelManagement.WebApi/Filters/RequestLoggingMiddleware.cs +++ b/EOM.TSHotelManagement.API/Filters/RequestLoggingMiddleware.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Data; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; diff --git a/EOM.TSHotelManagement.WebApi/Filters/ValidationFilter.cs b/EOM.TSHotelManagement.API/Filters/ValidationFilter.cs similarity index 92% rename from EOM.TSHotelManagement.WebApi/Filters/ValidationFilter.cs rename to EOM.TSHotelManagement.API/Filters/ValidationFilter.cs index ca7b3d2..a79bb1a 100644 --- a/EOM.TSHotelManagement.WebApi/Filters/ValidationFilter.cs +++ b/EOM.TSHotelManagement.API/Filters/ValidationFilter.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Common; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using System.Collections.Generic; diff --git a/EOM.TSHotelManagement.WebApi/Program.cs b/EOM.TSHotelManagement.API/Program.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Program.cs rename to EOM.TSHotelManagement.API/Program.cs diff --git a/EOM.TSHotelManagement.WebApi/Properties/launchSettings.json b/EOM.TSHotelManagement.API/Properties/launchSettings.json similarity index 100% rename from EOM.TSHotelManagement.WebApi/Properties/launchSettings.json rename to EOM.TSHotelManagement.API/Properties/launchSettings.json diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.API/Startup.cs similarity index 98% rename from EOM.TSHotelManagement.WebApi/Startup.cs rename to EOM.TSHotelManagement.API/Startup.cs index efc7081..34eb529 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.API/Startup.cs @@ -1,7 +1,7 @@ using Autofac; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.WebApi.Authorization; using EOM.TSHotelManagement.WebApi.Extension; using EOM.TSHotelManagement.WebApi.Filters; @@ -341,7 +341,7 @@ namespace EOM.TSHotelManagement.WebApi builder.RegisterGeneric(typeof(GenericRepository<>)).AsSelf().InstancePerLifetimeScope(); //程序集批量反射注入 - var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Application.dll")); + var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Service.dll")); builder.RegisterAssemblyTypes(assemblyService) .AsImplementedInterfaces() .InstancePerDependency() diff --git a/EOM.TSHotelManagement.WebApi/appsettings.Development.json b/EOM.TSHotelManagement.API/appsettings.Development.json similarity index 100% rename from EOM.TSHotelManagement.WebApi/appsettings.Development.json rename to EOM.TSHotelManagement.API/appsettings.Development.json diff --git a/EOM.TSHotelManagement.WebApi/appsettings.json b/EOM.TSHotelManagement.API/appsettings.json similarity index 100% rename from EOM.TSHotelManagement.WebApi/appsettings.json rename to EOM.TSHotelManagement.API/appsettings.json diff --git a/EOM.TSHotelManagement.Common.Util/Config/JwtConfig.cs b/EOM.TSHotelManagement.Common/Config/JwtConfig.cs similarity index 73% rename from EOM.TSHotelManagement.Common.Util/Config/JwtConfig.cs rename to EOM.TSHotelManagement.Common/Config/JwtConfig.cs index e49602c..9e8d3a2 100644 --- a/EOM.TSHotelManagement.Common.Util/Config/JwtConfig.cs +++ b/EOM.TSHotelManagement.Common/Config/JwtConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class JwtConfig { diff --git a/EOM.TSHotelManagement.Common.Util/Config/LskyConfig.cs b/EOM.TSHotelManagement.Common/Config/LskyConfig.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Util/Config/LskyConfig.cs rename to EOM.TSHotelManagement.Common/Config/LskyConfig.cs index e2bd352..d29b136 100644 --- a/EOM.TSHotelManagement.Common.Util/Config/LskyConfig.cs +++ b/EOM.TSHotelManagement.Common/Config/LskyConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class LskyConfig { diff --git a/EOM.TSHotelManagement.Common.Util/Config/MailConfig.cs b/EOM.TSHotelManagement.Common/Config/MailConfig.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Util/Config/MailConfig.cs rename to EOM.TSHotelManagement.Common/Config/MailConfig.cs index 1404a74..e71bf23 100644 --- a/EOM.TSHotelManagement.Common.Util/Config/MailConfig.cs +++ b/EOM.TSHotelManagement.Common/Config/MailConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class MailConfig { diff --git a/EOM.TSHotelManagement.Common.Util/Config/Template.cs b/EOM.TSHotelManagement.Common/Config/Template.cs similarity index 72% rename from EOM.TSHotelManagement.Common.Util/Config/Template.cs rename to EOM.TSHotelManagement.Common/Config/Template.cs index a8b7ce8..b55816b 100644 --- a/EOM.TSHotelManagement.Common.Util/Config/Template.cs +++ b/EOM.TSHotelManagement.Common/Config/Template.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class Template { diff --git a/EOM.TSHotelManagement.Shared/Constant/Constant.cs b/EOM.TSHotelManagement.Common/Constant/Constant.cs similarity index 92% rename from EOM.TSHotelManagement.Shared/Constant/Constant.cs rename to EOM.TSHotelManagement.Common/Constant/Constant.cs index fd9da39..9c7d412 100644 --- a/EOM.TSHotelManagement.Shared/Constant/Constant.cs +++ b/EOM.TSHotelManagement.Common/Constant/Constant.cs @@ -1,4 +1,7 @@ -namespace EOM.TSHotelManagement.Shared +using System.Collections.Generic; +using System.Linq; + +namespace EOM.TSHotelManagement.Common { public class Constant where T : Constant { diff --git a/EOM.TSHotelManagement.Shared/Constant/ConsumptionConstant.cs b/EOM.TSHotelManagement.Common/Constant/ConsumptionConstant.cs similarity index 97% rename from EOM.TSHotelManagement.Shared/Constant/ConsumptionConstant.cs rename to EOM.TSHotelManagement.Common/Constant/ConsumptionConstant.cs index fed5758..c0caa37 100644 --- a/EOM.TSHotelManagement.Shared/Constant/ConsumptionConstant.cs +++ b/EOM.TSHotelManagement.Common/Constant/ConsumptionConstant.cs @@ -22,7 +22,7 @@ * *模块说明:结算状态常量 */ -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common { /// /// 结算状态常量 diff --git a/EOM.TSHotelManagement.Shared/Constant/SpendType.cs b/EOM.TSHotelManagement.Common/Constant/SpendType.cs similarity index 90% rename from EOM.TSHotelManagement.Shared/Constant/SpendType.cs rename to EOM.TSHotelManagement.Common/Constant/SpendType.cs index 45d7fbc..250d5bb 100644 --- a/EOM.TSHotelManagement.Shared/Constant/SpendType.cs +++ b/EOM.TSHotelManagement.Common/Constant/SpendType.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common { public class SpendType : Constant { diff --git a/EOM.TSHotelManagement.Shared/Constant/SystemConstants.cs b/EOM.TSHotelManagement.Common/Constant/SystemConstants.cs similarity index 93% rename from EOM.TSHotelManagement.Shared/Constant/SystemConstants.cs rename to EOM.TSHotelManagement.Common/Constant/SystemConstants.cs index 83cbd60..d30d231 100644 --- a/EOM.TSHotelManagement.Shared/Constant/SystemConstants.cs +++ b/EOM.TSHotelManagement.Common/Constant/SystemConstants.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common { public class SystemConstants { diff --git a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj b/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj similarity index 100% rename from EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj rename to EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj diff --git a/EOM.TSHotelManagement.Shared/Enums/LogLevel.cs b/EOM.TSHotelManagement.Common/Enums/LogLevel.cs similarity index 93% rename from EOM.TSHotelManagement.Shared/Enums/LogLevel.cs rename to EOM.TSHotelManagement.Common/Enums/LogLevel.cs index 45dd182..755fecf 100644 --- a/EOM.TSHotelManagement.Shared/Enums/LogLevel.cs +++ b/EOM.TSHotelManagement.Common/Enums/LogLevel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common { /// /// 日志等级 (Log Level) diff --git a/EOM.TSHotelManagement.Shared/Enums/RoomState.cs b/EOM.TSHotelManagement.Common/Enums/RoomState.cs similarity index 97% rename from EOM.TSHotelManagement.Shared/Enums/RoomState.cs rename to EOM.TSHotelManagement.Common/Enums/RoomState.cs index 7df15f7..2e46d75 100644 --- a/EOM.TSHotelManagement.Shared/Enums/RoomState.cs +++ b/EOM.TSHotelManagement.Common/Enums/RoomState.cs @@ -24,7 +24,7 @@ */ using System.ComponentModel; -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common { /// /// 房间状态 (Room State) diff --git a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs b/EOM.TSHotelManagement.Common/GenerateJWT/JWTHelper.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs rename to EOM.TSHotelManagement.Common/GenerateJWT/JWTHelper.cs index 9e20cf0..7639ba8 100644 --- a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs +++ b/EOM.TSHotelManagement.Common/GenerateJWT/JWTHelper.cs @@ -5,7 +5,7 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using System.Text; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class JWTHelper { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/DataProtectionHelper.cs b/EOM.TSHotelManagement.Common/Helper/DataProtectionHelper.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Util/Helper/DataProtectionHelper.cs rename to EOM.TSHotelManagement.Common/Helper/DataProtectionHelper.cs index 5247120..f218bd8 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/DataProtectionHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/DataProtectionHelper.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.DataProtection; using System; using System.Security.Cryptography; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class DataProtectionHelper { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs b/EOM.TSHotelManagement.Common/Helper/EntityMapper.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs rename to EOM.TSHotelManagement.Common/Helper/EntityMapper.cs index 41b4b22..3a464f8 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs +++ b/EOM.TSHotelManagement.Common/Helper/EntityMapper.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public static class EntityMapper { diff --git a/EOM.TSHotelManagement.Shared/Helper/EnumHelper.cs b/EOM.TSHotelManagement.Common/Helper/EnumHelper.cs similarity index 93% rename from EOM.TSHotelManagement.Shared/Helper/EnumHelper.cs rename to EOM.TSHotelManagement.Common/Helper/EnumHelper.cs index b5828a4..00854d4 100644 --- a/EOM.TSHotelManagement.Shared/Helper/EnumHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/EnumHelper.cs @@ -1,7 +1,9 @@ -using System.ComponentModel; +using System; +using System.ComponentModel; +using System.Linq; using System.Reflection; -namespace EOM.TSHotelManagement.Shared +namespace EOM.TSHotelManagement.Common { public class EnumHelper { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/LocalizationHelper.cs b/EOM.TSHotelManagement.Common/Helper/LocalizationHelper.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Util/Helper/LocalizationHelper.cs rename to EOM.TSHotelManagement.Common/Helper/LocalizationHelper.cs index 8dba168..376da2a 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/LocalizationHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/LocalizationHelper.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public static class LocalizationHelper { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/LogHelper.cs b/EOM.TSHotelManagement.Common/Helper/LogHelper.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Util/Helper/LogHelper.cs rename to EOM.TSHotelManagement.Common/Helper/LogHelper.cs index 6f2793f..a0fac51 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/LogHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/LogHelper.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public static class LogHelper { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs b/EOM.TSHotelManagement.Common/Helper/LskyHelper.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs rename to EOM.TSHotelManagement.Common/Helper/LskyHelper.cs index 97db35e..2205bf4 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/LskyHelper.cs @@ -5,7 +5,7 @@ using System.Net.Http.Headers; using System.Net.Http.Json; using System.Threading.Tasks; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class LskyHelper { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs b/EOM.TSHotelManagement.Common/Helper/MailHelper.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs rename to EOM.TSHotelManagement.Common/Helper/MailHelper.cs index 9e8d25f..407c4d0 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/MailHelper.cs @@ -7,7 +7,7 @@ using System.IO; using System.Linq; using System.Net.Mime; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class MailHelper { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/RandomStringGenerator.cs b/EOM.TSHotelManagement.Common/Helper/RandomStringGenerator.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Util/Helper/RandomStringGenerator.cs rename to EOM.TSHotelManagement.Common/Helper/RandomStringGenerator.cs index 91a7451..8d85796 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/RandomStringGenerator.cs +++ b/EOM.TSHotelManagement.Common/Helper/RandomStringGenerator.cs @@ -1,6 +1,6 @@ using System.Security.Cryptography; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public class RandomStringGenerator { diff --git a/EOM.TSHotelManagement.Common.Util/Helper/SqlFilterBuilder.cs b/EOM.TSHotelManagement.Common/Helper/SqlFilterBuilder.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Util/Helper/SqlFilterBuilder.cs rename to EOM.TSHotelManagement.Common/Helper/SqlFilterBuilder.cs index 3b32f3d..2b02892 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/SqlFilterBuilder.cs +++ b/EOM.TSHotelManagement.Common/Helper/SqlFilterBuilder.cs @@ -5,7 +5,7 @@ using System.Linq.Expressions; using System.Reflection; using SqlSugar; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { /// /// 通用的根据 DTO 自动生成 SqlSugar `Expressionable` 过滤表达式的构建器。 diff --git a/EOM.TSHotelManagement.Common.Util/Interfaces/IJwtConfigFactory.cs b/EOM.TSHotelManagement.Common/Interfaces/IJwtConfigFactory.cs similarity index 67% rename from EOM.TSHotelManagement.Common.Util/Interfaces/IJwtConfigFactory.cs rename to EOM.TSHotelManagement.Common/Interfaces/IJwtConfigFactory.cs index 98f94fa..8cfcdbd 100644 --- a/EOM.TSHotelManagement.Common.Util/Interfaces/IJwtConfigFactory.cs +++ b/EOM.TSHotelManagement.Common/Interfaces/IJwtConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public interface IJwtConfigFactory { diff --git a/EOM.TSHotelManagement.Common.Util/Interfaces/ILskyConfigFactory.cs b/EOM.TSHotelManagement.Common/Interfaces/ILskyConfigFactory.cs similarity index 68% rename from EOM.TSHotelManagement.Common.Util/Interfaces/ILskyConfigFactory.cs rename to EOM.TSHotelManagement.Common/Interfaces/ILskyConfigFactory.cs index 2380e02..4a0455c 100644 --- a/EOM.TSHotelManagement.Common.Util/Interfaces/ILskyConfigFactory.cs +++ b/EOM.TSHotelManagement.Common/Interfaces/ILskyConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public interface ILskyConfigFactory { diff --git a/EOM.TSHotelManagement.Common.Util/Interfaces/IMailConfigFactory.cs b/EOM.TSHotelManagement.Common/Interfaces/IMailConfigFactory.cs similarity index 68% rename from EOM.TSHotelManagement.Common.Util/Interfaces/IMailConfigFactory.cs rename to EOM.TSHotelManagement.Common/Interfaces/IMailConfigFactory.cs index 4c87042..94eaab5 100644 --- a/EOM.TSHotelManagement.Common.Util/Interfaces/IMailConfigFactory.cs +++ b/EOM.TSHotelManagement.Common/Interfaces/IMailConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public interface IMailConfigFactory { diff --git a/EOM.TSHotelManagement.Common.Util/Templates/EmailTemplate.cs b/EOM.TSHotelManagement.Common/Templates/EmailTemplate.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Util/Templates/EmailTemplate.cs rename to EOM.TSHotelManagement.Common/Templates/EmailTemplate.cs index d00053b..5c0db39 100644 --- a/EOM.TSHotelManagement.Common.Util/Templates/EmailTemplate.cs +++ b/EOM.TSHotelManagement.Common/Templates/EmailTemplate.cs @@ -1,6 +1,6 @@ using System; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { public static class EmailTemplate { diff --git a/EOM.TSHotelManagement.Common.Util/Validator/UIDisplayAttribute.cs b/EOM.TSHotelManagement.Common/Validator/UIDisplayAttribute.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Util/Validator/UIDisplayAttribute.cs rename to EOM.TSHotelManagement.Common/Validator/UIDisplayAttribute.cs index adbbca2..bf3c3a3 100644 --- a/EOM.TSHotelManagement.Common.Util/Validator/UIDisplayAttribute.cs +++ b/EOM.TSHotelManagement.Common/Validator/UIDisplayAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace EOM.TSHotelManagement.Common.Util +namespace EOM.TSHotelManagement.Common { [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)] public class UIDisplayAttribute : Attribute diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs rename to EOM.TSHotelManagement.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs index c42b2c5..8900e5b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateNavBarInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs rename to EOM.TSHotelManagement.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs index 582b1b6..1fd2711 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/DeleteNavBarInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteNavBarInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs similarity index 69% rename from EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs rename to EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs index 51cebe1..4660728 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNavBarInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs rename to EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs index 8caf1f7..4abb9e0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNavBarOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs rename to EOM.TSHotelManagement.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs index 5cc6ebb..552e780 100644 --- a/EOM.TSHotelManagement.Common.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateNavBarInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseAuditDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/BaseAuditDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/BaseAuditDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/BaseAuditDto.cs index 4e30551..dcc1197 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseAuditDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/BaseAuditDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class BaseAuditDto : BaseDto { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/BaseDto.cs similarity index 78% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/BaseDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/BaseDto.cs index 6a9c066..c18764b 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/BaseDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class BaseDto { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/BaseInputDto.cs similarity index 77% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/BaseInputDto.cs index c96540f..7362bb2 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/BaseInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class BaseInputDto : BaseAuditDto { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/BaseOutputDto.cs similarity index 67% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/BaseOutputDto.cs index 6d92674..db10398 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/BaseOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class BaseOutputDto : BaseAuditDto { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseResponse.cs b/EOM.TSHotelManagement.Contract/BaseDto/BaseResponse.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/BaseResponse.cs rename to EOM.TSHotelManagement.Contract/BaseDto/BaseResponse.cs index 248acb2..677d43f 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseResponse.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/BaseResponse.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class BaseResponse { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BusinessStatusCode.cs b/EOM.TSHotelManagement.Contract/BaseDto/BusinessStatusCode.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/BusinessStatusCode.cs rename to EOM.TSHotelManagement.Contract/BaseDto/BusinessStatusCode.cs index a9698ab..81618ca 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BusinessStatusCode.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/BusinessStatusCode.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public static class BusinessStatusCode { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/CsrfTokenDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/CsrfTokenDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/CsrfTokenDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/CsrfTokenDto.cs index d1ddfa2..4e1a3e5 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/CsrfTokenDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/CsrfTokenDto.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CsrfTokenDto { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/ListInputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/ListInputDto.cs index b535ed3..4bcf857 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/ListInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ListInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/ListOutputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/ListOutputDto.cs index 0d78236..7dbfe86 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/ListOutputDto.cs @@ -21,7 +21,7 @@ *SOFTWARE. * */ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { /// /// 带总数的列表输出Dto diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/MenuDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/MenuDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/MenuDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/MenuDto.cs index 4d44d71..2813ba9 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/MenuDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/MenuDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { /// /// 菜单 diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/PagedData.cs b/EOM.TSHotelManagement.Contract/BaseDto/PagedData.cs similarity index 72% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/PagedData.cs rename to EOM.TSHotelManagement.Contract/BaseDto/PagedData.cs index 22e47f1..c81baba 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/PagedData.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/PagedData.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class PagedData { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/SingleOutputDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/SingleOutputDto.cs similarity index 76% rename from EOM.TSHotelManagement.Common.Contract/BaseDto/SingleOutputDto.cs rename to EOM.TSHotelManagement.Contract/BaseDto/SingleOutputDto.cs index 8511d97..97fa0d1 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/SingleOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/SingleOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class SingleOutputDto : BaseResponse { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs index f0694c6..99071ba 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateAssetInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs index a469d06..4db70db 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteAssetInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs index b104c54..34124cd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAssetInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs index d8330c4..71f4146 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAssetOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs index 96a7bcc..48e1faa 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateAssetInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs index 67ebe5f..3c3c321 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateCustoTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs similarity index 71% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs index 34e834c..094a42a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteCustoTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs similarity index 76% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs index 8a8d71f..10edc67 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCustoTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs index 3baae8b..a193632 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCustoTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs index c64d740..6eaa6f2 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateCustoTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs index 54daf7f..42525a8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateCustomerInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs index 3f81b6a..05a7391 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteCustomerInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs index 16cccb4..5a5ee00 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCustomerInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index 8cefa01..5bab410 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -1,8 +1,8 @@  -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCustomerOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs index a53f02a..e6fb337 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateCustomerInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs similarity index 89% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs index 00c2162..189df1f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCustomerAccountInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountOutputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountOutputDto.cs index 74a829b..3e5b69b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/CustomerAccount/ReadCustomerAccountOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCustomerAccountOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs similarity index 77% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs index 2c3bf67..24fb3ec 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreatePassportTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs similarity index 71% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs index bfe418b..ff51593 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeletePassportTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs similarity index 76% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs index 23847ce..46f6118 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPassportTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs similarity index 80% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs index efd814c..82bd07f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPassportTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs similarity index 77% rename from EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs index 8783e48..b6addf0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdatePassportTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs index 85867fe..ab528df 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateEnergyManagementInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs index fe5a9b6..3ba6b9c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteEnergyManagementInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs index 7e692de..c4712ef 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEnergyManagementInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs index c9c67b8..b775fda 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEnergyManagementOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs index b988f95..ad78b4d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateEnergyManagementInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/AddNewsInputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/AddNewsInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/News/Dto/AddNewsInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/News/Dto/AddNewsInputDto.cs index 05ab969..22063f7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/AddNewsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/AddNewsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class AddNewsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/DeleteNewsInputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/DeleteNewsInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Business/News/Dto/DeleteNewsInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/News/Dto/DeleteNewsInputDto.cs index e84fbd0..d476ebb 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/DeleteNewsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/DeleteNewsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteNewsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsInputDto.cs index a8120ea..2330e1a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNewsInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsOuputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs rename to EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsOuputDto.cs index 5a0b3e1..c3b2868 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/ReadNewsOuputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsOuputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNewsOuputDto : BaseDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/UpdateNewsInputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/UpdateNewsInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/News/Dto/UpdateNewsInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/News/Dto/UpdateNewsInputDto.cs index f39c5be..5bcb77a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/News/Dto/UpdateNewsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/UpdateNewsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateNewsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs index cd185ec..1da6dd8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreatePromotionContentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs index 1575e51..0ee8b0a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeletePromotionContentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs index 0f7f049..efaac4d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPromotionContentInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs index 2bc447d..fb7e4d1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPromotionContentOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs index 4fb843c..ffe6976 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdatePromotionContentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/CreateReserInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Reser/Dto/CreateReserInputDto.cs index a55e001..080a2b8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/CreateReserInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateReserInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/DeleteReserInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Reser/Dto/DeleteReserInputDto.cs index a7dd39a..041e104 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/DeleteReserInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteReserInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserInputDto.cs index 1bfa1db..756eabb 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadReserInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserOutputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserOutputDto.cs index 67ddf77..c1e9a42 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadReserOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/UpdateReserInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Reser/Dto/UpdateReserInputDto.cs index c523660..96fcee2 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/UpdateReserInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateReserInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs index ae6645e..ea01411 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CheckinRoomByReservationDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckoutRoomDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckoutRoomDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckoutRoomDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckoutRoomDto.cs index ec91fe4..ddee4d5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/CheckoutRoomDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckoutRoomDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CheckoutRoomDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs index 3d4f1f4..12adeb5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateRoomInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs similarity index 70% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs index 8fd0dea..6d6ec1f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteRoomInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs index 1eec7d4..0611cf6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoomInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs index 090ecff..677ae96 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoomOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs index df0b206..e5caef7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateRoomInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs similarity index 72% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs index e0e9972..027f6bb 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateRoomStateInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs similarity index 71% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs index c32cc97..ea68d4a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteRoomStateInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs similarity index 69% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs index d7276b3..7322f55 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoomStateInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs similarity index 76% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs index c149f56..5e3111c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoomStateOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs similarity index 77% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs index b939ca6..3f3ff28 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateRoomStateInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs similarity index 84% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs index 013104f..0b43976 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateRoomTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs similarity index 70% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs index f872871..651b08c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteRoomTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs index eb56c7a..74baff3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoomTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs index 6882e7d..95fd666 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoomTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs similarity index 84% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs index 8a69121..075b67d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateRoomTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/TransferRoomDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/TransferRoomDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/TransferRoomDto.cs rename to EOM.TSHotelManagement.Contract/Business/Room/Dto/TransferRoomDto.cs index 6d7eb63..4a4d3d5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/TransferRoomDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/TransferRoomDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class TransferRoomDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs index 6eee042..edb9a9c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateSellThingInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs index e29cd97..a0b0ed1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteSellThingInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs index 47aff0e..0d1ada5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSellThingInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs index cc77da7..73200ef 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSellThingOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs index 2956373..03c2dd9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateSellThingInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs index 460f8d3..91170c3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class AddCustomerSpendInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs index 8042836..2f8823a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateSpendInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs index 7148fda..9870305 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteSpendInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs index fc781f2..bcaafc7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSpendInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs index 06ae4d6..fb1d62e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Common; using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSpendOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs rename to EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs index d01a903..8c4e838 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateSpendInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj b/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj similarity index 74% rename from EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj rename to EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj index 8dbaaec..a96fd13 100644 --- a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj +++ b/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj @@ -14,8 +14,7 @@ - - + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs index df7b5cc..bd16814 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateEmployeeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs index 6fe2004..ce3db53 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteEmployeeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs index 0073f7c..ce13297 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index 9e133b9..cb025df 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs index 68e7feb..4543388 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateEmployeeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs index 6bface9..7f2e1f5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateEmployeeCheckInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs index 1a8a89f..e9eb67e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteEmployeeCheckInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs index a7bf66b..233819c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeCheckInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs index 2e515bc..85fe190 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeCheckOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs index 86d415f..81df84e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateEmployeeCheckInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs index b12b595..5a6f6f4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateEmployeeHistoryInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs index f9008f5..39d731e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteEmployeeHistoryInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs index 08d22e0..99e9fef 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeHistoryInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs index 65ebb0b..38bdc48 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeHistoryOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs index 76f8c06..84c425b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateEmployeeHistoryInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs index a4a7668..31cc234 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateEmployeePhotoInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs similarity index 89% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs index 0551a60..46d79e7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteEmployeePhotoInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs index 6fd573e..a3c988e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeePhotoInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs similarity index 84% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs index 695cfce..cb829cc 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeePhotoOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs index bb10ac0..02b218e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateEmployeePhotoInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs index ae12263..8ed9fd8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateEmployeeRewardPunishmentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs index 177cb41..fbc0841 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteEmployeeRewardPunishmentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs index 219c45e..21cab11 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeRewardPunishmentInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs index 918bfae..26c5279 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeRewardPunishmentOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs index 542fec9..197f8c1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateEmployeeRewardPunishmentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs index 1ec8576..c717093 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateRewardPunishmentTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs index 56b74a9..a56f016 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteRewardPunishmentTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs similarity index 84% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs index 4eb4a07..b81871c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRewardPunishmentTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs index 6e79d1d..4b0cad8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRewardPunishmentTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs index e553f12..21a57a2 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateRewardPunishmentTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs index e184d23..0bf8955 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateAdministratorInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs index dc2bbfc..1d9ff71 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteAdministratorInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs index a60aceb..4f95ff8 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs index 61d9c75..8c89546 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs index eca1dfb..c1b0373 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateAdministratorInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs index d06697c..4245c04 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateAdministratorTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs index 9fba73f..3b29450 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteAdministratorTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs similarity index 77% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs index 03ee61d..ba5214c 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs index d2b77aa..d990118 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs index ecc2a8e..1d81637 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateAdministratorTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs index 6779bc7..74f9adc 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateAppointmentNoticeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs index b713988..e1464ab 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteAppointmentNoticeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs similarity index 89% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs index f571b1f..1947506 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs similarity index 89% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs index 5f0c77d..efd4fef 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs index 591e712..2954017 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateAppointmentNoticeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs index cfcb9b5..43bc7d2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/CreateAppointmentNoticeTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateAppointmentNoticeTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs index 34756d1..bb5b3d1 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/DeleteAppointmentNoticeTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteAppointmentNoticeTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs index 3c5b4c3..a1a1b79 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs index 57cc862..69054d2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs index 64de8ec..87b061d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/UpdateAppointmentNoticeTypeInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateAppointmentNoticeTypeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs index 2481143..e101ad9 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateDepartmentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs index 65d9e04..6d2574d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteDepartmentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs index 4099660..b004fd7 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadDepartmentInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs index 3c3fa0a..bbc5c7a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadDepartmentOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs index 54b3897..91cbf4f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateDepartmentInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/EnumDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/EnumDto.cs similarity index 76% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/EnumDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/EnumDto.cs index 25b7ae0..4042b2f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/EnumDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/EnumDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class EnumDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs index 74a6f3b..ef0dbfa 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateMenuInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs index 71623e2..4373368 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteMenuInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs index 5ad6cff..5bc9984 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract.Menu +namespace EOM.TSHotelManagement.Contract.Menu { /// /// 菜单视图模型 (Menu View Model) diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs index 11a2df1..906cf5e 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs @@ -22,7 +22,7 @@ * *模块说明:系统模块常量类 */ -namespace EOM.TSHotelManagement.Common.Contract.Menu +namespace EOM.TSHotelManagement.Contract.Menu { /// /// 系统模块常量类 diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs index 1714cea..cd56fa6 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadMenuInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs index 9d90f38..043944d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadMenuOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs index 0921ac2..abd31fe 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateMenuInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs index 71e1805..7db74ee 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateNationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs index 7cf88d0..f6e5c94 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteNationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs index 943ffb5..1a73f11 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNationInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs index bb5b226..72e1561 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNationOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs index 3618b94..165c8bd 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateNationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs similarity index 79% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs index 8f45820..f093d5e 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission +namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission { public class AssignUserPermissionsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs similarity index 80% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs index 152fc11..6adaf00 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission +namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission { public class GrantRolePermissionsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs index 0e67a99..93a3247 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPermissionInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs index 18b8be1..d9a2b1b 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission +namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission { public class UserRolePermissionOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs index 5e72f72..4542ca2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreatePositionInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs index 3832cc9..41e705f 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeletePositionInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs index 2b86da7..939adad 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPositionInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs index adf4e6f..2af9a19 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPositionOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs index e52b856..811f928 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdatePositionInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs index b05e72b..0b87380 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateEducationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs index 627fc56..d017157 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteEducationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs index 6c16f66..8a07575 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEducationInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs index 588de67..dd37d63 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEducationOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs index 2fd342a..ff16ce1 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateEducationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs index b7ce485..881ffa8 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role +namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role { /// /// 为角色分配管理员(全量覆盖式) diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs index 224ccd3..4bf633d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class AssignUserRolesInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs index 9766d67..66cc1e6 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateRoleInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs similarity index 86% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs index a2ca479..274ecf8 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteRoleInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs index 7740d91..12b9265 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoleInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs index 978aae8..52b8de1 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoleOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs index 2a3f90a..ffc097e 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateRoleInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs index c120910..0d1c33a 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateSupervisionStatisticsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs index 6394345..5c71f79 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteSupervisionStatisticsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs index e4844f6..e338904 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSupervisionStatisticsInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs similarity index 92% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs index ede22ac..7321245 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSupervisionStatisticsOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs index 3057322..eaf48a9 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateSupervisionStatisticsInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs index 2968f22..df62ee5 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateSystemInformationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs similarity index 78% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs index f653384..faffce0 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteSystemInformationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs similarity index 78% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs index 204120a..3b4bad9 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSystemInformationInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs similarity index 82% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs index 42f3ded..efa5bb5 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSystemInformationOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs index 418e191..9e4c82d 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateSystemInformationInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs index a314ec7..2f28906 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateVipLevelRuleInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs index 6a8ae9d..eb813d4 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteVipLevelRuleInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs index 5c25ea3..7a6f617 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadVipLevelRuleInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs index 8a1b0b0..d74fbbd 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadVipLevelRuleOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs index 16ad576..c223a49 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateVipLevelRuleInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs index 0fecea3..3d056bb 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateApplicationVersionInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs similarity index 72% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs index 67839e4..fc6dad2 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteApplicationVersionInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs similarity index 70% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs index edf7f40..f9ba4ff 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadApplicationVersionInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs index e4b1ea1..b254f71 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadApplicationVersionOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs index 8034fc8..4fb8268 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateApplicationVersionInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs index 53debea..8579b63 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateCardCodeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs index 6e11185..854df82 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteCardCodeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs index 537f25d..5ebc701 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCardCodeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs index b7a770a..02daae8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCardCodeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs similarity index 85% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs index 424c8f9..5aa3f02 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateCardCodeInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/BusinessStatisticsOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/BusinessStatisticsOutputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/BusinessStatisticsOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/BusinessStatisticsOutputDto.cs index 2705945..2e32bf3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/BusinessStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/BusinessStatisticsOutputDto.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class BusinessStatisticsOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs index d052cd9..9312bf8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/HumanResourcesOutputDto.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class HumanResourcesOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/LogisticsDataOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/LogisticsDataOutputDto.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/LogisticsDataOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/LogisticsDataOutputDto.cs index 9f0f411..1e88175 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/LogisticsDataOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/LogisticsDataOutputDto.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class LogisticsDataOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs index 8f23aff..562c8a1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/Dashboard/RoomStatisticsOutputDto.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class RoomStatisticsOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs index c3c03b0..8f4516d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class CreateOperationLogInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs similarity index 72% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs index 2b542ca..a783b97 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class DeleteOperationLogInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs similarity index 84% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs index 47c196a..f287d58 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadOperationLogInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index 4801415..b09c214 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadOperationLogOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs similarity index 83% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs index a1c3b57..564923e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common; -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class UpdateOperationLogInputDto : BaseInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs similarity index 58% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs index 26d7943..c6046d3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/RequestLog/ReadRequestLogInputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRequestLogInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs rename to EOM.TSHotelManagement.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs index b0b8bfa..9429c08 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/RequestLog/ReadRequestLogOutputDto.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRequestLogOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.EntityFramework/Connector/ISqlSugarClientConnector.cs b/EOM.TSHotelManagement.Data/Connector/ISqlSugarClientConnector.cs similarity index 74% rename from EOM.TSHotelManagement.EntityFramework/Connector/ISqlSugarClientConnector.cs rename to EOM.TSHotelManagement.Data/Connector/ISqlSugarClientConnector.cs index 0b7c369..1010c74 100644 --- a/EOM.TSHotelManagement.EntityFramework/Connector/ISqlSugarClientConnector.cs +++ b/EOM.TSHotelManagement.Data/Connector/ISqlSugarClientConnector.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace EOM.TSHotelManagement.EntityFramework +namespace EOM.TSHotelManagement.Data { public interface ISqlSugarClientConnector { diff --git a/EOM.TSHotelManagement.EntityFramework/Connector/SqlSugarClientConnector.cs b/EOM.TSHotelManagement.Data/Connector/SqlSugarClientConnector.cs similarity index 97% rename from EOM.TSHotelManagement.EntityFramework/Connector/SqlSugarClientConnector.cs rename to EOM.TSHotelManagement.Data/Connector/SqlSugarClientConnector.cs index 92d7e94..2ef13d3 100644 --- a/EOM.TSHotelManagement.EntityFramework/Connector/SqlSugarClientConnector.cs +++ b/EOM.TSHotelManagement.Data/Connector/SqlSugarClientConnector.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common; using Microsoft.Extensions.Configuration; using SqlSugar; -namespace EOM.TSHotelManagement.EntityFramework +namespace EOM.TSHotelManagement.Data { public class SqlSugarClientConnector : ISqlSugarClientConnector { diff --git a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs b/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs similarity index 99% rename from EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs rename to EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs index bd7a135..743b902 100644 --- a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/DatabaseInitializer.cs +++ b/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs @@ -1,11 +1,11 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Migration; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common; using Microsoft.Extensions.Configuration; using MySqlConnector; using SqlSugar; -namespace EOM.TSHotelManagement.EntityFramework +namespace EOM.TSHotelManagement.Data { public class DatabaseInitializer : IDatabaseInitializer { diff --git a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/IDatabaseInitializer.cs b/EOM.TSHotelManagement.Data/DatabaseInitializer/IDatabaseInitializer.cs similarity index 66% rename from EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/IDatabaseInitializer.cs rename to EOM.TSHotelManagement.Data/DatabaseInitializer/IDatabaseInitializer.cs index 9dd316d..c0c562d 100644 --- a/EOM.TSHotelManagement.EntityFramework/DatabaseInitializer/IDatabaseInitializer.cs +++ b/EOM.TSHotelManagement.Data/DatabaseInitializer/IDatabaseInitializer.cs @@ -1,5 +1,5 @@ -namespace EOM.TSHotelManagement.EntityFramework +namespace EOM.TSHotelManagement.Data { public interface IDatabaseInitializer { diff --git a/EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj b/EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj similarity index 69% rename from EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj rename to EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj index 6c76840..c3e1dd8 100644 --- a/EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj +++ b/EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj @@ -15,10 +15,9 @@ - - + + - diff --git a/EOM.TSHotelManagement.EntityFramework/Repository/GenericRepository.cs b/EOM.TSHotelManagement.Data/Repository/GenericRepository.cs similarity index 98% rename from EOM.TSHotelManagement.EntityFramework/Repository/GenericRepository.cs rename to EOM.TSHotelManagement.Data/Repository/GenericRepository.cs index 3fb2db8..b669f1e 100644 --- a/EOM.TSHotelManagement.EntityFramework/Repository/GenericRepository.cs +++ b/EOM.TSHotelManagement.Data/Repository/GenericRepository.cs @@ -1,10 +1,10 @@ -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; using Microsoft.AspNetCore.Http; using SqlSugar; using System.Linq.Expressions; -namespace EOM.TSHotelManagement.EntityFramework +namespace EOM.TSHotelManagement.Data { public class GenericRepository : SimpleClient where T : class, new() { diff --git a/EOM.TSHotelManagement.Common.Core/Application/NavBar/NavBar.cs b/EOM.TSHotelManagement.Domain/Application/NavBar/NavBar.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Application/NavBar/NavBar.cs rename to EOM.TSHotelManagement.Domain/Application/NavBar/NavBar.cs index 74aef56..b264880 100644 --- a/EOM.TSHotelManagement.Common.Core/Application/NavBar/NavBar.cs +++ b/EOM.TSHotelManagement.Domain/Application/NavBar/NavBar.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 导航栏配置表 (Navigation Bar Configuration) diff --git a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs b/EOM.TSHotelManagement.Domain/BaseEntity.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Core/BaseEntity.cs rename to EOM.TSHotelManagement.Domain/BaseEntity.cs index 8e5e8fd..4491c8c 100644 --- a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs +++ b/EOM.TSHotelManagement.Domain/BaseEntity.cs @@ -1,6 +1,6 @@ using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { public class BaseEntity { diff --git a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs b/EOM.TSHotelManagement.Domain/Business/Asset/Asset.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs rename to EOM.TSHotelManagement.Domain/Business/Asset/Asset.cs index 237388e..49fa764 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs +++ b/EOM.TSHotelManagement.Domain/Business/Asset/Asset.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 资产管理 diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoSpend.cs b/EOM.TSHotelManagement.Domain/Business/Customer/CustoSpend.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/CustoSpend.cs rename to EOM.TSHotelManagement.Domain/Business/Customer/CustoSpend.cs index bf7702a..b189e5b 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoSpend.cs +++ b/EOM.TSHotelManagement.Domain/Business/Customer/CustoSpend.cs @@ -22,7 +22,7 @@ * *模块说明:酒店盈利情况类 */ -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 酒店盈利情况 diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs b/EOM.TSHotelManagement.Domain/Business/Customer/CustoType.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs rename to EOM.TSHotelManagement.Domain/Business/Customer/CustoType.cs index 9a4d125..311987e 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs +++ b/EOM.TSHotelManagement.Domain/Business/Customer/CustoType.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 客户类型 diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs b/EOM.TSHotelManagement.Domain/Business/Customer/Customer.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs rename to EOM.TSHotelManagement.Domain/Business/Customer/Customer.cs index b51d06e..ec58653 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs +++ b/EOM.TSHotelManagement.Domain/Business/Customer/Customer.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 客户信息 diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustomerAccount.cs b/EOM.TSHotelManagement.Domain/Business/Customer/CustomerAccount.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/CustomerAccount.cs rename to EOM.TSHotelManagement.Domain/Business/Customer/CustomerAccount.cs index c8be1af..1235449 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustomerAccount.cs +++ b/EOM.TSHotelManagement.Domain/Business/Customer/CustomerAccount.cs @@ -1,6 +1,6 @@ using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { [SqlSugar.SugarTable("custoemr_account", "客户账号表")] public class CustomerAccount : BaseEntity diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs b/EOM.TSHotelManagement.Domain/Business/Customer/GenderType.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs rename to EOM.TSHotelManagement.Domain/Business/Customer/GenderType.cs index bdaa724..da09f46 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs +++ b/EOM.TSHotelManagement.Domain/Business/Customer/GenderType.cs @@ -24,7 +24,7 @@ */ using System.ComponentModel; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 性别 diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManagement.Domain/Business/Customer/PassPortType.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs rename to EOM.TSHotelManagement.Domain/Business/Customer/PassPortType.cs index a50081e..66a0717 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs +++ b/EOM.TSHotelManagement.Domain/Business/Customer/PassPortType.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 证件类型 diff --git a/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs b/EOM.TSHotelManagement.Domain/Business/EnergyManagement/EnergyManagement.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs rename to EOM.TSHotelManagement.Domain/Business/EnergyManagement/EnergyManagement.cs index 0b1c87a..84bbe06 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs +++ b/EOM.TSHotelManagement.Domain/Business/EnergyManagement/EnergyManagement.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 水电信息 diff --git a/EOM.TSHotelManagement.Common.Core/Business/News/News.cs b/EOM.TSHotelManagement.Domain/Business/News/News.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/Business/News/News.cs rename to EOM.TSHotelManagement.Domain/Business/News/News.cs index 5d3327f..fe1706e 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/News/News.cs +++ b/EOM.TSHotelManagement.Domain/Business/News/News.cs @@ -1,6 +1,6 @@ using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { [SqlSugar.SugarTable("news", "新闻动态")] public class News : BaseEntity diff --git a/EOM.TSHotelManagement.Common.Core/Business/News/NewsStatus.cs b/EOM.TSHotelManagement.Domain/Business/News/NewsStatus.cs similarity index 93% rename from EOM.TSHotelManagement.Common.Core/Business/News/NewsStatus.cs rename to EOM.TSHotelManagement.Domain/Business/News/NewsStatus.cs index 6d4a49e..b9bb330 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/News/NewsStatus.cs +++ b/EOM.TSHotelManagement.Domain/Business/News/NewsStatus.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { public enum NewsStatus { diff --git a/EOM.TSHotelManagement.Common.Core/Business/News/NewsType.cs b/EOM.TSHotelManagement.Domain/Business/News/NewsType.cs similarity index 87% rename from EOM.TSHotelManagement.Common.Core/Business/News/NewsType.cs rename to EOM.TSHotelManagement.Domain/Business/News/NewsType.cs index 7e5d92f..db551c8 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/News/NewsType.cs +++ b/EOM.TSHotelManagement.Domain/Business/News/NewsType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace EOM.TSHotelManagement.Common.Core.Business +namespace EOM.TSHotelManagement.Domain.Business { /// /// 新闻类型 diff --git a/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs b/EOM.TSHotelManagement.Domain/Business/PromotionContent/PromotionContent.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs rename to EOM.TSHotelManagement.Domain/Business/PromotionContent/PromotionContent.cs index cd35e74..d6eec3e 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs +++ b/EOM.TSHotelManagement.Domain/Business/PromotionContent/PromotionContent.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// APP横幅配置表 (APP Banner Configuration) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs b/EOM.TSHotelManagement.Domain/Business/Reser/Reser.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs rename to EOM.TSHotelManagement.Domain/Business/Reser/Reser.cs index 00c4516..cf497f2 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs +++ b/EOM.TSHotelManagement.Domain/Business/Reser/Reser.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 预约信息表 (Reservation Information) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Reser/ReserType.cs b/EOM.TSHotelManagement.Domain/Business/Reser/ReserType.cs similarity index 90% rename from EOM.TSHotelManagement.Common.Core/Business/Reser/ReserType.cs rename to EOM.TSHotelManagement.Domain/Business/Reser/ReserType.cs index 4baa453..dc6685e 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Reser/ReserType.cs +++ b/EOM.TSHotelManagement.Domain/Business/Reser/ReserType.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { public enum ReserType { diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs b/EOM.TSHotelManagement.Domain/Business/Room/Room.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs rename to EOM.TSHotelManagement.Domain/Business/Room/Room.cs index 8b835fc..affa6f6 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs +++ b/EOM.TSHotelManagement.Domain/Business/Room/Room.cs @@ -26,7 +26,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 酒店房间信息表 (Hotel Room Information) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs b/EOM.TSHotelManagement.Domain/Business/Room/RoomType.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs rename to EOM.TSHotelManagement.Domain/Business/Room/RoomType.cs index da42a3d..e14057d 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs +++ b/EOM.TSHotelManagement.Domain/Business/Room/RoomType.cs @@ -25,7 +25,7 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 房间类型配置表 (Room Type Configuration) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManagement.Domain/Business/Sellthing/SellThing.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs rename to EOM.TSHotelManagement.Domain/Business/Sellthing/SellThing.cs index e407204..8039a86 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs +++ b/EOM.TSHotelManagement.Domain/Business/Sellthing/SellThing.cs @@ -26,7 +26,7 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 商品信息表 (Product Information) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs b/EOM.TSHotelManagement.Domain/Business/Spend/Spend.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs rename to EOM.TSHotelManagement.Domain/Business/Spend/Spend.cs index b2c83a0..514641f 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManagement.Domain/Business/Spend/Spend.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 消费信息 (Consumption Information) diff --git a/EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj b/EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj similarity index 100% rename from EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj rename to EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Domain/Employee/Employee.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Core/Employee/Employee.cs rename to EOM.TSHotelManagement.Domain/Employee/Employee.cs index 44d88ef..77db185 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Domain/Employee/Employee.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 员工信息 (Employee Information) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs b/EOM.TSHotelManagement.Domain/Employee/EmployeeCheck.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs rename to EOM.TSHotelManagement.Domain/Employee/EmployeeCheck.cs index 79c3dca..92e40db 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs +++ b/EOM.TSHotelManagement.Domain/Employee/EmployeeCheck.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 员工打卡考勤 (Employee Check-in/Check-out Record) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs b/EOM.TSHotelManagement.Domain/Employee/EmployeeHistory.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs rename to EOM.TSHotelManagement.Domain/Employee/EmployeeHistory.cs index f5ba6fd..b1a93b0 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs +++ b/EOM.TSHotelManagement.Domain/Employee/EmployeeHistory.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 员工履历 (Employee History) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs b/EOM.TSHotelManagement.Domain/Employee/EmployeePhoto.cs similarity index 95% rename from EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs rename to EOM.TSHotelManagement.Domain/Employee/EmployeePhoto.cs index e2f8a1d..2a86f21 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs +++ b/EOM.TSHotelManagement.Domain/Employee/EmployeePhoto.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 员工照片 (Employee Photo) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs b/EOM.TSHotelManagement.Domain/Employee/EmployeeRewardPunishment.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs rename to EOM.TSHotelManagement.Domain/Employee/EmployeeRewardPunishment.cs index 9d957df..e88ee2e 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs +++ b/EOM.TSHotelManagement.Domain/Employee/EmployeeRewardPunishment.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 员工奖惩 (Employee Rewards/Punishments) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs b/EOM.TSHotelManagement.Domain/Employee/RewardPunishmentType.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs rename to EOM.TSHotelManagement.Domain/Employee/RewardPunishmentType.cs index febc223..028cbaa 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs +++ b/EOM.TSHotelManagement.Domain/Employee/RewardPunishmentType.cs @@ -25,7 +25,7 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 奖惩类型配置表 (Reward/Punishment Type Configuration) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Administrator.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Administrator.cs index 3f5cf9a..7e4a782 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Administrator.cs @@ -25,7 +25,7 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 管理员实体类 (Administrator Entity) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs b/EOM.TSHotelManagement.Domain/SystemManagement/AdministratorType.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/AdministratorType.cs index 94f0e10..d8d04c5 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/AdministratorType.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 管理员类型 (Administrator Type) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs b/EOM.TSHotelManagement.Domain/SystemManagement/AppointmentNotice.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/AppointmentNotice.cs index daa7d20..d9acdd4 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/AppointmentNotice.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 任命公告 (Appointment AppointmentNotice) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNoticeType.cs b/EOM.TSHotelManagement.Domain/SystemManagement/AppointmentNoticeType.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNoticeType.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/AppointmentNoticeType.cs index de78ab8..1afdeec 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNoticeType.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/AppointmentNoticeType.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { [SugarTable("appointment_notice_type", "任命公告类型 (Appointment AppointmentNotice Type)")] public class AppointmentNoticeType : BaseEntity diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Department.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Department.cs index 0c0e635..00e5a5e 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Department.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 部门表 (Department Table) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Education.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Education.cs index fca5bc3..e96f210 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Education.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 学历 (Education) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Menu.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Menu.cs index a46cff1..ad8152c 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Menu.cs @@ -23,7 +23,7 @@ *模块说明:菜单表 */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 菜单表 (Menu Table) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Nation.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Nation.cs index a37fdb6..3f3ce96 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Nation.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 民族 (Nation) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Permission.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Permission.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Permission.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Permission.cs index 5be46d0..9f96ad8 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Permission.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Permission.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 系统权限定义表 (Permission Definition) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/PoliticalAffiliation.cs b/EOM.TSHotelManagement.Domain/SystemManagement/PoliticalAffiliation.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/PoliticalAffiliation.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/PoliticalAffiliation.cs index 94fbaa1..253c4ca 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/PoliticalAffiliation.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/PoliticalAffiliation.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { public enum PoliticalAffiliation { diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Position.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Position.cs index 820aaee..de74ca0 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Position.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 职位信息表 (Position Information) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Role.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Role.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/Role.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/Role.cs index 69b5921..faf2414 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Role.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Role.cs @@ -1,5 +1,5 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 系统角色配置表 (System Role Configuration) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/RolePermission.cs b/EOM.TSHotelManagement.Domain/SystemManagement/RolePermission.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/RolePermission.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/RolePermission.cs index 24e9b9a..b2737df 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/RolePermission.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/RolePermission.cs @@ -1,5 +1,5 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 角色权限关联表 (Role-Permission Mapping) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs b/EOM.TSHotelManagement.Domain/SystemManagement/SupervisionStatistics.cs similarity index 99% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/SupervisionStatistics.cs index e926bdb..6359409 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/SupervisionStatistics.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { // /// 监管统计信息表 (Supervision Statistics) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs b/EOM.TSHotelManagement.Domain/SystemManagement/SystemInformation.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/SystemInformation.cs index ac9ff94..ec4876b 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/SystemInformation.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 系统信息 (System Information) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/UserRole.cs b/EOM.TSHotelManagement.Domain/SystemManagement/UserRole.cs similarity index 96% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/UserRole.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/UserRole.cs index d3a5904..11e2f36 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/UserRole.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/UserRole.cs @@ -1,5 +1,5 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { // /// 用户角色关联表 (User-Role Mapping) diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/VipLevelRule.cs b/EOM.TSHotelManagement.Domain/SystemManagement/VipLevelRule.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/SystemManagement/VipLevelRule.cs rename to EOM.TSHotelManagement.Domain/SystemManagement/VipLevelRule.cs index e1c9d01..31b9546 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/VipLevelRule.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/VipLevelRule.cs @@ -24,7 +24,7 @@ */ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 会员等级规则表 (VIP Level Rules) diff --git a/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs b/EOM.TSHotelManagement.Domain/Util/ApplicationVersion.cs similarity index 94% rename from EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs rename to EOM.TSHotelManagement.Domain/Util/ApplicationVersion.cs index 3befb0f..614c0e5 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs +++ b/EOM.TSHotelManagement.Domain/Util/ApplicationVersion.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 应用版本 (Application Version) diff --git a/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs b/EOM.TSHotelManagement.Domain/Util/CardCode.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/Util/CardCode.cs rename to EOM.TSHotelManagement.Domain/Util/CardCode.cs index 1753b6b..5d3d9e0 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs +++ b/EOM.TSHotelManagement.Domain/Util/CardCode.cs @@ -1,6 +1,6 @@ using SqlSugar; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 卡片代码 (Card Codes) diff --git a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManagement.Domain/Util/OperationLog.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs rename to EOM.TSHotelManagement.Domain/Util/OperationLog.cs index 79dd0e3..995bfba 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManagement.Domain/Util/OperationLog.cs @@ -25,7 +25,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { /// /// 操作日志表 (Operation Log) diff --git a/EOM.TSHotelManagement.Common.Core/Util/RequestLog.cs b/EOM.TSHotelManagement.Domain/Util/RequestLog.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Util/RequestLog.cs rename to EOM.TSHotelManagement.Domain/Util/RequestLog.cs index 00cb232..c253165 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/RequestLog.cs +++ b/EOM.TSHotelManagement.Domain/Util/RequestLog.cs @@ -1,7 +1,7 @@ using SqlSugar; using System; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Domain { [SugarTable("request_log", "请求日志表 (Request Log)")] public class RequestLog : BaseEntity diff --git a/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj b/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj index 60d2bc7..6879191 100644 --- a/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj +++ b/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj @@ -8,7 +8,7 @@ - + diff --git a/EOM.TSHotelManagement.Migration/EntityBuilder.cs b/EOM.TSHotelManagement.Migration/EntityBuilder.cs index 00f17e2..fe110a2 100644 --- a/EOM.TSHotelManagement.Migration/EntityBuilder.cs +++ b/EOM.TSHotelManagement.Migration/EntityBuilder.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Migration { diff --git a/EOM.TSHotelManagement.Application/Application/NavBar/INavBarService.cs b/EOM.TSHotelManagement.Service/Application/NavBar/INavBarService.cs similarity index 90% rename from EOM.TSHotelManagement.Application/Application/NavBar/INavBarService.cs rename to EOM.TSHotelManagement.Service/Application/NavBar/INavBarService.cs index f00f533..70c448b 100644 --- a/EOM.TSHotelManagement.Application/Application/NavBar/INavBarService.cs +++ b/EOM.TSHotelManagement.Service/Application/NavBar/INavBarService.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 导航控件模块接口 diff --git a/EOM.TSHotelManagement.Application/Application/NavBar/NavBarService.cs b/EOM.TSHotelManagement.Service/Application/NavBar/NavBarService.cs similarity index 95% rename from EOM.TSHotelManagement.Application/Application/NavBar/NavBarService.cs rename to EOM.TSHotelManagement.Service/Application/NavBar/NavBarService.cs index 78d4d8e..c28baae 100644 --- a/EOM.TSHotelManagement.Application/Application/NavBar/NavBarService.cs +++ b/EOM.TSHotelManagement.Service/Application/NavBar/NavBarService.cs @@ -1,9 +1,9 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 导航控件模块 diff --git a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs b/EOM.TSHotelManagement.Service/Business/Asset/AssetService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs rename to EOM.TSHotelManagement.Service/Business/Asset/AssetService.cs index 0b7b4b1..70e1fb2 100644 --- a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs +++ b/EOM.TSHotelManagement.Service/Business/Asset/AssetService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 资产信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs b/EOM.TSHotelManagement.Service/Business/Asset/IAssetService.cs similarity index 95% rename from EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs rename to EOM.TSHotelManagement.Service/Business/Asset/IAssetService.cs index 0f32d1b..cfd83d9 100644 --- a/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs +++ b/EOM.TSHotelManagement.Service/Business/Asset/IAssetService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 资产信息接口 diff --git a/EOM.TSHotelManagement.Application/Business/Customer/Account/CustomerAccountService.cs b/EOM.TSHotelManagement.Service/Business/Customer/Account/CustomerAccountService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Business/Customer/Account/CustomerAccountService.cs rename to EOM.TSHotelManagement.Service/Business/Customer/Account/CustomerAccountService.cs index d87d01e..ce0b9aa 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/Account/CustomerAccountService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/Account/CustomerAccountService.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.CodeLib; using jvncorelib.EntityLib; using Microsoft.AspNetCore.Http; @@ -10,7 +10,7 @@ using System.Text.Json; using System.Text.RegularExpressions; using System.Transactions; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { public partial class CustomerAccountService : ICustomerAccountService { diff --git a/EOM.TSHotelManagement.Application/Business/Customer/Account/ICustomerAccountService.cs b/EOM.TSHotelManagement.Service/Business/Customer/Account/ICustomerAccountService.cs similarity index 87% rename from EOM.TSHotelManagement.Application/Business/Customer/Account/ICustomerAccountService.cs rename to EOM.TSHotelManagement.Service/Business/Customer/Account/ICustomerAccountService.cs index fa1407c..107d876 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/Account/ICustomerAccountService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/Account/ICustomerAccountService.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { public interface ICustomerAccountService { diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Service/Business/Customer/CustomerService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs rename to EOM.TSHotelManagement.Service/Business/Customer/CustomerService.cs index c5d6aba..a051d72 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/CustomerService.cs @@ -21,15 +21,15 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 客户信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/Customer/ICustomerService.cs b/EOM.TSHotelManagement.Service/Business/Customer/ICustomerService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Business/Customer/ICustomerService.cs rename to EOM.TSHotelManagement.Service/Business/Customer/ICustomerService.cs index 03eb7cc..498154d 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/ICustomerService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/ICustomerService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 客户信息接口 diff --git a/EOM.TSHotelManagement.Application/Business/Customer/Permission/CustomerPermissionService.cs b/EOM.TSHotelManagement.Service/Business/Customer/Permission/CustomerPermissionService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/Customer/Permission/CustomerPermissionService.cs rename to EOM.TSHotelManagement.Service/Business/Customer/Permission/CustomerPermissionService.cs index cbe5edd..4dadb50 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/Permission/CustomerPermissionService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/Permission/CustomerPermissionService.cs @@ -1,16 +1,16 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using jvncorelib.EntityLib; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// filename OR language.declaration() /// CustomerPermissionService.CustomerPermissionService():1 diff --git a/EOM.TSHotelManagement.Application/Business/Customer/Permission/ICustomerPermissionService.cs b/EOM.TSHotelManagement.Service/Business/Customer/Permission/ICustomerPermissionService.cs similarity index 88% rename from EOM.TSHotelManagement.Application/Business/Customer/Permission/ICustomerPermissionService.cs rename to EOM.TSHotelManagement.Service/Business/Customer/Permission/ICustomerPermissionService.cs index f49f222..ffcacb2 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/Permission/ICustomerPermissionService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/Permission/ICustomerPermissionService.cs @@ -1,13 +1,13 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// filename OR language.declaration() /// CustomerPermissionService.cs:1 diff --git a/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs b/EOM.TSHotelManagement.Service/Business/EnergyManagement/EnergyManagementService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs rename to EOM.TSHotelManagement.Service/Business/EnergyManagement/EnergyManagementService.cs index 89469cf..36aa67e 100644 --- a/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs +++ b/EOM.TSHotelManagement.Service/Business/EnergyManagement/EnergyManagementService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 水电信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/EnergyManagement/IEnergyManagementService.cs b/EOM.TSHotelManagement.Service/Business/EnergyManagement/IEnergyManagementService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Business/EnergyManagement/IEnergyManagementService.cs rename to EOM.TSHotelManagement.Service/Business/EnergyManagement/IEnergyManagementService.cs index 7a230e4..5bce1ba 100644 --- a/EOM.TSHotelManagement.Application/Business/EnergyManagement/IEnergyManagementService.cs +++ b/EOM.TSHotelManagement.Service/Business/EnergyManagement/IEnergyManagementService.cs @@ -21,7 +21,7 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; /// /// 水电信息接口 diff --git a/EOM.TSHotelManagement.Application/Business/News/INewsService.cs b/EOM.TSHotelManagement.Service/Business/News/INewsService.cs similarity index 92% rename from EOM.TSHotelManagement.Application/Business/News/INewsService.cs rename to EOM.TSHotelManagement.Service/Business/News/INewsService.cs index b38c967..710f9e8 100644 --- a/EOM.TSHotelManagement.Application/Business/News/INewsService.cs +++ b/EOM.TSHotelManagement.Service/Business/News/INewsService.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { public interface INewsService { diff --git a/EOM.TSHotelManagement.Application/Business/News/NewsService.cs b/EOM.TSHotelManagement.Service/Business/News/NewsService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Business/News/NewsService.cs rename to EOM.TSHotelManagement.Service/Business/News/NewsService.cs index 6cf581f..4c7147a 100644 --- a/EOM.TSHotelManagement.Application/Business/News/NewsService.cs +++ b/EOM.TSHotelManagement.Service/Business/News/NewsService.cs @@ -1,12 +1,12 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Core.Business; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Domain.Business; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.EntityLib; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { public class NewsService : INewsService { diff --git a/EOM.TSHotelManagement.Application/Business/PromotionContent/IPromotionContentService.cs b/EOM.TSHotelManagement.Service/Business/PromotionContent/IPromotionContentService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Business/PromotionContent/IPromotionContentService.cs rename to EOM.TSHotelManagement.Service/Business/PromotionContent/IPromotionContentService.cs index a0b3c16..b39526b 100644 --- a/EOM.TSHotelManagement.Application/Business/PromotionContent/IPromotionContentService.cs +++ b/EOM.TSHotelManagement.Service/Business/PromotionContent/IPromotionContentService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 酒店宣传联动内容接口 diff --git a/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs b/EOM.TSHotelManagement.Service/Business/PromotionContent/PromotionContentService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs rename to EOM.TSHotelManagement.Service/Business/PromotionContent/PromotionContentService.cs index 8afa615..0f73c9b 100644 --- a/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs +++ b/EOM.TSHotelManagement.Service/Business/PromotionContent/PromotionContentService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 酒店宣传联动内容接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs b/EOM.TSHotelManagement.Service/Business/Reser/IReserService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs rename to EOM.TSHotelManagement.Service/Business/Reser/IReserService.cs index f6e1247..862a36b 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs +++ b/EOM.TSHotelManagement.Service/Business/Reser/IReserService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 预约信息接口 diff --git a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Service/Business/Reser/ReserService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs rename to EOM.TSHotelManagement.Service/Business/Reser/ReserService.cs index 7dd7e31..d651d3c 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Service/Business/Reser/ReserService.cs @@ -21,15 +21,15 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using SqlSugar; using System.Transactions; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 预约信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManagement.Service/Business/Room/IRoomService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs rename to EOM.TSHotelManagement.Service/Business/Room/IRoomService.cs index 8824bc2..8930b2a 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs +++ b/EOM.TSHotelManagement.Service/Business/Room/IRoomService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 房间信息接口 diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs b/EOM.TSHotelManagement.Service/Business/Room/IRoomTypeService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs rename to EOM.TSHotelManagement.Service/Business/Room/IRoomTypeService.cs index c385b77..c33c5a5 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs +++ b/EOM.TSHotelManagement.Service/Business/Room/IRoomTypeService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 客房信息接口 diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs similarity index 99% rename from EOM.TSHotelManagement.Application/Business/Room/RoomService.cs rename to EOM.TSHotelManagement.Service/Business/Room/RoomService.cs index 70b7f69..9ae1480 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs @@ -21,17 +21,17 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.CodeLib; using jvncorelib.EntityLib; using SqlSugar; using System.Transactions; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 客房信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Service/Business/Room/RoomTypeService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs rename to EOM.TSHotelManagement.Service/Business/Room/RoomTypeService.cs index 566104e..7be70f0 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Service/Business/Room/RoomTypeService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 房间类型接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs b/EOM.TSHotelManagement.Service/Business/Sellthing/ISellService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs rename to EOM.TSHotelManagement.Service/Business/Sellthing/ISellService.cs index c5b2a38..35d1f78 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs +++ b/EOM.TSHotelManagement.Service/Business/Sellthing/ISellService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 商品接口 diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs b/EOM.TSHotelManagement.Service/Business/Sellthing/SellService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs rename to EOM.TSHotelManagement.Service/Business/Sellthing/SellService.cs index 0281fd2..3a1c84e 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs +++ b/EOM.TSHotelManagement.Service/Business/Sellthing/SellService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 商品信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs b/EOM.TSHotelManagement.Service/Business/Spend/ISpendService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs rename to EOM.TSHotelManagement.Service/Business/Spend/ISpendService.cs index cc1bbd7..bd9d152 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs +++ b/EOM.TSHotelManagement.Service/Business/Spend/ISpendService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 消费信息接口 diff --git a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs rename to EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs index c8deb8f..0de3ab9 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs @@ -21,18 +21,18 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.CodeLib; using jvncorelib.EntityLib; using Microsoft.AspNetCore.Http; using SqlSugar; using System.Transactions; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 商品消费接口实现类 diff --git a/EOM.TSHotelManagement.Application/Dashboard/DashboardService.cs b/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Dashboard/DashboardService.cs rename to EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs index b3268b5..c97d2ab 100644 --- a/EOM.TSHotelManagement.Application/Dashboard/DashboardService.cs +++ b/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs @@ -1,13 +1,13 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.EntityLib; using System.Text; using static Org.BouncyCastle.Crypto.Engines.SM2Engine; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { public class DashboardService : IDashboardService { diff --git a/EOM.TSHotelManagement.Application/Dashboard/IDashboardService.cs b/EOM.TSHotelManagement.Service/Dashboard/IDashboardService.cs similarity index 89% rename from EOM.TSHotelManagement.Application/Dashboard/IDashboardService.cs rename to EOM.TSHotelManagement.Service/Dashboard/IDashboardService.cs index ad70feb..0c85f97 100644 --- a/EOM.TSHotelManagement.Application/Dashboard/IDashboardService.cs +++ b/EOM.TSHotelManagement.Service/Dashboard/IDashboardService.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { public interface IDashboardService { diff --git a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj b/EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj similarity index 83% rename from EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj rename to EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj index f40cb05..a33bf2d 100644 --- a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj +++ b/EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj @@ -36,8 +36,8 @@ - - + + diff --git a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs b/EOM.TSHotelManagement.Service/Employee/Check/EmployeeCheckService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs rename to EOM.TSHotelManagement.Service/Employee/Check/EmployeeCheckService.cs index a18651c..5958fee 100644 --- a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Check/EmployeeCheckService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工打卡接口实现类 diff --git a/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs b/EOM.TSHotelManagement.Service/Employee/Check/IEmployeeCheckService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs rename to EOM.TSHotelManagement.Service/Employee/Check/IEmployeeCheckService.cs index 70ada87..158bebb 100644 --- a/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Check/IEmployeeCheckService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工打卡接口 diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Service/Employee/EmployeeService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Employee/EmployeeService.cs rename to EOM.TSHotelManagement.Service/Employee/EmployeeService.cs index 7f7c472..4ca9ab6 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Service/Employee/EmployeeService.cs @@ -21,16 +21,16 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.EntityLib; using SqlSugar; using System.Security.Claims; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs b/EOM.TSHotelManagement.Service/Employee/History/EmployeeHistoryService.cs similarity index 93% rename from EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs rename to EOM.TSHotelManagement.Service/Employee/History/EmployeeHistoryService.cs index ea4ed21..969e1c7 100644 --- a/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs +++ b/EOM.TSHotelManagement.Service/Employee/History/EmployeeHistoryService.cs @@ -21,12 +21,12 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工履历接口实现类 diff --git a/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs b/EOM.TSHotelManagement.Service/Employee/History/IEmployeeHistoryService.cs similarity index 95% rename from EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs rename to EOM.TSHotelManagement.Service/Employee/History/IEmployeeHistoryService.cs index 2ab1cc2..bbcc6f5 100644 --- a/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs +++ b/EOM.TSHotelManagement.Service/Employee/History/IEmployeeHistoryService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工履历信息接口 diff --git a/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs b/EOM.TSHotelManagement.Service/Employee/IEmployeeService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs rename to EOM.TSHotelManagement.Service/Employee/IEmployeeService.cs index 83697fc..a0aa980 100644 --- a/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs +++ b/EOM.TSHotelManagement.Service/Employee/IEmployeeService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工信息接口 diff --git a/EOM.TSHotelManagement.Application/Employee/Permission/EmployeePermissionService.cs b/EOM.TSHotelManagement.Service/Employee/Permission/EmployeePermissionService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Employee/Permission/EmployeePermissionService.cs rename to EOM.TSHotelManagement.Service/Employee/Permission/EmployeePermissionService.cs index fdae2e0..153def3 100644 --- a/EOM.TSHotelManagement.Application/Employee/Permission/EmployeePermissionService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Permission/EmployeePermissionService.cs @@ -1,16 +1,16 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using jvncorelib.EntityLib; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// filename OR language.declaration() /// EmployeePermissionService.EmployeePermissionService():1 diff --git a/EOM.TSHotelManagement.Application/Employee/Permission/IEmployeePermissionService.cs b/EOM.TSHotelManagement.Service/Employee/Permission/IEmployeePermissionService.cs similarity index 91% rename from EOM.TSHotelManagement.Application/Employee/Permission/IEmployeePermissionService.cs rename to EOM.TSHotelManagement.Service/Employee/Permission/IEmployeePermissionService.cs index 185b319..46f1f5d 100644 --- a/EOM.TSHotelManagement.Application/Employee/Permission/IEmployeePermissionService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Permission/IEmployeePermissionService.cs @@ -1,12 +1,12 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// filename OR language.declaration() /// EmployeePermissionService.cs:1 diff --git a/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs b/EOM.TSHotelManagement.Service/Employee/Photo/EmployeePhotoService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs rename to EOM.TSHotelManagement.Service/Employee/Photo/EmployeePhotoService.cs index 72ab902..24f99b3 100644 --- a/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Photo/EmployeePhotoService.cs @@ -1,11 +1,11 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using Microsoft.AspNetCore.Http; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工照片接口实现类 diff --git a/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs b/EOM.TSHotelManagement.Service/Employee/Photo/IEmployeePhotoService.cs similarity index 93% rename from EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs rename to EOM.TSHotelManagement.Service/Employee/Photo/IEmployeePhotoService.cs index 7f2e62e..86b56ae 100644 --- a/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Photo/IEmployeePhotoService.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Http; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工照片模块接口 diff --git a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs b/EOM.TSHotelManagement.Service/Employee/RewardPunishment/IRewardPunishmentService.cs similarity index 95% rename from EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs rename to EOM.TSHotelManagement.Service/Employee/RewardPunishment/IRewardPunishmentService.cs index a5fd27b..759252d 100644 --- a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs +++ b/EOM.TSHotelManagement.Service/Employee/RewardPunishment/IRewardPunishmentService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工奖惩信息接口 diff --git a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs b/EOM.TSHotelManagement.Service/Employee/RewardPunishment/RewardPunishmentService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs rename to EOM.TSHotelManagement.Service/Employee/RewardPunishment/RewardPunishmentService.cs index 9f34822..35e6c03 100644 --- a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs +++ b/EOM.TSHotelManagement.Service/Employee/RewardPunishment/RewardPunishmentService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 员工奖惩记录接口实现类 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs index e546a09..4b66b6b 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs @@ -21,18 +21,18 @@ *SOFTWARE. * */ - using EOM.TSHotelManagement.Common.Contract; - using EOM.TSHotelManagement.Common.Core; - using EOM.TSHotelManagement.Common.Util; - using EOM.TSHotelManagement.EntityFramework; + using EOM.TSHotelManagement.Contract; + using EOM.TSHotelManagement.Domain; + using EOM.TSHotelManagement.Common; + using EOM.TSHotelManagement.Data; using jvncorelib.EncryptorLib; using jvncorelib.EntityLib; using SqlSugar; using System.Security.Claims; - using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; - using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; + using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; + using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 管理员数据访问层 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/IAdminService.cs similarity index 92% rename from EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Administrator/IAdminService.cs index 2600bc0..da06841 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/IAdminService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 管理员数据访问接口 @@ -111,14 +111,14 @@ namespace EOM.TSHotelManagement.Application /// /// 用户编码 /// 明细列表(包含 RoleNumber、PermissionNumber、PermissionName、MenuKey) - ListOutputDto ReadUserRolePermissions(string userNumber); + ListOutputDto ReadUserRolePermissions(string userNumber); /// /// 为指定用户分配“直接权限”(通过专属角色 R-USER-{UserNumber} 写入 RolePermission,全量覆盖) /// /// 用户编号与权限编码集合 /// - BaseResponse AssignUserPermissions(Common.Contract.SystemManagement.Dto.Permission.AssignUserPermissionsInputDto input); + BaseResponse AssignUserPermissions(Contract.SystemManagement.Dto.Permission.AssignUserPermissionsInputDto input); /// /// 读取指定用户的“直接权限”(仅来自专属角色 R-USER-{UserNumber} 的权限编码列表) diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Base/BaseService.cs similarity index 99% rename from EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Base/BaseService.cs index ee688cf..2ced569 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Base/BaseService.cs @@ -21,15 +21,15 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 基础信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Base/IBaseService.cs similarity index 99% rename from EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Base/IBaseService.cs index 0b59394..8dbbb59 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Base/IBaseService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 基础信息接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Menu/IMenuService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Menu/IMenuService.cs index 2a2329c..5d46f39 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Menu/IMenuService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 菜单接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Menu/MenuService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Menu/MenuService.cs index 724a189..66de68a 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Menu/MenuService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 菜单接口实现类 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Notice/INoticeService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Notice/INoticeService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/SystemManagement/Notice/INoticeService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Notice/INoticeService.cs index aa8a358..0487163 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Notice/INoticeService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Notice/INoticeService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 公告接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Notice/NoticeService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Notice/NoticeService.cs index c4df28e..f39706a 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Notice/NoticeService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 公告信息接口实现类 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Permission/IPermissionAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Permission/IPermissionAppService.cs similarity index 72% rename from EOM.TSHotelManagement.Application/SystemManagement/Permission/IPermissionAppService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Permission/IPermissionAppService.cs index 4b4ea63..6337c2b 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Permission/IPermissionAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Permission/IPermissionAppService.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 权限服务接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Permission/PermissionAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Permission/PermissionAppService.cs similarity index 92% rename from EOM.TSHotelManagement.Application/SystemManagement/Permission/PermissionAppService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Permission/PermissionAppService.cs index 43bda29..b878eca 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Permission/PermissionAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Permission/PermissionAppService.cs @@ -1,12 +1,12 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 权限服务实现 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Role/IRoleAppService.cs similarity index 90% rename from EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Role/IRoleAppService.cs index bf5c31f..cc5218d 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Role/IRoleAppService.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 角色服务接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Role/RoleAppService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/Role/RoleAppService.cs index e73c18f..ee81b94 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Role/RoleAppService.cs @@ -1,13 +1,13 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common.Contract.SystemManagement.Dto.Role; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 角色服务接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs b/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs index d22f35d..78c8ad7 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs @@ -21,9 +21,9 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 监管统计接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs b/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs index b4dd1f6..c241597 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 监管统计接口实现类 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/VipRule/IVipRuleAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/VipRule/IVipRuleAppService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/SystemManagement/VipRule/IVipRuleAppService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/VipRule/IVipRuleAppService.cs index 18e1853..3a6bad1 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/VipRule/IVipRuleAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/VipRule/IVipRuleAppService.cs @@ -22,9 +22,9 @@ * *模块说明:会员等级规则功能模块接口 */ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 会员等级规则功能模块接口 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/VipRule/VipRuleAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/VipRule/VipRuleAppService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/SystemManagement/VipRule/VipRuleAppService.cs rename to EOM.TSHotelManagement.Service/SystemManagement/VipRule/VipRuleAppService.cs index 6a67a39..9dd43a6 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/VipRule/VipRuleAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/VipRule/VipRuleAppService.cs @@ -21,14 +21,14 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 会员等级规则功能模块接口实现类 diff --git a/EOM.TSHotelManagement.Application/Util/IUtilService.cs b/EOM.TSHotelManagement.Service/Util/IUtilService.cs similarity index 94% rename from EOM.TSHotelManagement.Application/Util/IUtilService.cs rename to EOM.TSHotelManagement.Service/Util/IUtilService.cs index a7e841f..b6e1b89 100644 --- a/EOM.TSHotelManagement.Application/Util/IUtilService.cs +++ b/EOM.TSHotelManagement.Service/Util/IUtilService.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Contract; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 工具类接口 diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Service/Util/UtilService.cs similarity index 96% rename from EOM.TSHotelManagement.Application/Util/UtilService.cs rename to EOM.TSHotelManagement.Service/Util/UtilService.cs index 2d88d98..a10b6aa 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Service/Util/UtilService.cs @@ -1,12 +1,12 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; -using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Common; using jvncorelib.EntityLib; using SqlSugar; -namespace EOM.TSHotelManagement.Application +namespace EOM.TSHotelManagement.Service { /// /// 工具接口实现类 diff --git a/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj b/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj deleted file mode 100644 index 247f4e0..0000000 --- a/EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - net8.0 - enable - enable - AnyCPU;x64 - True - - - - - - - diff --git a/EOM.TSHotelManagement.Shared/Helper/DiscountHelper.cs b/EOM.TSHotelManagement.Shared/Helper/DiscountHelper.cs deleted file mode 100644 index 0ac1084..0000000 --- a/EOM.TSHotelManagement.Shared/Helper/DiscountHelper.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace EOM.TSHotelManagement.Shared -{ - public static class DiscountHelper - { - /// - /// 最大允许的折扣百分比值(默认100%) - /// - public const decimal MAX_DISCOUNT_PERCENT = 100m; - - /// - /// 最小允许的折扣百分比值 - /// - public const decimal MIN_DISCOUNT_PERCENT = 0m; - - /// - /// 将百分比折扣值转换为中文xx折表示 - /// 如果值无效,返回"无效折扣" - /// - public static string ToZheString(this decimal discountPercent) - { - if (discountPercent < MIN_DISCOUNT_PERCENT || discountPercent > MAX_DISCOUNT_PERCENT) - { - return "无效折扣"; - } - - if (discountPercent == 100) - { - return "无折扣"; - } - - if (discountPercent < 10) - { - return $"零点{discountPercent:#.0}折"; - } - - return discountPercent switch - { - var x when x % 10 == 0 => $"{ConvertDigit((int)x / 10)}折({discountPercent}%)", - _ => $"{ConvertDigit((int)discountPercent / 10)}{ConvertDigit((int)discountPercent % 10)}折({discountPercent}%)" - }; - } - - /// - /// 数字转中文大写(0-9) - /// - private static string ConvertDigit(int num) => num switch - { - 0 => "〇", - 1 => "一", - 2 => "二", - 3 => "三", - 4 => "四", - 5 => "五", - 6 => "六", - 7 => "七", - 8 => "八", - 9 => "九", - _ => throw new ArgumentOutOfRangeException(nameof(num), "仅支持0-9数字转换") - }; - } -} diff --git a/EOM.TSHotelManagement.Web.sln b/EOM.TSHotelManagement.Web.sln index 3889139..fdb6bc1 100644 --- a/EOM.TSHotelManagement.Web.sln +++ b/EOM.TSHotelManagement.Web.sln @@ -1,23 +1,21 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 18 -VisualStudioVersion = 18.3.11206.111 d18.3 +VisualStudioVersion = 18.3.11206.111 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.EntityFramework", "EOM.TSHotelManagement.EntityFramework\EOM.TSHotelManagement.EntityFramework.csproj", "{B0415048-E431-4FCF-9CF7-C1345C6F7750}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Data", "EOM.TSHotelManagement.Data\EOM.TSHotelManagement.Data.csproj", "{B0415048-E431-4FCF-9CF7-C1345C6F7750}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Application", "EOM.TSHotelManagement.Application\EOM.TSHotelManagement.Application.csproj", "{FE75A00A-4B07-49CE-8F17-F483044A569A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Service", "EOM.TSHotelManagement.Service\EOM.TSHotelManagement.Service.csproj", "{FE75A00A-4B07-49CE-8F17-F483044A569A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.WebApi", "EOM.TSHotelManagement.WebApi\EOM.TSHotelManagement.WebApi.csproj", "{4E6141F1-5096-46AB-AF4F-6BB6F348366C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.API", "EOM.TSHotelManagement.API\EOM.TSHotelManagement.API.csproj", "{4E6141F1-5096-46AB-AF4F-6BB6F348366C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Common.Core", "EOM.TSHotelManagement.Common.Core\EOM.TSHotelManagement.Common.Core.csproj", "{D99F4527-C620-4073-92B1-254A6C7FA363}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Domain", "EOM.TSHotelManagement.Domain\EOM.TSHotelManagement.Domain.csproj", "{D99F4527-C620-4073-92B1-254A6C7FA363}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Common.Util", "EOM.TSHotelManagement.Common.Util\EOM.TSHotelManagement.Common.Util.csproj", "{4D8B62E1-2D40-47E6-912D-D7B08F3F031A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Shared", "EOM.TSHotelManagement.Shared\EOM.TSHotelManagement.Shared.csproj", "{1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Common", "EOM.TSHotelManagement.Common\EOM.TSHotelManagement.Common.csproj", "{4D8B62E1-2D40-47E6-912D-D7B08F3F031A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Migration", "EOM.TSHotelManagement.Migration\EOM.TSHotelManagement.Migration.csproj", "{A1A986E0-E59D-4913-B63E-D965453B8CC0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOM.TSHotelManagement.Common.Contract", "EOM.TSHotelManagement.Common.Contract\EOM.TSHotelManagement.Common.Contract.csproj", "{B83A545B-9FFA-784F-3486-87BB3B50F46D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOM.TSHotelManagement.Contract", "EOM.TSHotelManagement.Contract\EOM.TSHotelManagement.Contract.csproj", "{B83A545B-9FFA-784F-3486-87BB3B50F46D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -45,10 +43,6 @@ Global {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Debug|x64.Build.0 = Debug|x64 {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Release|x64.ActiveCfg = Release|x64 {4D8B62E1-2D40-47E6-912D-D7B08F3F031A}.Release|x64.Build.0 = Release|x64 - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Debug|x64.ActiveCfg = Debug|x64 - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Debug|x64.Build.0 = Debug|x64 - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Release|x64.ActiveCfg = Release|x64 - {1DC1D6E4-9FEB-4AD3-B1A4-0C20241C6D85}.Release|x64.Build.0 = Release|x64 {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Debug|x64.ActiveCfg = Debug|x64 {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Debug|x64.Build.0 = Debug|x64 {A1A986E0-E59D-4913-B63E-D965453B8CC0}.Release|x64.ActiveCfg = Release|x64 -- Gitee From 5b3b25f59223956e9f3c63b2fbdc14dabf2bd5e3 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 13 Dec 2025 14:31:27 +0800 Subject: [PATCH 17/21] remove startup. --- .../Controllers/LoginController.cs | 1 + .../EOM.TSHotelManagement.API.csproj | 4 + .../Extensions/ApplicationExtensions.cs | 81 +++++++ .../Extensions/AutofacConfigExtensions.cs | 61 ++++++ .../DateOnlyJsonConverter.cs | 0 .../MiddlewareExtensions.cs | 0 .../MvcOptionsExtensions.cs | 0 .../PermissionSyncExtensions.cs | 2 +- .../RouteExtension.cs | 0 .../ServiceExtensions.cs} | 197 ++---------------- EOM.TSHotelManagement.API/Program.cs | 56 +++-- .../Config/CsrfTokenConfig.cs | 2 +- 12 files changed, 198 insertions(+), 206 deletions(-) create mode 100644 EOM.TSHotelManagement.API/Extensions/ApplicationExtensions.cs create mode 100644 EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs rename EOM.TSHotelManagement.API/{Extension => Extensions}/DateOnlyJsonConverter.cs (100%) rename EOM.TSHotelManagement.API/{Extension => Extensions}/MiddlewareExtensions.cs (100%) rename EOM.TSHotelManagement.API/{Extension => Extensions}/MvcOptionsExtensions.cs (100%) rename EOM.TSHotelManagement.API/{Extension => Extensions}/PermissionSyncExtensions.cs (99%) rename EOM.TSHotelManagement.API/{Extension => Extensions}/RouteExtension.cs (100%) rename EOM.TSHotelManagement.API/{Startup.cs => Extensions/ServiceExtensions.cs} (51%) rename {EOM.TSHotelManagement.API => EOM.TSHotelManagement.Common}/Config/CsrfTokenConfig.cs (94%) diff --git a/EOM.TSHotelManagement.API/Controllers/LoginController.cs b/EOM.TSHotelManagement.API/Controllers/LoginController.cs index e6ceefb..e0ea67c 100644 --- a/EOM.TSHotelManagement.API/Controllers/LoginController.cs +++ b/EOM.TSHotelManagement.API/Controllers/LoginController.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using System; +using EOM.TSHotelManagement.Common; namespace EOM.TSHotelManagement.WebApi { diff --git a/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj index c8db4f6..ab41189 100644 --- a/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj +++ b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj @@ -50,4 +50,8 @@ + + + + diff --git a/EOM.TSHotelManagement.API/Extensions/ApplicationExtensions.cs b/EOM.TSHotelManagement.API/Extensions/ApplicationExtensions.cs new file mode 100644 index 0000000..5ad7279 --- /dev/null +++ b/EOM.TSHotelManagement.API/Extensions/ApplicationExtensions.cs @@ -0,0 +1,81 @@ +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.HttpOverrides; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using System; + +namespace EOM.TSHotelManagement.WebApi +{ + public static class ApplicationExtensions + { + public static void ConfigureEnvironment(this WebApplication app) + { + if (app.Environment.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseForwardedHeaders(new ForwardedHeadersOptions + { + ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto + }); + } + + public static void ConfigureMiddlewares(this WebApplication app) + { + app.UseForwardedHeaders(); + app.UseRouting(); + app.UseCors("MyCorsPolicy"); + app.UseAuthentication(); + app.UseAuthorization(); + app.UseAntiforgery(); + app.UseRequestLogging(); + } + + public static void InitializeDatabase(this WebApplication app) + { + try + { + using var scope = app.Services.CreateScope(); + var initializer = scope.ServiceProvider.GetService(); + initializer?.InitializeDatabase(); + } + catch (Exception ex) + { + var message = LocalizationHelper.GetLocalizedString( + $"Database initialization failed: {ex.Message}. Please manually initialize or fix the error.", + $"数据库初始化失败:{ex.Message},请手动初始化或修复错误。"); + Console.WriteLine(ex.Message); + throw new Exception(message, ex); + } + finally + { + Console.WriteLine(LocalizationHelper.GetLocalizedString( + "Database initialization completed.", + "数据库初始化完成。")); + } + } + + public static void ConfigureEndpoints(this WebApplication app) + { + app.MapControllers(); + app.MapGet("api/version", () => + $"Software Version: {Environment.GetEnvironmentVariable("SoftwareVersion") ?? "Local Mode"}"); + } + + public static void ConfigureSwaggerUI(this WebApplication app) + { + app.UseOpenApi(); + app.UseSwaggerUi(config => + { + config.Path = "/swagger"; + }); + app.UseReDoc(config => + { + config.Path = "/redoc"; + }); + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs b/EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs new file mode 100644 index 0000000..cbd9f51 --- /dev/null +++ b/EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs @@ -0,0 +1,61 @@ +using Autofac; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Data; +using jvncorelib.CodeLib; +using jvncorelib.EncryptorLib; +using jvncorelib.EntityLib; +using SqlSugar; +using System; +using System.IO; +using System.Reflection; + +namespace EOM.TSHotelManagement.WebApi +{ + public static class AutofacConfigExtensions + { + public static void ConfigureAutofacContainer(this ContainerBuilder builder) + { + #region AutoFac IOC容器,实现批量依赖注入的容器 + try + { + builder.Register(c => + { + var factory = c.Resolve(); + return factory.CreateClient(); + }).As().InstancePerLifetimeScope(); + + builder.RegisterType().As().InstancePerLifetimeScope(); + + builder.RegisterType().As().SingleInstance(); + + builder.RegisterType() + .InstancePerDependency(); + + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + + builder.RegisterGeneric(typeof(GenericRepository<>)).AsSelf().InstancePerLifetimeScope(); + + // 程序集批量反射注入 + var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Service.dll")); + builder.RegisterAssemblyTypes(assemblyService) + .AsImplementedInterfaces() + .InstancePerDependency() + .PropertiesAutowired(); + + // 注入加解密组件 + var encryptionService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "jvncorelib.dll")); + builder.RegisterAssemblyTypes(encryptionService) + .AsImplementedInterfaces() + .PropertiesAutowired(); + } + catch (Exception ex) + { + throw new Exception($"Autofac configuration failed: {ex.Message}", ex); + } + #endregion + } + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.API/Extension/DateOnlyJsonConverter.cs b/EOM.TSHotelManagement.API/Extensions/DateOnlyJsonConverter.cs similarity index 100% rename from EOM.TSHotelManagement.API/Extension/DateOnlyJsonConverter.cs rename to EOM.TSHotelManagement.API/Extensions/DateOnlyJsonConverter.cs diff --git a/EOM.TSHotelManagement.API/Extension/MiddlewareExtensions.cs b/EOM.TSHotelManagement.API/Extensions/MiddlewareExtensions.cs similarity index 100% rename from EOM.TSHotelManagement.API/Extension/MiddlewareExtensions.cs rename to EOM.TSHotelManagement.API/Extensions/MiddlewareExtensions.cs diff --git a/EOM.TSHotelManagement.API/Extension/MvcOptionsExtensions.cs b/EOM.TSHotelManagement.API/Extensions/MvcOptionsExtensions.cs similarity index 100% rename from EOM.TSHotelManagement.API/Extension/MvcOptionsExtensions.cs rename to EOM.TSHotelManagement.API/Extensions/MvcOptionsExtensions.cs diff --git a/EOM.TSHotelManagement.API/Extension/PermissionSyncExtensions.cs b/EOM.TSHotelManagement.API/Extensions/PermissionSyncExtensions.cs similarity index 99% rename from EOM.TSHotelManagement.API/Extension/PermissionSyncExtensions.cs rename to EOM.TSHotelManagement.API/Extensions/PermissionSyncExtensions.cs index a1f100e..d8727d2 100644 --- a/EOM.TSHotelManagement.API/Extension/PermissionSyncExtensions.cs +++ b/EOM.TSHotelManagement.API/Extensions/PermissionSyncExtensions.cs @@ -11,7 +11,7 @@ using SqlSugar; using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.WebApi.Authorization; -namespace EOM.TSHotelManagement.WebApi.Extension +namespace EOM.TSHotelManagement.WebApi { /// /// 启动时扫描所有带有 RequirePermissionAttribute 的控制器动作, diff --git a/EOM.TSHotelManagement.API/Extension/RouteExtension.cs b/EOM.TSHotelManagement.API/Extensions/RouteExtension.cs similarity index 100% rename from EOM.TSHotelManagement.API/Extension/RouteExtension.cs rename to EOM.TSHotelManagement.API/Extensions/RouteExtension.cs diff --git a/EOM.TSHotelManagement.API/Startup.cs b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs similarity index 51% rename from EOM.TSHotelManagement.API/Startup.cs rename to EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs index 34eb529..da67e2a 100644 --- a/EOM.TSHotelManagement.API/Startup.cs +++ b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs @@ -1,73 +1,35 @@ -using Autofac; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.WebApi.Authorization; using EOM.TSHotelManagement.WebApi.Extension; using EOM.TSHotelManagement.WebApi.Filters; -using jvncorelib.EncryptorLib; using jvncorelib.CodeLib; +using jvncorelib.EncryptorLib; using jvncorelib.EntityLib; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Policy; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; -using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; using Microsoft.IdentityModel.Tokens; using NSwag; using NSwag.Generation.Processors.Security; -using SqlSugar; using System; using System.IO; using System.Linq; -using System.Reflection; -using System.Reflection.Metadata; using System.Text; using System.Text.Json.Serialization; namespace EOM.TSHotelManagement.WebApi { - public class Startup + public static class ServiceExtensions { - private readonly IConfiguration _configuration; - - public Startup(IConfiguration configuration) - { - _configuration = configuration; - } - - public void ConfigureServices(IServiceCollection services) - { - ConfigureDataProtection(services); - RegisterSingletonServices(services); - ConfigureAuthentication(services); - ConfigureControllers(services); - ConfigureSwagger(services); - ConfigureCors(services); - ConfigureHttpContextAccessor(services); - ConfigureXForward(services); - } - - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - ConfigureEnvironment(app, env); - ConfigureMiddlewares(app); - InitializeDatabase(app); - app.SyncPermissionsFromAttributes(); - ConfigureEndpoints(app); - ConfigureSwaggerUI(app); - } - - #region Private Helper Methods - - private void ConfigureDataProtection(IServiceCollection services) + public static void ConfigureDataProtection(this IServiceCollection services, IConfiguration configuration) { if (Environment.GetEnvironmentVariable(SystemConstants.Env) == SystemConstants.Docker) { @@ -81,7 +43,7 @@ namespace EOM.TSHotelManagement.WebApi } } - private void ConfigureXForward(IServiceCollection services) + public static void ConfigureXForward(this IServiceCollection services) { services.Configure(options => { @@ -93,25 +55,24 @@ namespace EOM.TSHotelManagement.WebApi }); } - private void RegisterSingletonServices(IServiceCollection services) + public static void RegisterSingletonServices(this IServiceCollection services, IConfiguration configuration) { services.AddScoped(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.Configure(_configuration.GetSection("CsrfToken")); + services.Configure(configuration.GetSection("CsrfToken")); services.AddSingleton(); services.AddSingleton(); } - private void ConfigureAuthentication(IServiceCollection services) + public static void ConfigureAuthentication(this IServiceCollection services, IConfiguration configuration) { services.AddAuthentication(options => { options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; - }).AddJwtBearer("Bearer", options => { options.TokenValidationParameters = new TokenValidationParameters @@ -119,7 +80,8 @@ namespace EOM.TSHotelManagement.WebApi ValidateIssuerSigningKey = true, ValidateIssuer = false, ValidateAudience = false, - IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_configuration["Jwt:Key"])) + IssuerSigningKey = new SymmetricSecurityKey( + Encoding.UTF8.GetBytes(configuration["Jwt:Key"] ?? throw new InvalidOperationException("JWT Key is not configured"))) }; }); @@ -130,7 +92,7 @@ namespace EOM.TSHotelManagement.WebApi policy.AuthenticationSchemes.Add("Bearer"); policy.RequireAuthenticatedUser(); }); - options.DefaultPolicy = options.GetPolicy("ApiAccess"); + options.DefaultPolicy = options.GetPolicy("ApiAccess")!; }); services.AddAntiforgery(options => @@ -146,11 +108,10 @@ namespace EOM.TSHotelManagement.WebApi // RBAC: 注册基于权限码的动态策略提供者与处理器 services.AddSingleton(); services.AddScoped(); - // 全局自定义授权结果处理器:无权限时返回业务码1401与友好提示 services.AddSingleton(); } - private void ConfigureControllers(IServiceCollection services) + public static void ConfigureControllers(this IServiceCollection services) { services.AddControllers(options => { @@ -163,7 +124,6 @@ namespace EOM.TSHotelManagement.WebApi options.JsonSerializerOptions.PropertyNamingPolicy = null; options.JsonSerializerOptions.DictionaryKeyPolicy = null; options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull; - options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles; options.JsonSerializerOptions.Converters.Add(new DateOnlyJsonConverter()); }) @@ -193,12 +153,7 @@ namespace EOM.TSHotelManagement.WebApi }); } - private void ConfigureHttpContextAccessor(IServiceCollection services) - { - services.AddHttpContextAccessor(); - } - - private void ConfigureSwagger(IServiceCollection services) + public static void ConfigureSwagger(this IServiceCollection services) { services.AddOpenApiDocument(config => { @@ -222,9 +177,9 @@ namespace EOM.TSHotelManagement.WebApi }); } - private void ConfigureCors(IServiceCollection services) + public static void ConfigureCors(this IServiceCollection services, IConfiguration configuration) { - var allowedOrigins = _configuration.GetSection("AllowedOrigins").Get() ?? Array.Empty(); + var allowedOrigins = configuration.GetSection("AllowedOrigins").Get() ?? Array.Empty(); services.AddCors(options => { options.AddPolicy("MyCorsPolicy", policy => @@ -241,125 +196,5 @@ namespace EOM.TSHotelManagement.WebApi }); }); } - - private void InitializeDatabase(IApplicationBuilder app) - { - try - { - using (var scope = app.ApplicationServices.CreateScope()) - { - var initializer = scope.ServiceProvider.GetService(); - initializer?.InitializeDatabase(); - } - } - catch (Exception ex) - { - var message = LocalizationHelper.GetLocalizedString( - $"Database initialization failed: {ex.Message}. Please manually initialize or fix the error.", - $"数据库初始化失败:{ex.Message},请手动初始化或修复错误。"); - Console.WriteLine(ex.Message); - throw new Exception(message, ex); - } - finally - { - Console.WriteLine(LocalizationHelper.GetLocalizedString( - "Database initialization completed.", - "数据库初始化完成。")); - } - } - - private void ConfigureEnvironment(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseForwardedHeaders(new ForwardedHeadersOptions - { - ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto - }); - } - - private void ConfigureMiddlewares(IApplicationBuilder app) - { - app.UseForwardedHeaders(); - app.UseRouting(); - app.UseCors("MyCorsPolicy"); - app.UseAuthentication(); - app.UseAuthorization(); - app.UseAntiforgery(); - app.UseRequestLogging(); - } - - private void ConfigureEndpoints(IApplicationBuilder app) - { - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - endpoints.MapGet("api/version", () => - $"Software Version: {Environment.GetEnvironmentVariable("SoftwareVersion") ?? "Local Mode"}"); - }); - } - - private void ConfigureSwaggerUI(IApplicationBuilder app) - { - app.UseOpenApi(); - app.UseSwaggerUi(); - app.UseReDoc(); - } - - #endregion - - /// - /// AutoFac - /// - /// - public void ConfigureContainer(ContainerBuilder builder) - { - #region AutoFac IOC容器,实现批量依赖注入的容器 - try - { - builder.Register(c => - { - var factory = c.Resolve(); - return factory.CreateClient(); - }).As().InstancePerLifetimeScope(); - - builder.RegisterType().As().InstancePerLifetimeScope(); - - builder.RegisterType().As().SingleInstance(); - - builder.RegisterType() - .InstancePerDependency(); - - builder.RegisterType().AsSelf().InstancePerLifetimeScope(); - builder.RegisterType().AsSelf().InstancePerLifetimeScope(); - builder.RegisterType().AsSelf().InstancePerLifetimeScope(); - builder.RegisterType().AsSelf().InstancePerLifetimeScope(); - - builder.RegisterGeneric(typeof(GenericRepository<>)).AsSelf().InstancePerLifetimeScope(); - - //程序集批量反射注入 - var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Service.dll")); - builder.RegisterAssemblyTypes(assemblyService) - .AsImplementedInterfaces() - .InstancePerDependency() - .PropertiesAutowired(); - - //注入加解密组件 - var encryptionService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "jvncorelib.dll")); - builder.RegisterAssemblyTypes(encryptionService) - .AsImplementedInterfaces() - .PropertiesAutowired(); - } - catch (Exception ex) - { - throw new Exception(ex.Message + "\n" + ex.InnerException); - } - #endregion - } - - } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.API/Program.cs b/EOM.TSHotelManagement.API/Program.cs index dedc7bd..ccd7313 100644 --- a/EOM.TSHotelManagement.API/Program.cs +++ b/EOM.TSHotelManagement.API/Program.cs @@ -1,34 +1,44 @@ +using Autofac; using Autofac.Extensions.DependencyInjection; -using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace EOM.TSHotelManagement.WebApi { - /// - /// - /// public class Program { - /// - /// - /// - /// public static void Main(string[] args) { - CreateHostBuilder(args).Build().Run(); - } + var builder = WebApplication.CreateBuilder(args); + var configuration = builder.Configuration; + + // Autofac + builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory()); + builder.Host.ConfigureContainer(AutofacConfigExtensions.ConfigureAutofacContainer); + + // + builder.Services.ConfigureDataProtection(configuration); + builder.Services.RegisterSingletonServices(configuration); + builder.Services.ConfigureAuthentication(configuration); + builder.Services.ConfigureControllers(); + builder.Services.ConfigureSwagger(); + builder.Services.ConfigureCors(configuration); + builder.Services.AddHttpContextAccessor(); + builder.Services.ConfigureXForward(); - /// - /// - /// - /// - /// - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .UseServiceProviderFactory(new AutofacServiceProviderFactory())//滻Ĭ - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); + // Ӧ + var app = builder.Build(); + + // Ӧ + app.ConfigureEnvironment(); + app.ConfigureMiddlewares(); + app.InitializeDatabase(); + app.SyncPermissionsFromAttributes(); + app.ConfigureEndpoints(); + app.ConfigureSwaggerUI(); + + app.Run(); + } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.API/Config/CsrfTokenConfig.cs b/EOM.TSHotelManagement.Common/Config/CsrfTokenConfig.cs similarity index 94% rename from EOM.TSHotelManagement.API/Config/CsrfTokenConfig.cs rename to EOM.TSHotelManagement.Common/Config/CsrfTokenConfig.cs index 8938252..b29edd8 100644 --- a/EOM.TSHotelManagement.API/Config/CsrfTokenConfig.cs +++ b/EOM.TSHotelManagement.Common/Config/CsrfTokenConfig.cs @@ -1,6 +1,6 @@ using System; -namespace EOM.TSHotelManagement.WebApi +namespace EOM.TSHotelManagement.Common { public class CsrfTokenConfig { -- Gitee From 72dffbf72772dd2d26cac983f41d418ecdceed3b Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 13 Dec 2025 15:45:14 +0800 Subject: [PATCH 18/21] upgrade to .net 10. --- .../EOM.TSHotelManagement.API.csproj | 23 ++++--------------- .../Extensions/ServiceExtensions.cs | 3 +-- .../Factory/MailConfigFactory.cs | 1 - .../EOM.TSHotelManagement.Common.csproj | 16 ++++++------- .../EOM.TSHotelManagement.Contract.csproj | 4 ++-- .../EOM.TSHotelManagement.Data.csproj | 10 ++++---- .../EOM.TSHotelManagement.Domain.csproj | 6 ++--- .../EOM.TSHotelManagement.Migration.csproj | 4 ++-- .../EOM.TSHotelManagement.Service.csproj | 15 +++--------- 9 files changed, 29 insertions(+), 53 deletions(-) diff --git a/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj index ab41189..336413e 100644 --- a/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj +++ b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj @@ -1,20 +1,12 @@  - net8.0 + net10.0 EOM.TSHotelManagement.WebApi.Program True Linux false - AnyCPU;x64 - - - - - - Off - 1701;1702;1591; - True + x64 @@ -25,19 +17,14 @@ True - - False - - False - - - - + + + diff --git a/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs index da67e2a..5289c75 100644 --- a/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs +++ b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs @@ -1,7 +1,6 @@ using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; using EOM.TSHotelManagement.WebApi.Authorization; -using EOM.TSHotelManagement.WebApi.Extension; using EOM.TSHotelManagement.WebApi.Filters; using jvncorelib.CodeLib; using jvncorelib.EncryptorLib; @@ -50,7 +49,7 @@ namespace EOM.TSHotelManagement.WebApi options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; - options.KnownNetworks.Clear(); + options.KnownIPNetworks.Clear(); options.KnownProxies.Clear(); }); } diff --git a/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs b/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs index b93ac40..2467f1e 100644 --- a/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs +++ b/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs @@ -1,5 +1,4 @@ using EOM.TSHotelManagement.Common; -using EOM.TSHotelManagement.Common; using Microsoft.Extensions.Configuration; namespace EOM.TSHotelManagement.WebApi diff --git a/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj b/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj index 3aee476..27e5bca 100644 --- a/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj +++ b/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj @@ -1,19 +1,19 @@  - net8.0 - AnyCPU;x64 + net10.0 + x64 True - + - - - - - + + + + + diff --git a/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj b/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj index a96fd13..5c5d247 100644 --- a/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj +++ b/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj @@ -1,11 +1,11 @@  - net8.0 + net10.0 enable enable True - AnyCPU;x64 + x64 True diff --git a/EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj b/EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj index c3e1dd8..5780891 100644 --- a/EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj +++ b/EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj @@ -1,17 +1,17 @@ - net8.0 + net10.0 enable disable - AnyCPU;x64 + x64 - - - + + + diff --git a/EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj b/EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj index 188131a..f5204a5 100644 --- a/EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj +++ b/EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj @@ -1,13 +1,13 @@  - net8.0 + net10.0 True - AnyCPU;x64 + x64 - + diff --git a/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj b/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj index 6879191..7b87eca 100644 --- a/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj +++ b/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj @@ -1,10 +1,10 @@  - net8.0 + net10.0 enable enable - AnyCPU;x64 + x64 diff --git a/EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj b/EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj index a33bf2d..eda955a 100644 --- a/EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj +++ b/EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj @@ -1,25 +1,17 @@ - + - net8.0 + net10.0 enable disable True - AnyCPU;x64 - - - - 1701;1702;8618; + x64 1701;1702;8618; - - 1701;1702;8618; - - 1701;1702;8618; @@ -32,7 +24,6 @@ - -- Gitee From 838e15c48f338762dfc3606f880f9bba2c6081c8 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 13 Dec 2025 15:52:50 +0800 Subject: [PATCH 19/21] update README. --- README.en.md | 67 ++++++++++++++----------------------------------- README.md | 71 ++++++++++++++++------------------------------------ 2 files changed, 40 insertions(+), 98 deletions(-) diff --git a/README.en.md b/README.en.md index 31e29ef..9b174cc 100644 --- a/README.en.md +++ b/README.en.md @@ -26,11 +26,11 @@ ### :exclamation: About this project: -This project is a TS hotel management system backend API project built on .Net8, mainly for the 2.0 upgrade, welcome to Star & Fork. +This project is a TS hotel management system backend API project built on .Net10, welcome to Star & Fork. 1. All development should comply with the MIT open source license. 2. If you find bugs, feel free to raise an issue! -3. The project currently supports multiple databases and automated database/table creation. For implementation details, refer to the `InitializeDatabase` method in `Startup.cs`. +3. The project currently supports multiple databases and automated database/table creation. For implementation details, refer to the `InitializeDatabase` method. 4. This project has implemented multi-database support (mainstream) based on the SQL Sugar framework. Below is the list of currently tested and verified database compatibility tables: | Database | Version | Support Create Table(Y/N) | Pass(Y/N) | @@ -52,7 +52,7 @@ Operating System: Windows 11(x64) Development Tool: Microsoft Visual Studio 2022 (latest version of the system) -Database: MariaDB/PostgreSQL/MySQL/SQL Server +Database: MariaDB Database Management Tool: DbGate @@ -60,9 +60,9 @@ Programming Language: C# language, LINQ language Development Platform: .Net -Development Framework: .Net 8 +Development Framework: .Net 10 -Development Technology: .NET 8 WebAPI +Development Technology: .NET 10 WebAPI ### :open_file_folder: System structure: @@ -70,52 +70,23 @@ Development Technology: .NET 8 WebAPI EOM.TSHotelManagement.Web ├─ .git ├─ .gitignore -├─ EOM.TSHotelManagement.Application -│ ├─ EOM.TSHotelManagement.Application.csproj -│ ├─ BaseDto -│ ├─ Business -│ ├─ Employee -│ ├─ Sys -│ ├─ SystemManagement -│ ├─ Util -├─ EOM.TSHotelManagement.Common.Contract -│ ├─ EOM.TSHotelManagement.Common.Contract.csproj -│ ├─ Business -│ ├─ Employee -│ ├─ Sys -│ ├─ SystemManagement -│ ├─ Util -├─ EOM.TSHotelManagement.Common.Core -│ ├─ EOM.TSHotelManagement.Core.csproj -│ ├─ BaseEntity.cs -│ ├─ Business -│ ├─ Employee -│ ├─ Sys -│ ├─ SystemManagement -│ ├─ Util -├─ EOM.TSHotelManagement.EntityFramework -│ ├─ EOM.TSHotelManagement.EntityFramework.csproj -│ ├─ Repository -│ │ └─ GenericRepository.cs +├─ EOM.TSHotelManagement.Service +│ ├─ EOM.TSHotelManagement.Service.csproj +├─ EOM.TSHotelManagement.Contract +│ ├─ EOM.TSHotelManagement.Contract.csproj +├─ EOM.TSHotelManagement.Domain +│ ├─ EOM.TSHotelManagement.Domain.csproj +├─ EOM.TSHotelManagement.Data +│ ├─ EOM.TSHotelManagement.Data.csproj ├─ EOM.TSHotelManagement.Migration │ ├─ EOM.TSHotelManagement.Migration.csproj -│ ├─ EntityBuilder.cs ├─ EOM.TSHotelManagement.Web.sln -├─ EOM.TSHotelManagement.Share -│ ├─ EOM.TSHotelManagement.Share.csproj -│ ├─ Interface -├─ EOM.TSHotelManagement.WebApi +├─ EOM.TSHotelManagement.API │ ├─ Controllers -│ │ ├─ Business -│ │ ├─ Sys -│ │ ├─ Employee -│ │ └─ SystemManagement -│ │ └─ Util -│ ├─ EOM.TSHotelManagement.WebApi.csproj -│ ├─ EOM.TSHotelManagement.WebApi.csproj.user -│ ├─ EOM.TSHotelManagement.WebApi.xml +│ ├─ EOM.TSHotelManagement.API.csproj +│ ├─ EOM.TSHotelManagement.API.csproj.user +│ ├─ EOM.TSHotelManagement.API.xml │ ├─ Program.cs -│ ├─ Startup.cs │ ├─ appsettings.Development.json │ ├─ appsettings.json ├─ LICENSE @@ -137,9 +108,9 @@ EOM.TSHotelManagement.Web **Easy-Open-Meta (late maintenance and development)** -### :computer: Project deployment (before executing the steps below, you need to install .NET 8 SDK and Runtime): +### :computer: Project deployment (before executing the steps below, you need to install .NET 10 SDK and Runtime): -**Download and install Microsoft Visual Studio Professional 2022 or above version, unzip the Zip package, and run the file with .sln suffix to start.** +**Download and install Microsoft Visual Studio Professional 2026 or above version, unzip the Zip package, and run the file with .sln suffix to start.** ### :inbox_tray: Database deployment (local): diff --git a/README.md b/README.md index 0a2f758..c17406f 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ ### :exclamation: 本项目介绍: -本项目是基于.Net8构建的TS酒店管理系统后端API项目,主要用于2.0升级所用,欢迎Start&Fork +本项目是基于.Net10构建的TS酒店管理系统后端API项目,欢迎Start&Fork 1、一切开发请遵照MIT开源协议进行。 2、有bug欢迎提出issue! -3、本项目当前已支持多数据库以及一键建库建表,具体代码可以参考Startup.cs中的InitializeDatabase方法。 +3、本项目当前已支持多数据库以及一键建库建表,具体代码可以参考InitializeDatabase方法。 4、本项目已基于SQL Sugar框架支持多数据库(主流),以下是目前已通过测试的数据库表格: @@ -58,7 +58,7 @@ 开发工具:Microsoft Visual Studio 2022(系统最新版本) -数据库:MariaDB/PostgreSQL/MySQL/SQL Server +数据库:MariaDB 数据库管理工具:DbGate @@ -66,9 +66,9 @@ 开发平台:.Net -开发框架:.Net 8 +开发框架:.Net 10 -开发技术:.NET 8 WebAPI +开发技术:.NET 10 WebAPI ### :open_file_folder: 系统结构: @@ -76,52 +76,23 @@ EOM.TSHotelManagement.Web ├─ .git ├─ .gitignore -├─ EOM.TSHotelManagement.Application -│ ├─ EOM.TSHotelManagement.Application.csproj -│ ├─ BaseDto -│ ├─ Business -│ ├─ Employee -│ ├─ Sys -│ ├─ SystemManagement -│ ├─ Util -├─ EOM.TSHotelManagement.Common.Contract -│ ├─ EOM.TSHotelManagement.Common.Contract.csproj -│ ├─ Business -│ ├─ Employee -│ ├─ Sys -│ ├─ SystemManagement -│ ├─ Util -├─ EOM.TSHotelManagement.Common.Core -│ ├─ EOM.TSHotelManagement.Core.csproj -│ ├─ BaseEntity.cs -│ ├─ Business -│ ├─ Employee -│ ├─ Sys -│ ├─ SystemManagement -│ ├─ Util -├─ EOM.TSHotelManagement.EntityFramework -│ ├─ EOM.TSHotelManagement.EntityFramework.csproj -│ ├─ Repository -│ │ └─ GenericRepository.cs +├─ EOM.TSHotelManagement.Service +│ ├─ EOM.TSHotelManagement.Service.csproj +├─ EOM.TSHotelManagement.Contract +│ ├─ EOM.TSHotelManagement.Contract.csproj +├─ EOM.TSHotelManagement.Domain +│ ├─ EOM.TSHotelManagement.Domain.csproj +├─ EOM.TSHotelManagement.Data +│ ├─ EOM.TSHotelManagement.Data.csproj ├─ EOM.TSHotelManagement.Migration │ ├─ EOM.TSHotelManagement.Migration.csproj -│ ├─ EntityBuilder.cs ├─ EOM.TSHotelManagement.Web.sln -├─ EOM.TSHotelManagement.Share -│ ├─ EOM.TSHotelManagement.Share.csproj -│ ├─ Interface -├─ EOM.TSHotelManagement.WebApi +├─ EOM.TSHotelManagement.API │ ├─ Controllers -│ │ ├─ Business -│ │ ├─ Sys -│ │ ├─ Employee -│ │ └─ SystemManagement -│ │ └─ Util -│ ├─ EOM.TSHotelManagement.WebApi.csproj -│ ├─ EOM.TSHotelManagement.WebApi.csproj.user -│ ├─ EOM.TSHotelManagement.WebApi.xml +│ ├─ EOM.TSHotelManagement.API.csproj +│ ├─ EOM.TSHotelManagement.API.csproj.user +│ ├─ EOM.TSHotelManagement.API.xml │ ├─ Program.cs -│ ├─ Startup.cs │ ├─ appsettings.Development.json │ ├─ appsettings.json ├─ LICENSE @@ -143,9 +114,9 @@ EOM.TSHotelManagement.Web **易开元(后期维护和开发)** -### :computer: 项目运行部署(执行下面步骤前需先安装.NET 8 SDK和Runtime): +### :computer: 项目运行部署(执行下面步骤前需先安装.NET 10 SDK和Runtime): -**下载并安装Microsoft Visual Studio Professional 2022及以上版本,并通过下载Zip包解压,打开.sln后缀格式文件运行。** +**下载并安装Microsoft Visual Studio Professional 2026及以上版本,并通过下载Zip包解压,打开.sln后缀格式文件运行。** ### :inbox_tray: Docker运行部署(以Ubuntu为例): @@ -184,8 +155,8 @@ docker run -d \ |ASPNETCORE_ENVIRONMENT|系统环境(决定Dataprotection Key的生成位置)|Y|docker|docker| |DOCKER_ENV|是否为docker环境|Y|true|true| |{默认数据库(e.g:MariaDB/MySql/SqlServer/PgSql)}ConnectStr|对应数据库链接字符串|Y|N/A|N/A| -|Jwt__Issuer|签发者标识|Y|N/A|N/A| -|Jwt__Audience|目标接收方标识|Y|N/A|N/A| +|Jwt__Issuer|签发者标识|N|N/A|N/A| +|Jwt__Audience|目标接收方标识|N|N/A|N/A| |Jwt__Key|JWT Key|Y|N/A|N/A| |Jwt__ExpiryMinutes|token有效时间/分钟|Y|20|N/A| |Lsky__BaseAddress|兰空图床基础地址|Y|N/A|N/A| -- Gitee From 04f886bc879eb9b1619ffb0e11858c79aa3a066f Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 20 Dec 2025 20:29:20 +0800 Subject: [PATCH 20/21] optimization project layer. --- DTO_VALIDATION_QUICK_REFERENCE.md | 100 ------------- DTO_VALIDATION_UPDATES.md | 137 ----------------- Dockerfile | 30 ++-- .../Controllers/LoginController.cs | 1 + .../EOM.TSHotelManagement.API.csproj | 4 - .../Extensions/ServiceExtensions.cs | 3 +- .../Constant/ConsumptionConstant.cs | 4 +- .../Constant/SpendType.cs | 13 -- .../Constant/SpendTypeConstant.cs | 15 ++ .../Constant/SystemConstant.cs | 20 +++ .../Constant/SystemConstants.cs | 16 -- .../EOM.TSHotelManagement.Common.csproj | 8 +- .../Enums}/GenderType.cs | 2 +- .../Enums}/NewsStatus.cs | 2 +- .../Enums}/NewsType.cs | 2 +- .../Enums}/PoliticalAffiliation.cs | 2 +- .../Enums}/ReserType.cs | 2 +- .../{GenerateJWT => Helper}/JWTHelper.cs | 3 +- .../Helper/LskyHelper.cs | 3 +- .../Helper/MailHelper.cs | 3 +- .../Templates/EmailTemplate.cs | 3 +- .../EOM.TSHotelManagement.Contract.csproj | 5 +- .../Connector/SqlSugarClientConnector.cs | 27 ++-- .../DatabaseInitializer.cs | 19 +-- .../Config/CsrfTokenConfig.cs | 2 +- .../Config/JwtConfig.cs | 2 +- .../Config/LskyConfig.cs | 2 +- .../Config/MailConfig.cs | 2 +- .../Config/Template.cs | 2 +- .../Constant/ConstantBase.cs | 6 +- ...OM.TSHotelManagement.Infrastructure.csproj | 14 ++ .../Factory}/IJwtConfigFactory.cs | 2 +- .../Factory}/ILskyConfigFactory.cs | 2 +- .../Factory}/IMailConfigFactory.cs | 2 +- .../Factory/JwtConfigFactory.cs | 5 +- .../Factory/LskyConfigFactory.cs | 18 +-- .../Factory/MailConfigFactory.cs | 17 +-- .../EOM.TSHotelManagement.Migration.csproj | 1 + .../EntityBuilder.cs | 3 +- .../Business/News/NewsService.cs | 2 - .../Business/Room/RoomService.cs | 2 +- .../Business/Spend/SpendService.cs | 16 +- .../Dashboard/DashboardService.cs | 4 +- EOM.TSHotelManagement.Web.sln | 6 + add_validation_attributes.ps1 | 141 ------------------ 45 files changed, 155 insertions(+), 520 deletions(-) delete mode 100644 DTO_VALIDATION_QUICK_REFERENCE.md delete mode 100644 DTO_VALIDATION_UPDATES.md delete mode 100644 EOM.TSHotelManagement.Common/Constant/SpendType.cs create mode 100644 EOM.TSHotelManagement.Common/Constant/SpendTypeConstant.cs create mode 100644 EOM.TSHotelManagement.Common/Constant/SystemConstant.cs delete mode 100644 EOM.TSHotelManagement.Common/Constant/SystemConstants.cs rename {EOM.TSHotelManagement.Domain/Business/Customer => EOM.TSHotelManagement.Common/Enums}/GenderType.cs (97%) rename {EOM.TSHotelManagement.Domain/Business/News => EOM.TSHotelManagement.Common/Enums}/NewsStatus.cs (94%) rename {EOM.TSHotelManagement.Domain/Business/News => EOM.TSHotelManagement.Common/Enums}/NewsType.cs (88%) rename {EOM.TSHotelManagement.Domain/SystemManagement => EOM.TSHotelManagement.Common/Enums}/PoliticalAffiliation.cs (92%) rename {EOM.TSHotelManagement.Domain/Business/Reser => EOM.TSHotelManagement.Common/Enums}/ReserType.cs (91%) rename EOM.TSHotelManagement.Common/{GenerateJWT => Helper}/JWTHelper.cs (98%) rename {EOM.TSHotelManagement.Common => EOM.TSHotelManagement.Infrastructure}/Config/CsrfTokenConfig.cs (93%) rename {EOM.TSHotelManagement.Common => EOM.TSHotelManagement.Infrastructure}/Config/JwtConfig.cs (72%) rename {EOM.TSHotelManagement.Common => EOM.TSHotelManagement.Infrastructure}/Config/LskyConfig.cs (84%) rename {EOM.TSHotelManagement.Common => EOM.TSHotelManagement.Infrastructure}/Config/MailConfig.cs (93%) rename {EOM.TSHotelManagement.Common => EOM.TSHotelManagement.Infrastructure}/Config/Template.cs (71%) rename EOM.TSHotelManagement.Common/Constant/Constant.cs => EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs (86%) create mode 100644 EOM.TSHotelManagement.Infrastructure/EOM.TSHotelManagement.Infrastructure.csproj rename {EOM.TSHotelManagement.Common/Interfaces => EOM.TSHotelManagement.Infrastructure/Factory}/IJwtConfigFactory.cs (66%) rename {EOM.TSHotelManagement.Common/Interfaces => EOM.TSHotelManagement.Infrastructure/Factory}/ILskyConfigFactory.cs (67%) rename {EOM.TSHotelManagement.Common/Interfaces => EOM.TSHotelManagement.Infrastructure/Factory}/IMailConfigFactory.cs (67%) rename {EOM.TSHotelManagement.API => EOM.TSHotelManagement.Infrastructure}/Factory/JwtConfigFactory.cs (81%) rename {EOM.TSHotelManagement.API => EOM.TSHotelManagement.Infrastructure}/Factory/LskyConfigFactory.cs (41%) rename {EOM.TSHotelManagement.API => EOM.TSHotelManagement.Infrastructure}/Factory/MailConfigFactory.cs (71%) delete mode 100644 add_validation_attributes.ps1 diff --git a/DTO_VALIDATION_QUICK_REFERENCE.md b/DTO_VALIDATION_QUICK_REFERENCE.md deleted file mode 100644 index 5574f8e..0000000 --- a/DTO_VALIDATION_QUICK_REFERENCE.md +++ /dev/null @@ -1,100 +0,0 @@ -# Contract 层 DTO 验证特性快速参考 - -## 已修改的 DTO 文件列表 - -### News(新闻模块) -| Dto 类名 | 文件路径 | 修改状态 | -|---------|--------|--------| -| AddNewsInputDto | Business/News/Dto/AddNewsInputDto.cs | ✅ | -| UpdateNewsInputDto | Business/News/Dto/UpdateNewsInputDto.cs | ✅ | -| DeleteNewsInputDto | Business/News/Dto/DeleteNewsInputDto.cs | ✅ | -| ReadNewsInputDto | Business/News/Dto/ReadNewsInputDto.cs | ✅ | - -### EnergyManagement(水电管理模块) -| Dto 类名 | 文件路径 | 修改状态 | -|---------|--------|--------| -| CreateEnergyManagementInputDto | Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs | ✅ | -| UpdateEnergyManagementInputDto | Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs | ✅ | -| DeleteEnergyManagementInputDto | Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs | ✅ | -| ReadEnergyManagementInputDto | Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs | ✅ | - -### PromotionContent(宣传内容模块) -| Dto 类名 | 文件路径 | 修改状态 | -|---------|--------|--------| -| CreatePromotionContentInputDto | Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs | ✅ | -| UpdatePromotionContentInputDto | Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs | ✅ | -| DeletePromotionContentInputDto | Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs | ✅ | -| ReadPromotionContentInputDto | Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs | ✅ | - -### Reser(预约模块) -| Dto 类名 | 文件路径 | 修改状态 | -|---------|--------|--------| -| CreateReserInputDto | Business/Reser/Dto/CreateReserInputDto.cs | ✅ | -| UpdateReserInputDto | Business/Reser/Dto/UpdateReserInputDto.cs | ✅ | -| DeleteReserInputDto | Business/Reser/Dto/DeleteReserInputDto.cs | ✅ | -| ReadReserInputDto | Business/Reser/Dto/ReadReserInputDto.cs | ✅ | - -### SellThing(商品模块) -| Dto 类名 | 文件路径 | 修改状态 | -|---------|--------|--------| -| CreateSellThingInputDto | Business/Sellthing/Dto/CreateSellThingInputDto.cs | ✅ | -| UpdateSellThingInputDto | Business/Sellthing/Dto/UpdateSellThingInputDto.cs | ✅ | -| DeleteSellThingInputDto | Business/Sellthing/Dto/DeleteSellThingInputDto.cs | ✅ | -| ReadSellThingInputDto | Business/Sellthing/Dto/ReadSellThingInputDto.cs | ✅ | - -### Room(房间管理模块) -| Dto 类名 | 文件路径 | 修改状态 | -|---------|--------|--------| -| CheckoutRoomDto | Business/Room/Dto/CheckoutRoomDto.cs | ✅ | -| CheckinRoomByReservationDto | Business/Room/Dto/CheckinRoomByReservationDto.cs | ✅ | -| TransferRoomDto | Business/Room/Dto/TransferRoomDto.cs | ✅ | - -### NavBar(导航栏模块) -| Dto 类名 | 文件路径 | 修改状态 | -|---------|--------|--------| -| CreateNavBarInputDto | Application/NavBar/Dto/CreateNavBarInputDto.cs | ✅ (已有) | -| UpdateNavBarInputDto | Application/NavBar/Dto/UpdateNavBarInputDto.cs | ✅ | -| DeleteNavBarInputDto | Application/NavBar/Dto/DeleteNavBarInputDto.cs | ✅ | -| ReadNavBarInputDto | Application/NavBar/Dto/ReadNavBarInputDto.cs | ✅ (已有) | - -## 修改统计 - -- **总计修改文件数**:30 个 -- **新增 using 语句**:`using System.ComponentModel.DataAnnotations;` -- **使用的验证特性**: - - `[Required]` - 对应 Core 层 IsNullable=false 的字段 - - `[MaxLength]` - 对应 Core 层 Length 约束 - -## 验证特性说明 - -### Required 特性 -- 表示该字段为必填 -- 仅应用于 Create/Update/Delete InputDto -- 对应 Core 层数据库列定义中的 `IsNullable = false` -- 错误消息示例:`"新闻编号为必填字段"` - -### MaxLength 特性 -- 限制字符串字段的最大长度 -- 应用于所有包含字符串字段的 Dto -- 对应 Core 层数据库列定义中的 `Length` 参数 -- 错误消息示例:`"新闻编号长度不超过128字符"` - -## 编码规范 - -### 错误消息格式 -```csharp -[Required(ErrorMessage = "[字段中文名]为必填字段")] -[MaxLength(n, ErrorMessage = "[字段中文名]长度不超过n字符")] -``` - -### 示例 -```csharp -[Required(ErrorMessage = "新闻标题为必填字段"), MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] -public string NewsTitle { get; set; } -``` - -## 编译验证 -✅ 无编译错误 -✅ 所有验证特性已正确应用 -✅ 与 Core 层实体定义完全对应 - diff --git a/DTO_VALIDATION_UPDATES.md b/DTO_VALIDATION_UPDATES.md deleted file mode 100644 index 4cb3e0c..0000000 --- a/DTO_VALIDATION_UPDATES.md +++ /dev/null @@ -1,137 +0,0 @@ -# DTO 验证特性更新总结 - -本文档总结了根据Core层实体对Contract层Dto字段添加的验证特性(Required和MaxLength)。 - -## 更新原则 - -- **Create/Update InputDto**:对应Core层IsNullable=false的字段添加Required特性,根据Length长度添加MaxLength特性 -- **Delete InputDto**:为主键字段添加Required特性,其他字段添加MaxLength特性 -- **Read InputDto/ListInputDto**:仅添加MaxLength特性用于显示提示,不添加Required -- **Output Dto**:不添加验证特性(仅用于数据展示) - -## 更新的模块 - -### 1. News(新闻动态) -- ✅ AddNewsInputDto - 添加Required和MaxLength -- ✅ UpdateNewsInputDto - 添加Required和MaxLength -- ✅ DeleteNewsInputDto - 添加Required和MaxLength -- ✅ ReadNewsInputDto - 添加MaxLength - -**字段验证规则:** -- NewId:Required, MaxLength(128) -- NewsTitle:Required, MaxLength(256) -- NewsContent:Required -- NewsType:Required, MaxLength(64) -- NewsLink:Required, MaxLength(200) -- NewsDate:Required -- NewsStatus:Required, MaxLength(64) -- NewsImage:MaxLength(200) - -### 2. EnergyManagement(水电信息) -- ✅ CreateEnergyManagementInputDto - 添加Required和MaxLength -- ✅ UpdateEnergyManagementInputDto - 添加Required和MaxLength -- ✅ DeleteEnergyManagementInputDto - 添加Required -- ✅ ReadEnergyManagementInputDto - 添加MaxLength - -**字段验证规则:** -- InformationNumber/InformationId:Required, MaxLength(128) -- RoomNumber:Required, MaxLength(128) -- CustomerNumber:Required, MaxLength(128) -- StartDate:Required -- EndDate:Required -- PowerUsage:Required -- WaterUsage:Required -- Recorder:Required, MaxLength(150) - -### 3. PromotionContent(宣传内容) -- ✅ CreatePromotionContentInputDto - 添加Required和MaxLength -- ✅ UpdatePromotionContentInputDto - 添加Required和MaxLength -- ✅ DeletePromotionContentInputDto - 添加Required和MaxLength -- ✅ ReadPromotionContentInputDto - 添加MaxLength - -**字段验证规则:** -- PromotionContentNumber:Required, MaxLength(128) -- PromotionContentMessage:Required, MaxLength(2000) - -### 4. Reser(预约信息) -- ✅ CreateReserInputDto - 添加Required和MaxLength -- ✅ UpdateReserInputDto - 添加Required和MaxLength -- ✅ DeleteReserInputDto - 添加Required和MaxLength -- ✅ ReadReserInputDto - 添加MaxLength - -**字段验证规则:** -- ReservationId:Required, MaxLength(128) -- CustomerName:Required, MaxLength(200) -- ReservationPhoneNumber:Required, MaxLength(256) -- ReservationRoomNumber:Required, MaxLength(128) -- ReservationChannel:Required, MaxLength(50) -- ReservationStartDate:Required -- ReservationEndDate:Required - -### 5. SellThing(商品信息) -- ✅ CreateSellThingInputDto - 添加Required和MaxLength -- ✅ UpdateSellThingInputDto - 添加Required和MaxLength -- ✅ DeleteSellThingInputDto - 添加Required和MaxLength -- ✅ ReadSellThingInputDto - 添加MaxLength - -**字段验证规则:** -- ProductNumber:Required, MaxLength(128) -- ProductName:Required, MaxLength(500) -- ProductPrice:Required -- Specification:MaxLength(1000) -- Stock:Required - -### 6. NavBar(导航栏配置) -- ✅ CreateNavBarInputDto - 已有验证特性(保持原样) -- ✅ UpdateNavBarInputDto - 补充添加Required和MaxLength -- ✅ DeleteNavBarInputDto - 添加Required -- ✅ ReadNavBarInputDto - 已有验证特性(保持原样) - -**字段验证规则:** -- NavigationBarName:Required, MaxLength(50) -- NavigationBarOrder:Required -- NavigationBarImage:MaxLength(255) -- NavigationBarEvent:Required, MaxLength(200) -- MarginLeft:Required -- NavigationBarId:Required - -### 7. Room(房间操作) -- ✅ CheckoutRoomDto - 添加Required和MaxLength -- ✅ CheckinRoomByReservationDto - 添加Required和MaxLength -- ✅ TransferRoomDto - 添加Required和MaxLength - -**字段验证规则:** -- RoomNumber:Required, MaxLength(128) -- CustomerNumber:Required, MaxLength(128) -- WaterUsage/ElectricityUsage:Required -- CustomerName:Required, MaxLength(200) -- CustomerPhoneNumber:Required, MaxLength(256) -- IdCardNumber:Required, MaxLength(128) -- CustomerAddress:MaxLength(500) -- PassportId/CustomerType:Required -- DateOfBirth:Required -- OriginalRoomNumber/TargetRoomNumber:Required, MaxLength(128) -- ReservationId:Required, MaxLength(128) - -## 导入的命名空间 - -所有修改的Dto文件都添加了以下命名空间: -```csharp -using System.ComponentModel.DataAnnotations; -``` - -## 验证实现 - -这些验证特性会在以下场景被使用: - -1. **模型验证**:ASP.NET Core会自动在绑定请求数据时验证这些特性 -2. **API响应**:当验证失败时,会返回相应的错误信息 -3. **数据库约束**:与Core层的IsNullable和Length约束相对应 - -## 参考样例 - -所有修改遵循`NavBar`模块的验证模式: -- CreateNavBarInputDto中的`[Required]`和`[MaxLength]`特性 -- 一致的中文错误消息格式 -- 遵循Core层的数据库列约束 - diff --git a/Dockerfile b/Dockerfile index ae6d835..6e95f94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. # 阶段1:版本生成阶段(使用本地版本文件) -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS version-generator +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS version-generator WORKDIR /src COPY version.txt . # 阶段2:基础镜像 -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base USER app WORKDIR /app EXPOSE 8080 # 阶段3:构建阶段 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG BUILD_CONFIGURATION=Release # 从版本生成阶段复制版本文件 - 使用数字索引而非名称 @@ -22,28 +22,28 @@ COPY --from=version-generator /src/version.txt . RUN cat version.txt && echo "Building with version: $(cat version.txt)" WORKDIR /src -COPY ["EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj", "EOM.TSHotelManagement.WebApi/"] -COPY ["EOM.TSHotelManagement.Shared/EOM.TSHotelManagement.Shared.csproj", "EOM.TSHotelManagement.Shared/"] -COPY ["EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj", "EOM.TSHotelManagement.Application/"] -COPY ["EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj", "EOM.TSHotelManagement.Common.Contract/"] +COPY ["EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj", "EOM.TSHotelManagement.API/"] +COPY ["EOM.TSHotelManagement.Service/EOM.TSHotelManagement.Service.csproj", "EOM.TSHotelManagement.Service/"] +COPY ["EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj", "EOM.TSHotelManagement.Contract/"] COPY ["EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj", "EOM.TSHotelManagement.Migration/"] -COPY ["EOM.TSHotelManagement.Common.Core/EOM.TSHotelManagement.Common.Core.csproj", "EOM.TSHotelManagement.Common.Core/"] -COPY ["EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj", "EOM.TSHotelManagement.Common.Util/"] -COPY ["EOM.TSHotelManagement.EntityFramework/EOM.TSHotelManagement.EntityFramework.csproj", "EOM.TSHotelManagement.EntityFramework/"] -RUN dotnet restore "EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj" +COPY ["EOM.TSHotelManagement.Domain/EOM.TSHotelManagement.Domain.csproj", "EOM.TSHotelManagement.Domain/"] +COPY ["EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj", "EOM.TSHotelManagement.Common/"] +COPY ["EOM.TSHotelManagement.Infrastructure/EOM.TSHotelManagement.Infrastructure.csproj", "EOM.TSHotelManagement.Infrastructure/"] +COPY ["EOM.TSHotelManagement.Data/EOM.TSHotelManagement.Data.csproj", "EOM.TSHotelManagement.Data/"] +RUN dotnet restore "EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj" COPY . . -WORKDIR "/src/EOM.TSHotelManagement.WebApi" +WORKDIR "/src/EOM.TSHotelManagement.API" # 使用版本号构建 RUN VERSION=$(cat /src/version.txt | tr -d '\r' | tr -cd '[:digit:].') && \ echo "Using cleaned version: $VERSION" && \ - dotnet build "EOM.TSHotelManagement.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/build /p:Version=$VERSION + dotnet build "EOM.TSHotelManagement.API.csproj" -c $BUILD_CONFIGURATION -o /app/build /p:Version=$VERSION # 阶段4:发布阶段 FROM build AS publish ARG BUILD_CONFIGURATION=Release RUN VERSION=$(cat /src/version.txt | tr -d '\r' | tr -cd '[:digit:].') && \ - dotnet publish "EOM.TSHotelManagement.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:Version=$VERSION /p:UseAppHost=false + dotnet publish "EOM.TSHotelManagement.API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:Version=$VERSION /p:UseAppHost=false # 阶段5:最终镜像 FROM base AS final @@ -58,4 +58,4 @@ ENV ASPNETCORE_DATAPROTECTION_DIRECTORY="/app/keys" COPY --from=version-generator /src/version.txt . COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "EOM.TSHotelManagement.WebApi.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "EOM.TSHotelManagement.API.dll"] \ No newline at end of file diff --git a/EOM.TSHotelManagement.API/Controllers/LoginController.cs b/EOM.TSHotelManagement.API/Controllers/LoginController.cs index e0ea67c..b3f16f8 100644 --- a/EOM.TSHotelManagement.API/Controllers/LoginController.cs +++ b/EOM.TSHotelManagement.API/Controllers/LoginController.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using System; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Infrastructure; namespace EOM.TSHotelManagement.WebApi { diff --git a/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj index 336413e..abf8fcd 100644 --- a/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj +++ b/EOM.TSHotelManagement.API/EOM.TSHotelManagement.API.csproj @@ -37,8 +37,4 @@ - - - - diff --git a/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs index 5289c75..46faa75 100644 --- a/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs +++ b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Infrastructure; using EOM.TSHotelManagement.WebApi.Authorization; using EOM.TSHotelManagement.WebApi.Filters; using jvncorelib.CodeLib; @@ -30,7 +31,7 @@ namespace EOM.TSHotelManagement.WebApi { public static void ConfigureDataProtection(this IServiceCollection services, IConfiguration configuration) { - if (Environment.GetEnvironmentVariable(SystemConstants.Env) == SystemConstants.Docker) + if (Environment.GetEnvironmentVariable(SystemConstant.Env.Code) == SystemConstant.Docker.Code) { services.AddDataProtection() .PersistKeysToFileSystem(new DirectoryInfo("/app/keys")) diff --git a/EOM.TSHotelManagement.Common/Constant/ConsumptionConstant.cs b/EOM.TSHotelManagement.Common/Constant/ConsumptionConstant.cs index c0caa37..0efbcae 100644 --- a/EOM.TSHotelManagement.Common/Constant/ConsumptionConstant.cs +++ b/EOM.TSHotelManagement.Common/Constant/ConsumptionConstant.cs @@ -22,12 +22,14 @@ * *模块说明:结算状态常量 */ +using EOM.TSHotelManagement.Infrastructure; + namespace EOM.TSHotelManagement.Common { /// /// 结算状态常量 /// - public class ConsumptionConstant : Constant + public class ConsumptionConstant : ConstantBase { public static readonly ConsumptionConstant Settled = new ConsumptionConstant("Settled", "已结算"); public static readonly ConsumptionConstant UnSettle = new ConsumptionConstant("UnSettle", "未结算"); diff --git a/EOM.TSHotelManagement.Common/Constant/SpendType.cs b/EOM.TSHotelManagement.Common/Constant/SpendType.cs deleted file mode 100644 index 250d5bb..0000000 --- a/EOM.TSHotelManagement.Common/Constant/SpendType.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common -{ - public class SpendType : Constant - { - public static readonly SpendType Product = new SpendType("Product", "商品"); - public static readonly SpendType Room = new SpendType("Room", "房间"); - public static readonly SpendType Other = new SpendType("Other", "其他"); - - protected SpendType(string code, string description) : base(code, description) - { - } - } -} diff --git a/EOM.TSHotelManagement.Common/Constant/SpendTypeConstant.cs b/EOM.TSHotelManagement.Common/Constant/SpendTypeConstant.cs new file mode 100644 index 0000000..c6c22d1 --- /dev/null +++ b/EOM.TSHotelManagement.Common/Constant/SpendTypeConstant.cs @@ -0,0 +1,15 @@ +using EOM.TSHotelManagement.Infrastructure; + +namespace EOM.TSHotelManagement.Common +{ + public class SpendTypeConstant : ConstantBase + { + public static readonly SpendTypeConstant Product = new SpendTypeConstant("Product", "商品"); + public static readonly SpendTypeConstant Room = new SpendTypeConstant("Room", "房间"); + public static readonly SpendTypeConstant Other = new SpendTypeConstant("Other", "其他"); + + protected SpendTypeConstant(string code, string description) : base(code, description) + { + } + } +} diff --git a/EOM.TSHotelManagement.Common/Constant/SystemConstant.cs b/EOM.TSHotelManagement.Common/Constant/SystemConstant.cs new file mode 100644 index 0000000..373f98e --- /dev/null +++ b/EOM.TSHotelManagement.Common/Constant/SystemConstant.cs @@ -0,0 +1,20 @@ +using EOM.TSHotelManagement.Infrastructure; + +namespace EOM.TSHotelManagement.Common +{ + public class SystemConstant : ConstantBase + { + public static readonly SystemConstant MariaDB = new SystemConstant("MariaDB", "Maria DB"); + public static readonly SystemConstant PgSql = new SystemConstant("PgSql", "Postgres SQL"); + public static readonly SystemConstant MySql = new SystemConstant("MySql","My SQL"); + public static readonly SystemConstant SqlServer = new SystemConstant("SqlServer", "SQL Server"); + public static readonly SystemConstant Oracle = new SystemConstant("Oracle", "Oracle"); + public static readonly SystemConstant Sqlite = new SystemConstant("Sqlite", "SQLite") ; + public static readonly SystemConstant DefaultDatabase = new SystemConstant("DefaultDatabase", "Default Database"); + public static readonly SystemConstant DockerEnv = new SystemConstant("DOCKER_ENV", "Docker Environment"); + public static readonly SystemConstant Env = new SystemConstant("ASPNETCORE_ENVIRONMENT", "Asp.NET Core Environment"); + public static readonly SystemConstant Docker = new SystemConstant("docker", "Docker"); + + protected SystemConstant(string code, string description) : base(code, description) { } + } +} diff --git a/EOM.TSHotelManagement.Common/Constant/SystemConstants.cs b/EOM.TSHotelManagement.Common/Constant/SystemConstants.cs deleted file mode 100644 index d30d231..0000000 --- a/EOM.TSHotelManagement.Common/Constant/SystemConstants.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace EOM.TSHotelManagement.Common -{ - public class SystemConstants - { - public const string MariaDB = "MariaDB"; - public const string PgSql = "PgSql"; - public const string MySql = "MySql"; - public const string SqlServer = "SqlServer"; - public const string Oracle = "Oracle"; - public const string Sqlite = "Sqlite"; - public const string DefaultDatabase = "DefaultDatabase"; - public const string DockerEnv = "DOCKER_ENV"; - public const string Env = "ASPNETCORE_ENVIRONMENT"; - public const string Docker = "docker"; - } -} diff --git a/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj b/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj index 27e5bca..87afb9a 100644 --- a/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj +++ b/EOM.TSHotelManagement.Common/EOM.TSHotelManagement.Common.csproj @@ -3,7 +3,7 @@ net10.0 x64 - True + False @@ -16,8 +16,8 @@ - - - + + + diff --git a/EOM.TSHotelManagement.Domain/Business/Customer/GenderType.cs b/EOM.TSHotelManagement.Common/Enums/GenderType.cs similarity index 97% rename from EOM.TSHotelManagement.Domain/Business/Customer/GenderType.cs rename to EOM.TSHotelManagement.Common/Enums/GenderType.cs index da09f46..952814c 100644 --- a/EOM.TSHotelManagement.Domain/Business/Customer/GenderType.cs +++ b/EOM.TSHotelManagement.Common/Enums/GenderType.cs @@ -24,7 +24,7 @@ */ using System.ComponentModel; -namespace EOM.TSHotelManagement.Domain +namespace EOM.TSHotelManagement.Common { /// /// 性别 diff --git a/EOM.TSHotelManagement.Domain/Business/News/NewsStatus.cs b/EOM.TSHotelManagement.Common/Enums/NewsStatus.cs similarity index 94% rename from EOM.TSHotelManagement.Domain/Business/News/NewsStatus.cs rename to EOM.TSHotelManagement.Common/Enums/NewsStatus.cs index b9bb330..768db93 100644 --- a/EOM.TSHotelManagement.Domain/Business/News/NewsStatus.cs +++ b/EOM.TSHotelManagement.Common/Enums/NewsStatus.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace EOM.TSHotelManagement.Domain +namespace EOM.TSHotelManagement.Common { public enum NewsStatus { diff --git a/EOM.TSHotelManagement.Domain/Business/News/NewsType.cs b/EOM.TSHotelManagement.Common/Enums/NewsType.cs similarity index 88% rename from EOM.TSHotelManagement.Domain/Business/News/NewsType.cs rename to EOM.TSHotelManagement.Common/Enums/NewsType.cs index db551c8..c77662d 100644 --- a/EOM.TSHotelManagement.Domain/Business/News/NewsType.cs +++ b/EOM.TSHotelManagement.Common/Enums/NewsType.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace EOM.TSHotelManagement.Domain.Business +namespace EOM.TSHotelManagement.Common { /// /// 新闻类型 diff --git a/EOM.TSHotelManagement.Domain/SystemManagement/PoliticalAffiliation.cs b/EOM.TSHotelManagement.Common/Enums/PoliticalAffiliation.cs similarity index 92% rename from EOM.TSHotelManagement.Domain/SystemManagement/PoliticalAffiliation.cs rename to EOM.TSHotelManagement.Common/Enums/PoliticalAffiliation.cs index 253c4ca..818053a 100644 --- a/EOM.TSHotelManagement.Domain/SystemManagement/PoliticalAffiliation.cs +++ b/EOM.TSHotelManagement.Common/Enums/PoliticalAffiliation.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace EOM.TSHotelManagement.Domain +namespace EOM.TSHotelManagement.Common { public enum PoliticalAffiliation { diff --git a/EOM.TSHotelManagement.Domain/Business/Reser/ReserType.cs b/EOM.TSHotelManagement.Common/Enums/ReserType.cs similarity index 91% rename from EOM.TSHotelManagement.Domain/Business/Reser/ReserType.cs rename to EOM.TSHotelManagement.Common/Enums/ReserType.cs index dc6685e..4a14fe3 100644 --- a/EOM.TSHotelManagement.Domain/Business/Reser/ReserType.cs +++ b/EOM.TSHotelManagement.Common/Enums/ReserType.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EOM.TSHotelManagement.Domain +namespace EOM.TSHotelManagement.Common { public enum ReserType { diff --git a/EOM.TSHotelManagement.Common/GenerateJWT/JWTHelper.cs b/EOM.TSHotelManagement.Common/Helper/JWTHelper.cs similarity index 98% rename from EOM.TSHotelManagement.Common/GenerateJWT/JWTHelper.cs rename to EOM.TSHotelManagement.Common/Helper/JWTHelper.cs index 7639ba8..6c95ca2 100644 --- a/EOM.TSHotelManagement.Common/GenerateJWT/JWTHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/JWTHelper.cs @@ -1,4 +1,5 @@ -using Microsoft.IdentityModel.Tokens; +using EOM.TSHotelManagement.Infrastructure; +using Microsoft.IdentityModel.Tokens; using System; using System.Collections.Generic; using System.IdentityModel.Tokens.Jwt; diff --git a/EOM.TSHotelManagement.Common/Helper/LskyHelper.cs b/EOM.TSHotelManagement.Common/Helper/LskyHelper.cs index 2205bf4..4d5c74d 100644 --- a/EOM.TSHotelManagement.Common/Helper/LskyHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/LskyHelper.cs @@ -1,4 +1,5 @@ -using System; +using EOM.TSHotelManagement.Infrastructure; +using System; using System.IO; using System.Net.Http; using System.Net.Http.Headers; diff --git a/EOM.TSHotelManagement.Common/Helper/MailHelper.cs b/EOM.TSHotelManagement.Common/Helper/MailHelper.cs index 407c4d0..d9d6dfb 100644 --- a/EOM.TSHotelManagement.Common/Helper/MailHelper.cs +++ b/EOM.TSHotelManagement.Common/Helper/MailHelper.cs @@ -1,4 +1,5 @@ -using MailKit.Net.Smtp; +using EOM.TSHotelManagement.Infrastructure; +using MailKit.Net.Smtp; using MailKit.Security; using MimeKit; using System; diff --git a/EOM.TSHotelManagement.Common/Templates/EmailTemplate.cs b/EOM.TSHotelManagement.Common/Templates/EmailTemplate.cs index 5c0db39..1877319 100644 --- a/EOM.TSHotelManagement.Common/Templates/EmailTemplate.cs +++ b/EOM.TSHotelManagement.Common/Templates/EmailTemplate.cs @@ -1,4 +1,5 @@ -using System; +using EOM.TSHotelManagement.Infrastructure; +using System; namespace EOM.TSHotelManagement.Common { diff --git a/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj b/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj index 5c5d247..0ed6104 100644 --- a/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj +++ b/EOM.TSHotelManagement.Contract/EOM.TSHotelManagement.Contract.csproj @@ -7,6 +7,7 @@ True x64 True + EOM.TSHOTEL.CONTRACT @@ -17,8 +18,4 @@ - - - - diff --git a/EOM.TSHotelManagement.Data/Connector/SqlSugarClientConnector.cs b/EOM.TSHotelManagement.Data/Connector/SqlSugarClientConnector.cs index 2ef13d3..df7789d 100644 --- a/EOM.TSHotelManagement.Data/Connector/SqlSugarClientConnector.cs +++ b/EOM.TSHotelManagement.Data/Connector/SqlSugarClientConnector.cs @@ -16,17 +16,18 @@ namespace EOM.TSHotelManagement.Data public ISqlSugarClient CreateClient(string dbName = null) { // 读取默认数据库名称 - dbName ??= _configuration[SystemConstants.DefaultDatabase]; + dbName ??= _configuration[SystemConstant.DefaultDatabase.Code]; string connectionString; - if (Environment.GetEnvironmentVariable(SystemConstants.DockerEnv) != null) + if (Environment.GetEnvironmentVariable(SystemConstant.DockerEnv.Code) != null) { - connectionString = Environment.GetEnvironmentVariable(SystemConstants.DefaultDatabase) switch + var dbCode = Environment.GetEnvironmentVariable(SystemConstant.DefaultDatabase.Code); + connectionString = dbCode switch { - SystemConstants.PgSql => Environment.GetEnvironmentVariable($"{SystemConstants.PgSql}ConnectStr"), //Test passed - SystemConstants.MySql => Environment.GetEnvironmentVariable($"{SystemConstants.MySql}ConnectStr"), //Test passed - SystemConstants.SqlServer => Environment.GetEnvironmentVariable($"{SystemConstants.SqlServer}ConnectStr"), //Test passed - SystemConstants.Oracle => Environment.GetEnvironmentVariable($"{SystemConstants.Oracle}ConnectStr"), //Please manually test - SystemConstants.MariaDB => Environment.GetEnvironmentVariable($"{SystemConstants.MariaDB}ConnectStr"), //Test passed + var code when code == SystemConstant.PgSql.Code => Environment.GetEnvironmentVariable($"{SystemConstant.PgSql}ConnectStr"), //Test passed + var code when code == SystemConstant.MySql.Code => Environment.GetEnvironmentVariable($"{SystemConstant.MySql}ConnectStr"), //Test passed + var code when code == SystemConstant.SqlServer.Code => Environment.GetEnvironmentVariable($"{SystemConstant.SqlServer}ConnectStr"), //Test passed + var code when code == SystemConstant.Oracle.Code => Environment.GetEnvironmentVariable($"{SystemConstant.Oracle}ConnectStr"), //Please manually test + var code when code == SystemConstant.MariaDB.Code => Environment.GetEnvironmentVariable($"{SystemConstant.MariaDB}ConnectStr"), //Test passed _ => throw new ArgumentException("Unsupported database", nameof(dbName)), }; } @@ -72,11 +73,11 @@ namespace EOM.TSHotelManagement.Data { return dbName switch { - SystemConstants.PgSql => DbType.PostgreSQL, - SystemConstants.MySql => DbType.MySql, - SystemConstants.Oracle => DbType.Oracle, - SystemConstants.SqlServer => DbType.SqlServer, - SystemConstants.MariaDB => DbType.MySqlConnector, + var name when name == SystemConstant.PgSql.Code => DbType.PostgreSQL, + var name when name == SystemConstant.MySql.Code => DbType.MySql, + var name when name == SystemConstant.Oracle.Code => DbType.Oracle, + var name when name == SystemConstant.SqlServer.Code => DbType.SqlServer, + var name when name == SystemConstant.MariaDB.Code => DbType.MySqlConnector, _ => throw new ArgumentException("Unsupported database", nameof(dbName)) }; } diff --git a/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs b/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs index 743b902..964d499 100644 --- a/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs +++ b/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs @@ -27,7 +27,7 @@ namespace EOM.TSHotelManagement.Data try { - var dbName = config[SystemConstants.DefaultDatabase] ?? SystemConstants.MariaDB; + var dbName = config[SystemConstant.DefaultDatabase.Code] ?? SystemConstant.MariaDB.Code; var dbSettings = GetDatabaseSettings(config, dbName); using (var masterDb = CreateMasterConnection(config, dbName, dbSettings.DbType)) @@ -92,7 +92,7 @@ namespace EOM.TSHotelManagement.Data private (string Database, DbType DbType) GetDatabaseSettings(IConfiguration config, string dbName) { - var dbType = GetDbType(dbName); + var dbType = SqlSugarClientConnector.GetDbType(dbName); var connectionString = GetConnectionString(config, dbName); switch (dbType) @@ -174,7 +174,7 @@ namespace EOM.TSHotelManagement.Data private string GetConnectionString(IConfiguration config, string dbName) { - if (Environment.GetEnvironmentVariable(SystemConstants.DockerEnv) != null) + if (Environment.GetEnvironmentVariable(SystemConstant.DockerEnv.Code) != null) { return Environment.GetEnvironmentVariable($"{dbName}ConnectStr") ?? throw new ArgumentException($"Environment variable {dbName}ConnectStr not found"); @@ -467,19 +467,6 @@ namespace EOM.TSHotelManagement.Data Console.WriteLine($"administrator password:admin"); } } - - public static DbType GetDbType(string dbName) - { - return dbName switch - { - SystemConstants.PgSql => DbType.PostgreSQL, - SystemConstants.MySql => DbType.MySql, - SystemConstants.Oracle => DbType.Oracle, - SystemConstants.SqlServer => DbType.SqlServer, - SystemConstants.MariaDB => DbType.MySqlConnector, - _ => throw new ArgumentException("Unsupported database", nameof(dbName)) - }; - } #endregion } } diff --git a/EOM.TSHotelManagement.Common/Config/CsrfTokenConfig.cs b/EOM.TSHotelManagement.Infrastructure/Config/CsrfTokenConfig.cs similarity index 93% rename from EOM.TSHotelManagement.Common/Config/CsrfTokenConfig.cs rename to EOM.TSHotelManagement.Infrastructure/Config/CsrfTokenConfig.cs index b29edd8..78ce323 100644 --- a/EOM.TSHotelManagement.Common/Config/CsrfTokenConfig.cs +++ b/EOM.TSHotelManagement.Infrastructure/Config/CsrfTokenConfig.cs @@ -1,6 +1,6 @@ using System; -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public class CsrfTokenConfig { diff --git a/EOM.TSHotelManagement.Common/Config/JwtConfig.cs b/EOM.TSHotelManagement.Infrastructure/Config/JwtConfig.cs similarity index 72% rename from EOM.TSHotelManagement.Common/Config/JwtConfig.cs rename to EOM.TSHotelManagement.Infrastructure/Config/JwtConfig.cs index 9e8d3a2..9f402a8 100644 --- a/EOM.TSHotelManagement.Common/Config/JwtConfig.cs +++ b/EOM.TSHotelManagement.Infrastructure/Config/JwtConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public class JwtConfig { diff --git a/EOM.TSHotelManagement.Common/Config/LskyConfig.cs b/EOM.TSHotelManagement.Infrastructure/Config/LskyConfig.cs similarity index 84% rename from EOM.TSHotelManagement.Common/Config/LskyConfig.cs rename to EOM.TSHotelManagement.Infrastructure/Config/LskyConfig.cs index d29b136..c87e376 100644 --- a/EOM.TSHotelManagement.Common/Config/LskyConfig.cs +++ b/EOM.TSHotelManagement.Infrastructure/Config/LskyConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public class LskyConfig { diff --git a/EOM.TSHotelManagement.Common/Config/MailConfig.cs b/EOM.TSHotelManagement.Infrastructure/Config/MailConfig.cs similarity index 93% rename from EOM.TSHotelManagement.Common/Config/MailConfig.cs rename to EOM.TSHotelManagement.Infrastructure/Config/MailConfig.cs index e71bf23..1782484 100644 --- a/EOM.TSHotelManagement.Common/Config/MailConfig.cs +++ b/EOM.TSHotelManagement.Infrastructure/Config/MailConfig.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public class MailConfig { diff --git a/EOM.TSHotelManagement.Common/Config/Template.cs b/EOM.TSHotelManagement.Infrastructure/Config/Template.cs similarity index 71% rename from EOM.TSHotelManagement.Common/Config/Template.cs rename to EOM.TSHotelManagement.Infrastructure/Config/Template.cs index b55816b..512e026 100644 --- a/EOM.TSHotelManagement.Common/Config/Template.cs +++ b/EOM.TSHotelManagement.Infrastructure/Config/Template.cs @@ -1,4 +1,4 @@ -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public class Template { diff --git a/EOM.TSHotelManagement.Common/Constant/Constant.cs b/EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs similarity index 86% rename from EOM.TSHotelManagement.Common/Constant/Constant.cs rename to EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs index 9c7d412..b206fa7 100644 --- a/EOM.TSHotelManagement.Common/Constant/Constant.cs +++ b/EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs @@ -1,16 +1,16 @@ using System.Collections.Generic; using System.Linq; -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { - public class Constant where T : Constant + public class ConstantBase where T : ConstantBase { public string Code { get; } public string Description { get; } private static List _constants = new List(); - protected Constant(string code, string description) + protected ConstantBase(string code, string description) { Code = code; Description = description; diff --git a/EOM.TSHotelManagement.Infrastructure/EOM.TSHotelManagement.Infrastructure.csproj b/EOM.TSHotelManagement.Infrastructure/EOM.TSHotelManagement.Infrastructure.csproj new file mode 100644 index 0000000..4ff62fc --- /dev/null +++ b/EOM.TSHotelManagement.Infrastructure/EOM.TSHotelManagement.Infrastructure.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/EOM.TSHotelManagement.Common/Interfaces/IJwtConfigFactory.cs b/EOM.TSHotelManagement.Infrastructure/Factory/IJwtConfigFactory.cs similarity index 66% rename from EOM.TSHotelManagement.Common/Interfaces/IJwtConfigFactory.cs rename to EOM.TSHotelManagement.Infrastructure/Factory/IJwtConfigFactory.cs index 8cfcdbd..3f8a5e4 100644 --- a/EOM.TSHotelManagement.Common/Interfaces/IJwtConfigFactory.cs +++ b/EOM.TSHotelManagement.Infrastructure/Factory/IJwtConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public interface IJwtConfigFactory { diff --git a/EOM.TSHotelManagement.Common/Interfaces/ILskyConfigFactory.cs b/EOM.TSHotelManagement.Infrastructure/Factory/ILskyConfigFactory.cs similarity index 67% rename from EOM.TSHotelManagement.Common/Interfaces/ILskyConfigFactory.cs rename to EOM.TSHotelManagement.Infrastructure/Factory/ILskyConfigFactory.cs index 4a0455c..ad3b7ee 100644 --- a/EOM.TSHotelManagement.Common/Interfaces/ILskyConfigFactory.cs +++ b/EOM.TSHotelManagement.Infrastructure/Factory/ILskyConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public interface ILskyConfigFactory { diff --git a/EOM.TSHotelManagement.Common/Interfaces/IMailConfigFactory.cs b/EOM.TSHotelManagement.Infrastructure/Factory/IMailConfigFactory.cs similarity index 67% rename from EOM.TSHotelManagement.Common/Interfaces/IMailConfigFactory.cs rename to EOM.TSHotelManagement.Infrastructure/Factory/IMailConfigFactory.cs index 94eaab5..0a441ff 100644 --- a/EOM.TSHotelManagement.Common/Interfaces/IMailConfigFactory.cs +++ b/EOM.TSHotelManagement.Infrastructure/Factory/IMailConfigFactory.cs @@ -1,5 +1,5 @@  -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Infrastructure { public interface IMailConfigFactory { diff --git a/EOM.TSHotelManagement.API/Factory/JwtConfigFactory.cs b/EOM.TSHotelManagement.Infrastructure/Factory/JwtConfigFactory.cs similarity index 81% rename from EOM.TSHotelManagement.API/Factory/JwtConfigFactory.cs rename to EOM.TSHotelManagement.Infrastructure/Factory/JwtConfigFactory.cs index cbfcf90..451ed40 100644 --- a/EOM.TSHotelManagement.API/Factory/JwtConfigFactory.cs +++ b/EOM.TSHotelManagement.Infrastructure/Factory/JwtConfigFactory.cs @@ -1,7 +1,6 @@ -using EOM.TSHotelManagement.Common; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; -namespace EOM.TSHotelManagement.WebApi +namespace EOM.TSHotelManagement.Infrastructure { public class JwtConfigFactory : IJwtConfigFactory { diff --git a/EOM.TSHotelManagement.API/Factory/LskyConfigFactory.cs b/EOM.TSHotelManagement.Infrastructure/Factory/LskyConfigFactory.cs similarity index 41% rename from EOM.TSHotelManagement.API/Factory/LskyConfigFactory.cs rename to EOM.TSHotelManagement.Infrastructure/Factory/LskyConfigFactory.cs index 2b1ee13..08fb4c6 100644 --- a/EOM.TSHotelManagement.API/Factory/LskyConfigFactory.cs +++ b/EOM.TSHotelManagement.Infrastructure/Factory/LskyConfigFactory.cs @@ -1,7 +1,6 @@ -using EOM.TSHotelManagement.Common; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; -namespace EOM.TSHotelManagement.WebApi +namespace EOM.TSHotelManagement.Infrastructure { public class LskyConfigFactory : ILskyConfigFactory { @@ -14,15 +13,16 @@ namespace EOM.TSHotelManagement.WebApi public LskyConfig GetLskyConfig() { + var lskySection = _configuration.GetSection("Lsky"); var lskyConfig = new LskyConfig { - BaseAddress = _configuration.GetSection("Lsky").GetValue("BaseAddress"), - Email = _configuration.GetSection("Lsky").GetValue("Email"), - Password = _configuration.GetSection("Lsky").GetValue("Password"), - UploadApi = _configuration.GetSection("Lsky").GetValue("UploadApi"), - GetTokenApi = _configuration.GetSection("Lsky").GetValue("GetTokenApi") + BaseAddress = lskySection.GetValue("BaseAddress") ?? string.Empty, + Email = lskySection.GetValue("Email") ?? string.Empty, + Password = lskySection.GetValue("Password") ?? string.Empty, + UploadApi = lskySection.GetValue("UploadApi") ?? string.Empty, + GetTokenApi = lskySection.GetValue("GetTokenApi") ?? string.Empty }; return lskyConfig; } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs b/EOM.TSHotelManagement.Infrastructure/Factory/MailConfigFactory.cs similarity index 71% rename from EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs rename to EOM.TSHotelManagement.Infrastructure/Factory/MailConfigFactory.cs index 2467f1e..56a0c94 100644 --- a/EOM.TSHotelManagement.API/Factory/MailConfigFactory.cs +++ b/EOM.TSHotelManagement.Infrastructure/Factory/MailConfigFactory.cs @@ -1,7 +1,6 @@ -using EOM.TSHotelManagement.Common; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; -namespace EOM.TSHotelManagement.WebApi +namespace EOM.TSHotelManagement.Infrastructure { public class MailConfigFactory : IMailConfigFactory { @@ -16,12 +15,12 @@ namespace EOM.TSHotelManagement.WebApi { var mailConfig = new MailConfig { - Host = _configuration.GetSection("Mail").GetValue("Host"), - Port = _configuration.GetSection("Mail").GetValue("Port"), - UserName = _configuration.GetSection("Mail").GetValue("UserName"), - Password = _configuration.GetSection("Mail").GetValue("Password"), - EnableSsl = _configuration.GetSection("Mail").GetValue("EnableSsl"), - DisplayName = _configuration.GetSection("Mail").GetValue("DisplayName") + Host = _configuration.GetSection("Mail").GetValue("Host") ?? string.Empty, + Port = _configuration.GetSection("Mail").GetValue("Port") ?? 587, + UserName = _configuration.GetSection("Mail").GetValue("UserName") ?? string.Empty, + Password = _configuration.GetSection("Mail").GetValue("Password") ?? string.Empty, + EnableSsl = _configuration.GetSection("Mail").GetValue("EnableSsl") ?? false, + DisplayName = _configuration.GetSection("Mail").GetValue("DisplayName") ?? string.Empty }; return mailConfig; } diff --git a/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj b/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj index 7b87eca..09c0a01 100644 --- a/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj +++ b/EOM.TSHotelManagement.Migration/EOM.TSHotelManagement.Migration.csproj @@ -8,6 +8,7 @@ + diff --git a/EOM.TSHotelManagement.Migration/EntityBuilder.cs b/EOM.TSHotelManagement.Migration/EntityBuilder.cs index fe110a2..9835442 100644 --- a/EOM.TSHotelManagement.Migration/EntityBuilder.cs +++ b/EOM.TSHotelManagement.Migration/EntityBuilder.cs @@ -1,4 +1,5 @@ -using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Migration { diff --git a/EOM.TSHotelManagement.Service/Business/News/NewsService.cs b/EOM.TSHotelManagement.Service/Business/News/NewsService.cs index 4c7147a..332b7f8 100644 --- a/EOM.TSHotelManagement.Service/Business/News/NewsService.cs +++ b/EOM.TSHotelManagement.Service/Business/News/NewsService.cs @@ -1,9 +1,7 @@ using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Domain.Business; using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; using jvncorelib.EntityLib; namespace EOM.TSHotelManagement.Service diff --git a/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs index 9ae1480..3d4f92f 100644 --- a/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs @@ -715,7 +715,7 @@ namespace EOM.TSHotelManagement.Service SettlementStatus = ConsumptionConstant.UnSettle.Code, ConsumptionQuantity = stayDays, ConsumptionAmount = originalRoomBill, - ConsumptionType = SpendType.Room.Code, + ConsumptionType = SpendTypeConstant.Room.Code, IsDelete = 0 }; spendRepository.Insert(originalSpend); diff --git a/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs index 0de3ab9..ca7f3fd 100644 --- a/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs @@ -119,8 +119,8 @@ namespace EOM.TSHotelManagement.Service r.ConsumptionAmountFormatted = (r.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(r.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); - r.ConsumptionTypeDescription = r.ConsumptionType == SpendType.Product.Code ? SpendType.Product.Description : - r.ConsumptionType == SpendType.Room.Code ? SpendType.Room.Description : SpendType.Other.Description; + r.ConsumptionTypeDescription = r.ConsumptionType == SpendTypeConstant.Product.Code ? SpendTypeConstant.Product.Description : + r.ConsumptionType == SpendTypeConstant.Room.Code ? SpendTypeConstant.Room.Description : SpendTypeConstant.Other.Description; }); return new ListOutputDto @@ -168,8 +168,8 @@ namespace EOM.TSHotelManagement.Service r.ConsumptionAmountFormatted = (r.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(r.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); - r.ConsumptionTypeDescription = r.ConsumptionType == SpendType.Product.Code ? SpendType.Product.Description : - r.ConsumptionType == SpendType.Room.Code ? SpendType.Room.Description : SpendType.Other.Description; + r.ConsumptionTypeDescription = r.ConsumptionType == SpendTypeConstant.Product.Code ? SpendTypeConstant.Product.Description : + r.ConsumptionType == SpendTypeConstant.Room.Code ? SpendTypeConstant.Room.Description : SpendTypeConstant.Other.Description; }); return new ListOutputDto @@ -215,8 +215,8 @@ namespace EOM.TSHotelManagement.Service r.ConsumptionAmountFormatted = (r.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(r.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); - r.ConsumptionTypeDescription = r.ConsumptionType == SpendType.Product.Code ? SpendType.Product.Description : - r.ConsumptionType == SpendType.Room.Code ? SpendType.Room.Description : SpendType.Other.Description; + r.ConsumptionTypeDescription = r.ConsumptionType == SpendTypeConstant.Product.Code ? SpendTypeConstant.Product.Description : + r.ConsumptionType == SpendTypeConstant.Room.Code ? SpendTypeConstant.Room.Description : SpendTypeConstant.Other.Description; }); return new ListOutputDto @@ -302,7 +302,7 @@ namespace EOM.TSHotelManagement.Service if (existingSpend != null) { - existingSpend.ConsumptionType = SpendType.Product.Code; + existingSpend.ConsumptionType = SpendTypeConstant.Product.Code; existingSpend.ConsumptionQuantity += addCustomerSpendInputDto.Quantity; existingSpend.ConsumptionAmount += realAmount; existingSpend.DataChgDate = DateTime.Now; @@ -327,7 +327,7 @@ namespace EOM.TSHotelManagement.Service ProductPrice = addCustomerSpendInputDto.Price, ConsumptionAmount = realAmount, ConsumptionTime = DateTime.Now, - ConsumptionType = SpendType.Product.Code, + ConsumptionType = SpendTypeConstant.Product.Code, SettlementStatus = ConsumptionConstant.UnSettle.Code, DataInsUsr = addCustomerSpendInputDto.WorkerNo, DataInsDate = DateTime.Now diff --git a/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs b/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs index c97d2ab..798ebed 100644 --- a/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs +++ b/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs @@ -353,13 +353,13 @@ namespace EOM.TSHotelManagement.Service dto.TotalProducts = (int)sellThings.Sum(a => a.Stock); dto.RecentRecords = spendRepository.AsQueryable() - .Where(a => a.IsDelete != 1 && a.ConsumptionType == SpendType.Product.Code) + .Where(a => a.IsDelete != 1 && a.ConsumptionType == SpendTypeConstant.Product.Code) .OrderByDescending(a => a.ConsumptionTime) .Take(3) .Select(a => new TempInventoryRecord { RecordId = a.SpendNumber, - OperationType = a.ConsumptionType == SpendType.Product.Code || a.ConsumptionType == SpendType.Other.Code ? TempInventoryOperationType.Outbound + OperationType = a.ConsumptionType == SpendTypeConstant.Product.Code || a.ConsumptionType == SpendTypeConstant.Other.Code ? TempInventoryOperationType.Outbound : TempInventoryOperationType.Inbound, ProductName = a.ProductName, Quantity = a.ConsumptionQuantity diff --git a/EOM.TSHotelManagement.Web.sln b/EOM.TSHotelManagement.Web.sln index fdb6bc1..cebdc1a 100644 --- a/EOM.TSHotelManagement.Web.sln +++ b/EOM.TSHotelManagement.Web.sln @@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManagement.Migra EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOM.TSHotelManagement.Contract", "EOM.TSHotelManagement.Contract\EOM.TSHotelManagement.Contract.csproj", "{B83A545B-9FFA-784F-3486-87BB3B50F46D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOM.TSHotelManagement.Infrastructure", "EOM.TSHotelManagement.Infrastructure\EOM.TSHotelManagement.Infrastructure.csproj", "{C390E995-B01C-4C4A-9335-3AD14CCFFA2C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -51,6 +53,10 @@ Global {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Debug|x64.Build.0 = Debug|x64 {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Release|x64.ActiveCfg = Release|x64 {B83A545B-9FFA-784F-3486-87BB3B50F46D}.Release|x64.Build.0 = Release|x64 + {C390E995-B01C-4C4A-9335-3AD14CCFFA2C}.Debug|x64.ActiveCfg = Debug|Any CPU + {C390E995-B01C-4C4A-9335-3AD14CCFFA2C}.Debug|x64.Build.0 = Debug|Any CPU + {C390E995-B01C-4C4A-9335-3AD14CCFFA2C}.Release|x64.ActiveCfg = Release|Any CPU + {C390E995-B01C-4C4A-9335-3AD14CCFFA2C}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/add_validation_attributes.ps1 b/add_validation_attributes.ps1 deleted file mode 100644 index 80ae2f0..0000000 --- a/add_validation_attributes.ps1 +++ /dev/null @@ -1,141 +0,0 @@ -# PowerShell script to add validation attributes to remaining SystemManagement DTOs -# This script adds using System.ComponentModel.DataAnnotations; if not present -# and adds [Required] and [MaxLength] attributes based on property names and types - -param( - [string]$dtoPath = "d:\Repos\topsky-hotel-management-system-web-api\EOM.TSHotelManagement.Common.Contract\SystemManagement\Dto" -) - -# Mapping of DTO module names to their Core entity constraints -$constraints = @{ - "Nation" = @{ - "NationNumber" = @{ "MaxLength" = 128; "Required" = $true } - "NationName" = @{ "MaxLength" = 50; "Required" = $true } - } - "Position" = @{ - "PositionNumber" = @{ "MaxLength" = 128; "Required" = $true } - "PositionName" = @{ "MaxLength" = 200; "Required" = $true } - } - "Education" = @{ - "EducationNumber" = @{ "MaxLength" = 128; "Required" = $true } - "EducationName" = @{ "MaxLength" = 200; "Required" = $true } - } - "AppointmentNotice" = @{ - "NoticeNumber" = @{ "MaxLength" = 128; "Required" = $true } - "NoticeTheme" = @{ "MaxLength" = 256; "Required" = $true } - "NoticeType" = @{ "MaxLength" = 150; "Required" = $true } - "IssuingDepartment" = @{ "MaxLength" = 128; "Required" = $true } - } - "AppointmentNoticeType" = @{ - "NoticeTypeNumber" = @{ "MaxLength" = 128; "Required" = $true } - "NoticeTypeName" = @{ "MaxLength" = 200; "Required" = $true } - } - "Menu" = @{ - "Key" = @{ "MaxLength" = 256; "Required" = $false } - "Title" = @{ "MaxLength" = 256; "Required" = $true } - "Icon" = @{ "MaxLength" = 256; "Required" = $false } - } - "Permission" = @{ - "PermissionNumber" = @{ "MaxLength" = 128; "Required" = $true } - "PermissionName" = @{ "MaxLength" = 200; "Required" = $true } - "Module" = @{ "MaxLength" = 128; "Required" = $true } - "Description" = @{ "MaxLength" = 500; "Required" = $false } - "MenuKey" = @{ "MaxLength" = 256; "Required" = $false } - "ParentNumber" = @{ "MaxLength" = 128; "Required" = $false } - } - "VipLevelRule" = @{ - "RuleSerialNumber" = @{ "MaxLength" = 128; "Required" = $true } - "RuleName" = @{ "MaxLength" = 200; "Required" = $true } - } - "SystemInformation" = @{ - "SystemKey" = @{ "MaxLength" = 128; "Required" = $true } - "SystemValue" = @{ "MaxLength" = 500; "Required" = $true } - "SystemName" = @{ "MaxLength" = 256; "Required" = $true } - } - "SupervisionStatistics" = @{ - "StatisticsNumber" = @{ "MaxLength" = 128; "Required" = $true } - "StatisticsName" = @{ "MaxLength" = 200; "Required" = $true } - } -} - -function Add-ValidationAttributes { - param( - [string]$filePath, - [hashtable]$props - ) - - try { - $content = Get-Content $filePath -Raw - - # Check if already has using statement - if ($content -notmatch "using System.ComponentModel.DataAnnotations") { - # Add using statement after namespace declaration - $content = $content -replace "(namespace.*\n)", "`$1using System.ComponentModel.DataAnnotations;`n" - } - - # For Input DTOs (Create/Update/Delete), add Required + MaxLength - # For Read/Output DTOs, add MaxLength only - # Skip if already has attributes - - if ($filePath -match "Delete.*Dto\.cs" -or $filePath -match "Read.*Dto\.cs" -or $filePath -match "Output.*Dto\.cs") { - # Read/Filter/Output DTOs - MaxLength only - foreach ($prop in $props.Keys) { - $maxLen = $props[$prop]["MaxLength"] - if ($maxLen -gt 0) { - $chineseName = $prop # Simplified - would need proper mapping - $pattern = "public\s+(\w+)\s+$prop\s*{" - $replacement = "`n [MaxLength($maxLen, ErrorMessage = `"$chineseName长度不超过$maxLen字符`")]`n public `$1 $prop {" - $content = $content -replace $pattern, $replacement - } - } - } - else { - # Create/Update/Delete DTOs - Required + MaxLength - foreach ($prop in $props.Keys) { - $maxLen = $props[$prop]["MaxLength"] - $required = $props[$prop]["Required"] - if ($maxLen -gt 0 -and $required) { - $chineseName = $prop - $pattern = "public\s+(\w+)\s+$prop\s*{" - $replacement = "`n [Required(ErrorMessage = `"$chineseName为必填字段`")]`n [MaxLength($maxLen, ErrorMessage = `"$chineseName长度不超过$maxLen字符`")]`n public `$1 $prop {" - $content = $content -replace $pattern, $replacement - } - elseif ($maxLen -gt 0) { - $chineseName = $prop - $pattern = "public\s+(\w+)\s+$prop\s*{" - $replacement = "`n [MaxLength($maxLen, ErrorMessage = `"$chineseName长度不超过$maxLen字符`")]`n public `$1 $prop {" - $content = $content -replace $pattern, $replacement - } - } - } - - Set-Content $filePath $content - Write-Host "Updated: $filePath" - } - catch { - Write-Host "Error updating $($filePath): $_" - } -} - -# Get all DTO files still needing updates -$dtoFiles = Get-ChildItem $dtoPath -Recurse -Filter "*.cs" -Exclude "ModuleConsts.cs", "MenuViewModel.cs", "EnumDto.cs" - -Write-Host "Processing $($dtoFiles.Count) DTO files..." - -foreach ($file in $dtoFiles) { - $content = Get-Content $file.FullName -Raw - - # Skip if already has validation attributes - if ($content -match "\[Required\]|\[MaxLength\]") { - continue - } - - # Determine module from path - $module = Split-Path (Split-Path $file.FullName) -Leaf - - if ($constraints.ContainsKey($module)) { - Add-ValidationAttributes -filePath $file.FullName -props $constraints[$module] - } -} - -Write-Host "Script completed!" -- Gitee From d8e1a21cca02f4af01d620e0a0252c167c1b80dd Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 20 Dec 2025 20:37:10 +0800 Subject: [PATCH 21/21] code housekeep. --- ...tomAuthorizationMiddlewareResultHandler.cs | 4 +- .../Authorization/PermissionsAuthorization.cs | 13 +++--- .../Application/NavBar/NavBarController.cs | 4 +- .../Business/Asset/AssetController.cs | 6 +-- .../Customer/CustomerAccountController.cs | 4 +- .../Business/Customer/CustomerController.cs | 6 +-- .../EnergyManagementController.cs | 2 +- .../Business/News/NewsController.cs | 4 +- .../PromotionContentController.cs | 6 +-- .../Business/Reser/ReserController.cs | 6 +-- .../Business/Room/RoomController.cs | 6 +-- .../Business/Room/RoomTypeController.cs | 6 +-- .../Business/Sellthing/SellthingController.cs | 6 +-- .../Business/Spend/SpendController.cs | 6 +-- .../Dashboard/DashboardController.cs | 6 +-- .../Employee/Check/EmployeeCheckController.cs | 6 +-- .../Employee/EmployeeController.cs | 6 +-- .../History/EmployeeHistoryController.cs | 6 +-- .../Employee/Photo/EmployeePhotoController.cs | 6 +-- .../RewardPunishmentController.cs | 4 +- .../Controllers/LoginController.cs | 7 +-- .../Administrator/AdminController.cs | 5 +-- .../SystemManagement/Base/BaseController.cs | 4 +- .../CustomerPermissionController.cs | 2 +- .../EmployeePermission/EmployeeController.cs | 3 +- .../SystemManagement/Menu/MenuController.cs | 8 ++-- .../Notice/NoticeController.cs | 4 +- .../Permission/PermissionController.cs | 3 +- .../SystemManagement/Role/RoleController.cs | 4 +- .../SupervisionStatisticsController.cs | 6 +-- .../VipRule/VipRuleController.cs | 6 +-- .../Controllers/Util/UtilityController.cs | 4 +- .../Extensions/AutofacConfigExtensions.cs | 3 -- .../Extensions/PermissionSyncExtensions.cs | 11 +++-- .../Extensions/ServiceExtensions.cs | 3 -- .../Filters/CSRFTokenOperationProcessor.cs | 1 - .../Filters/RequestLoggingMiddleware.cs | 4 +- .../Filters/ValidationFilter.cs | 6 +-- .../Constant/SystemConstant.cs | 4 +- .../Enums/LogLevel.cs | 8 +--- .../Enums/ReserType.cs | 7 +-- .../Helper/SqlFilterBuilder.cs | 4 +- .../NavBar/Dto/CreateNavBarInputDto.cs | 3 +- .../NavBar/Dto/ReadNavBarOutputDto.cs | 10 ++--- .../NavBar/Dto/UpdateNavBarInputDto.cs | 10 ++--- .../BaseDto/CsrfTokenDto.cs | 8 +--- .../Asset/Dto/Asset/CreateAssetInputDto.cs | 12 ++--- .../Asset/Dto/Asset/ReadAssetInputDto.cs | 4 +- .../Asset/Dto/Asset/ReadAssetOutputDto.cs | 14 +++--- .../Asset/Dto/Asset/UpdateAssetInputDto.cs | 12 ++--- .../Dto/Customer/CreateCustomerInputDto.cs | 16 +++---- .../Dto/Customer/ReadCustomerInputDto.cs | 4 +- .../Dto/Customer/ReadCustomerOutputDto.cs | 25 +++++------ .../Dto/Customer/UpdateCustomerInputDto.cs | 16 +++---- .../Dto/CreateEnergyManagementInputDto.cs | 14 +++--- .../Dto/ReadEnergyManagementInputDto.cs | 8 ++-- .../Dto/UpdateEnergyManagementInputDto.cs | 14 +++--- .../Business/News/Dto/AddNewsInputDto.cs | 14 +++--- .../Business/News/Dto/ReadNewsInputDto.cs | 8 ++-- .../Business/News/Dto/ReadNewsOuputDto.cs | 12 +++-- .../Business/News/Dto/UpdateNewsInputDto.cs | 14 +++--- .../Dto/CreatePromotionContentInputDto.cs | 2 +- .../Dto/ReadPromotionContentInputDto.cs | 4 +- .../Dto/ReadPromotionContentOutputDto.cs | 4 +- .../Dto/UpdatePromotionContentInputDto.cs | 2 +- .../Business/Reser/Dto/CreateReserInputDto.cs | 12 ++--- .../Business/Reser/Dto/ReadReserInputDto.cs | 8 ++-- .../Business/Reser/Dto/ReadReserOutputDto.cs | 17 ++++--- .../Business/Reser/Dto/UpdateReserInputDto.cs | 12 ++--- .../Room/Dto/CheckinRoomByReservationDto.cs | 20 ++++----- .../Business/Room/Dto/CheckoutRoomDto.cs | 6 +-- .../Sellthing/Dto/CreateSellThingInputDto.cs | 8 ++-- .../Sellthing/Dto/DeleteSellThingInputDto.cs | 8 ++-- .../Sellthing/Dto/ReadSellThingInputDto.cs | 8 ++-- .../Sellthing/Dto/ReadSellThingOutputDto.cs | 11 +++-- .../Sellthing/Dto/UpdateSellThingInputDto.cs | 8 ++-- .../Dto/Spend/AddCustomerSpendInputDto.cs | 12 ++--- .../Spend/Dto/Spend/CreateSpendInputDto.cs | 20 ++++----- .../Spend/Dto/Spend/DeleteSpendInputDto.cs | 2 +- .../Spend/Dto/Spend/ReadSpendInputDto.cs | 20 ++++----- .../Spend/Dto/Spend/ReadSpendOutputDto.cs | 29 ++++++------ .../Spend/Dto/Spend/UpdateSpendInputDto.cs | 20 ++++----- .../Dto/Employee/ReadEmployeeInputDto.cs | 4 +- .../Dto/Employee/ReadEmployeeOutputDto.cs | 4 +- .../ReadEmployeeCheckInputDto.cs | 4 +- .../ReadEmployeeCheckOutputDto.cs | 4 +- .../ReadEmployeeHistoryInputDto.cs | 4 +- .../ReadEmployeeHistoryOutputDto.cs | 4 +- .../ReadEmployeePhotoInputDto.cs | 4 +- .../ReadEmployeePhotoOutputDto.cs | 4 +- .../ReadEmployeeRewardPunishmentInputDto.cs | 4 +- .../ReadEmployeeRewardPunishmentOutputDto.cs | 4 +- .../ReadRewardPunishmentTypeInputDto.cs | 4 +- .../ReadRewardPunishmentTypeOutputDto.cs | 4 +- .../ReadAdministratorInputDto.cs | 4 +- .../ReadAdministratorOutputDto.cs | 4 +- .../ReadAdministratorTypeInputDto.cs | 4 +- .../ReadAdministratorTypeOutputDto.cs | 4 +- .../ReadAppointmentNoticeInputDto.cs | 4 +- .../ReadAppointmentNoticeOutputDto.cs | 4 +- .../ReadAppointmentNoticeTypeInputDto.cs | 4 +- .../ReadAppointmentNoticeTypeOutputDto.cs | 4 +- .../Dto/Department/ReadDepartmentInputDto.cs | 4 +- .../Dto/Department/ReadDepartmentOutputDto.cs | 4 +- .../Dto/Menu/ReadMenuInputDto.cs | 4 +- .../Dto/Menu/ReadMenuOutputDto.cs | 4 +- .../Dto/Nation/ReadNationInputDto.cs | 4 +- .../Dto/Nation/ReadNationOutputDto.cs | 4 +- .../AssignUserPermissionsInputDto.cs | 1 - .../GrantRolePermissionsInputDto.cs | 2 - .../Dto/Permission/ReadPermissionDtos.cs | 1 - .../Permission/UserRolePermissionOutputDto.cs | 1 - .../Dto/Position/ReadPositionInputDto.cs | 4 +- .../Dto/Position/ReadPositionOutputDto.cs | 4 +- .../Qualification/ReadEducationInputDto.cs | 4 +- .../Qualification/ReadEducationOutputDto.cs | 4 +- .../Dto/Role/AssignRoleUsersInputDto.cs | 2 - .../Dto/Role/AssignUserRolesInputDto.cs | 1 - .../Dto/Role/ReadRoleInputDto.cs | 4 +- .../Dto/Role/ReadRoleOutputDto.cs | 4 +- .../ReadSupervisionStatisticsInputDto.cs | 4 +- .../ReadSupervisionStatisticsOutputDto.cs | 4 +- .../DeleteSystemInformationInputDto.cs | 2 - .../ReadSystemInformationInputDto.cs | 4 +- .../ReadSystemInformationOutputDto.cs | 4 +- .../VipLevelRule/ReadVipLevelRuleInputDto.cs | 4 +- .../VipLevelRule/ReadVipLevelRuleOutputDto.cs | 4 +- .../OperationLog/ReadOperationLogOutputDto.cs | 4 +- .../DatabaseInitializer.cs | 44 +++++++++---------- .../Repository/GenericRepository.cs | 4 +- .../Business/Asset/Asset.cs | 16 +++---- .../Business/Room/Room.cs | 12 ++--- .../Business/Room/RoomType.cs | 8 ++-- .../SystemManagement/Administrator.cs | 10 ++--- .../Config/CsrfTokenConfig.cs | 2 - .../Constant/ConstantBase.cs | 5 +-- .../Application/NavBar/NavBarService.cs | 6 +-- .../Business/Asset/AssetService.cs | 4 +- .../Account/CustomerAccountService.cs | 8 ++-- .../Business/Customer/CustomerService.cs | 5 +-- .../Permission/CustomerPermissionService.cs | 10 ++--- .../Permission/ICustomerPermissionService.cs | 6 --- .../EnergyManagementService.cs | 6 +-- .../Business/News/NewsService.cs | 6 +-- .../PromotionContentService.cs | 6 +-- .../Business/Reser/ReserService.cs | 5 +-- .../Business/Room/RoomService.cs | 7 ++- .../Business/Room/RoomTypeService.cs | 6 +-- .../Business/Sellthing/SellService.cs | 4 +- .../Business/Spend/SpendService.cs | 5 +-- .../Dashboard/DashboardService.cs | 10 ++--- .../Employee/Check/EmployeeCheckService.cs | 6 +-- .../Employee/EmployeeService.cs | 5 +-- .../History/EmployeeHistoryService.cs | 4 +- .../Permission/EmployeePermissionService.cs | 10 ++--- .../Permission/IEmployeePermissionService.cs | 5 --- .../Employee/Photo/EmployeePhotoService.cs | 6 +-- .../RewardPunishmentService.cs | 4 +- .../Administrator/AdminService.cs | 19 ++++---- .../Administrator/IAdminService.cs | 1 - .../SystemManagement/Base/BaseService.cs | 5 +-- .../SystemManagement/Menu/MenuService.cs | 4 +- .../SystemManagement/Notice/NoticeService.cs | 6 +-- .../Permission/IPermissionAppService.cs | 1 - .../Permission/PermissionAppService.cs | 5 +-- .../SystemManagement/Role/RoleAppService.cs | 6 +-- .../SupervisionStatisticsService.cs | 4 +- .../VipRule/VipRuleAppService.cs | 4 +- .../Util/UtilService.cs | 7 ++- 169 files changed, 467 insertions(+), 667 deletions(-) diff --git a/EOM.TSHotelManagement.API/Authorization/CustomAuthorizationMiddlewareResultHandler.cs b/EOM.TSHotelManagement.API/Authorization/CustomAuthorizationMiddlewareResultHandler.cs index 86d8949..729578d 100644 --- a/EOM.TSHotelManagement.API/Authorization/CustomAuthorizationMiddlewareResultHandler.cs +++ b/EOM.TSHotelManagement.API/Authorization/CustomAuthorizationMiddlewareResultHandler.cs @@ -1,12 +1,12 @@ namespace EOM.TSHotelManagement.WebApi.Authorization { + using EOM.TSHotelManagement.Common; + using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Policy; using Microsoft.AspNetCore.Http; using System.Text.Json; using System.Threading.Tasks; - using EOM.TSHotelManagement.Contract; - using EOM.TSHotelManagement.Common; public class CustomAuthorizationMiddlewareResultHandler : IAuthorizationMiddlewareResultHandler { diff --git a/EOM.TSHotelManagement.API/Authorization/PermissionsAuthorization.cs b/EOM.TSHotelManagement.API/Authorization/PermissionsAuthorization.cs index e0d0278..b76c30a 100644 --- a/EOM.TSHotelManagement.API/Authorization/PermissionsAuthorization.cs +++ b/EOM.TSHotelManagement.API/Authorization/PermissionsAuthorization.cs @@ -1,14 +1,13 @@ -using System; -using System.Linq; -using System.Threading.Tasks; -using System.Collections.Generic; -using System.Security.Claims; +using EOM.TSHotelManagement.Domain; using Microsoft.AspNetCore.Authorization; -using Microsoft.Extensions.Options; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using SqlSugar; -using EOM.TSHotelManagement.Domain; +using System; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; namespace EOM.TSHotelManagement.WebApi.Authorization { diff --git a/EOM.TSHotelManagement.API/Controllers/Application/NavBar/NavBarController.cs b/EOM.TSHotelManagement.API/Controllers/Application/NavBar/NavBarController.cs index 0a8ffbe..55060f8 100644 --- a/EOM.TSHotelManagement.API/Controllers/Application/NavBar/NavBarController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Application/NavBar/NavBarController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Asset/AssetController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Asset/AssetController.cs index d4ea486..dc322ea 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Asset/AssetController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Asset/AssetController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerAccountController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerAccountController.cs index 0f12531..50fd840 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerAccountController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerAccountController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerController.cs index eb2f1f4..68cf567 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Customer/CustomerController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/EnergyManagement/EnergyManagementController.cs b/EOM.TSHotelManagement.API/Controllers/Business/EnergyManagement/EnergyManagementController.cs index 0c3c825..4de9ff3 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/EnergyManagement/EnergyManagementController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/EnergyManagement/EnergyManagementController.cs @@ -1,6 +1,6 @@ using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/News/NewsController.cs b/EOM.TSHotelManagement.API/Controllers/Business/News/NewsController.cs index d3f3688..072e3e3 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/News/NewsController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/News/NewsController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/Business/PromotionContent/PromotionContentController.cs b/EOM.TSHotelManagement.API/Controllers/Business/PromotionContent/PromotionContentController.cs index 51b0270..56fb09b 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/PromotionContent/PromotionContentController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/PromotionContent/PromotionContentController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Reser/ReserController.cs index ab4e869..0f0f0f9 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Reser/ReserController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Reser/ReserController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomController.cs index 2fffb5f..63796c0 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomTypeController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomTypeController.cs index c32b76c..4574853 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomTypeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Room/RoomTypeController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Sellthing/SellthingController.cs index cb66e8d..27ed22b 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Sellthing/SellthingController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Sellthing/SellthingController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManagement.API/Controllers/Business/Spend/SpendController.cs index e72e27e..ed91fdd 100644 --- a/EOM.TSHotelManagement.API/Controllers/Business/Spend/SpendController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Business/Spend/SpendController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Dashboard/DashboardController.cs b/EOM.TSHotelManagement.API/Controllers/Dashboard/DashboardController.cs index f4d2873..13bb8cc 100644 --- a/EOM.TSHotelManagement.API/Controllers/Dashboard/DashboardController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Dashboard/DashboardController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Employee/Check/EmployeeCheckController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/Check/EmployeeCheckController.cs index 7cc0e5c..da0585b 100644 --- a/EOM.TSHotelManagement.API/Controllers/Employee/Check/EmployeeCheckController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/Check/EmployeeCheckController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Employee/EmployeeController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/EmployeeController.cs index d8fc56a..08b9d8b 100644 --- a/EOM.TSHotelManagement.API/Controllers/Employee/EmployeeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/EmployeeController.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Employee/History/EmployeeHistoryController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/History/EmployeeHistoryController.cs index f9faa32..68ddde5 100644 --- a/EOM.TSHotelManagement.API/Controllers/Employee/History/EmployeeHistoryController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/History/EmployeeHistoryController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Employee/Photo/EmployeePhotoController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/Photo/EmployeePhotoController.cs index 9e661ef..4583b99 100644 --- a/EOM.TSHotelManagement.API/Controllers/Employee/Photo/EmployeePhotoController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/Photo/EmployeePhotoController.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; +using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using EOM.TSHotelManagement.WebApi.Authorization; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs b/EOM.TSHotelManagement.API/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs index 7ba1137..cb0ceb8 100644 --- a/EOM.TSHotelManagement.API/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.API/Controllers/LoginController.cs b/EOM.TSHotelManagement.API/Controllers/LoginController.cs index b3f16f8..10c94a3 100644 --- a/EOM.TSHotelManagement.API/Controllers/LoginController.cs +++ b/EOM.TSHotelManagement.API/Controllers/LoginController.cs @@ -1,13 +1,10 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Infrastructure; using Microsoft.AspNetCore.Antiforgery; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using System; -using EOM.TSHotelManagement.Common; -using EOM.TSHotelManagement.Infrastructure; namespace EOM.TSHotelManagement.WebApi { diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Administrator/AdminController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Administrator/AdminController.cs index 762b288..6965c36 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Administrator/AdminController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Administrator/AdminController.cs @@ -1,7 +1,6 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Base/BaseController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Base/BaseController.cs index 5c64d06..5d299c7 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Base/BaseController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Base/BaseController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs index 768900a..8595ee3 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/CustomerPermission/CustomerPermissionController.cs @@ -1,6 +1,6 @@ -using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs index 763698c..24ee020 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/EmployeePermission/EmployeeController.cs @@ -1,7 +1,6 @@ -using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Menu/MenuController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Menu/MenuController.cs index 2f7bcde..b191d5a 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Menu/MenuController.cs @@ -1,9 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; -using System; -using System.Linq; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Notice/NoticeController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Notice/NoticeController.cs index ae83a1d..af6baaa 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Notice/NoticeController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Notice/NoticeController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Permission/PermissionController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Permission/PermissionController.cs index 1443124..cb31731 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Permission/PermissionController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Permission/PermissionController.cs @@ -1,6 +1,5 @@ -using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Role/RoleController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Role/RoleController.cs index 98510e4..312e9f1 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/Role/RoleController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/Role/RoleController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs index 2ac0691..21c4356 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/SystemManagement/VipRule/VipRuleController.cs b/EOM.TSHotelManagement.API/Controllers/SystemManagement/VipRule/VipRuleController.cs index 362ec9f..e1ace8b 100644 --- a/EOM.TSHotelManagement.API/Controllers/SystemManagement/VipRule/VipRuleController.cs +++ b/EOM.TSHotelManagement.API/Controllers/SystemManagement/VipRule/VipRuleController.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; -using Microsoft.AspNetCore.Mvc; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using EOM.TSHotelManagement.WebApi.Authorization; +using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.API/Controllers/Util/UtilityController.cs b/EOM.TSHotelManagement.API/Controllers/Util/UtilityController.cs index 0201d44..b7d37ca 100644 --- a/EOM.TSHotelManagement.API/Controllers/Util/UtilityController.cs +++ b/EOM.TSHotelManagement.API/Controllers/Util/UtilityController.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Service; -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Service; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers diff --git a/EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs b/EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs index cbd9f51..b746dbb 100644 --- a/EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs +++ b/EOM.TSHotelManagement.API/Extensions/AutofacConfigExtensions.cs @@ -1,9 +1,6 @@ using Autofac; using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; -using jvncorelib.CodeLib; -using jvncorelib.EncryptorLib; -using jvncorelib.EntityLib; using SqlSugar; using System; using System.IO; diff --git a/EOM.TSHotelManagement.API/Extensions/PermissionSyncExtensions.cs b/EOM.TSHotelManagement.API/Extensions/PermissionSyncExtensions.cs index d8727d2..53b4718 100644 --- a/EOM.TSHotelManagement.API/Extensions/PermissionSyncExtensions.cs +++ b/EOM.TSHotelManagement.API/Extensions/PermissionSyncExtensions.cs @@ -1,15 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; +using EOM.TSHotelManagement.Domain; +using EOM.TSHotelManagement.WebApi.Authorization; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using SqlSugar; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.WebApi.Authorization; +using System; +using System.Collections.Generic; +using System.Linq; namespace EOM.TSHotelManagement.WebApi { diff --git a/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs index 46faa75..78c3650 100644 --- a/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs +++ b/EOM.TSHotelManagement.API/Extensions/ServiceExtensions.cs @@ -1,14 +1,11 @@ using EOM.TSHotelManagement.Common; -using EOM.TSHotelManagement.Data; using EOM.TSHotelManagement.Infrastructure; using EOM.TSHotelManagement.WebApi.Authorization; using EOM.TSHotelManagement.WebApi.Filters; using jvncorelib.CodeLib; using jvncorelib.EncryptorLib; -using jvncorelib.EntityLib; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Authorization.Policy; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Http; diff --git a/EOM.TSHotelManagement.API/Filters/CSRFTokenOperationProcessor.cs b/EOM.TSHotelManagement.API/Filters/CSRFTokenOperationProcessor.cs index 7ebbac3..a795428 100644 --- a/EOM.TSHotelManagement.API/Filters/CSRFTokenOperationProcessor.cs +++ b/EOM.TSHotelManagement.API/Filters/CSRFTokenOperationProcessor.cs @@ -1,7 +1,6 @@ using NSwag; using NSwag.Generation.Processors; using NSwag.Generation.Processors.Contexts; -using System; namespace EOM.TSHotelManagement.WebApi.Filters { diff --git a/EOM.TSHotelManagement.API/Filters/RequestLoggingMiddleware.cs b/EOM.TSHotelManagement.API/Filters/RequestLoggingMiddleware.cs index a902a4a..ddad22c 100644 --- a/EOM.TSHotelManagement.API/Filters/RequestLoggingMiddleware.cs +++ b/EOM.TSHotelManagement.API/Filters/RequestLoggingMiddleware.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; diff --git a/EOM.TSHotelManagement.API/Filters/ValidationFilter.cs b/EOM.TSHotelManagement.API/Filters/ValidationFilter.cs index a79bb1a..989b0e6 100644 --- a/EOM.TSHotelManagement.API/Filters/ValidationFilter.cs +++ b/EOM.TSHotelManagement.API/Filters/ValidationFilter.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using System.Collections.Generic; @@ -25,7 +25,7 @@ namespace EOM.TSHotelManagement.WebApi.Filters var response = new BaseResponse { Code = BusinessStatusCode.BadRequest, - Message = LocalizationHelper.GetLocalizedString($"Data validate failure: {string.Join("\n", errors)}",$"数据验证失败: {string.Join("\n", errors)}"), + Message = LocalizationHelper.GetLocalizedString($"Data validate failure: {string.Join("\n", errors)}", $"数据验证失败: {string.Join("\n", errors)}"), }; context.Result = new BadRequestObjectResult(response); diff --git a/EOM.TSHotelManagement.Common/Constant/SystemConstant.cs b/EOM.TSHotelManagement.Common/Constant/SystemConstant.cs index 373f98e..1fe0374 100644 --- a/EOM.TSHotelManagement.Common/Constant/SystemConstant.cs +++ b/EOM.TSHotelManagement.Common/Constant/SystemConstant.cs @@ -6,10 +6,10 @@ namespace EOM.TSHotelManagement.Common { public static readonly SystemConstant MariaDB = new SystemConstant("MariaDB", "Maria DB"); public static readonly SystemConstant PgSql = new SystemConstant("PgSql", "Postgres SQL"); - public static readonly SystemConstant MySql = new SystemConstant("MySql","My SQL"); + public static readonly SystemConstant MySql = new SystemConstant("MySql", "My SQL"); public static readonly SystemConstant SqlServer = new SystemConstant("SqlServer", "SQL Server"); public static readonly SystemConstant Oracle = new SystemConstant("Oracle", "Oracle"); - public static readonly SystemConstant Sqlite = new SystemConstant("Sqlite", "SQLite") ; + public static readonly SystemConstant Sqlite = new SystemConstant("Sqlite", "SQLite"); public static readonly SystemConstant DefaultDatabase = new SystemConstant("DefaultDatabase", "Default Database"); public static readonly SystemConstant DockerEnv = new SystemConstant("DOCKER_ENV", "Docker Environment"); public static readonly SystemConstant Env = new SystemConstant("ASPNETCORE_ENVIRONMENT", "Asp.NET Core Environment"); diff --git a/EOM.TSHotelManagement.Common/Enums/LogLevel.cs b/EOM.TSHotelManagement.Common/Enums/LogLevel.cs index 755fecf..00712aa 100644 --- a/EOM.TSHotelManagement.Common/Enums/LogLevel.cs +++ b/EOM.TSHotelManagement.Common/Enums/LogLevel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace EOM.TSHotelManagement.Common +namespace EOM.TSHotelManagement.Common { /// /// 日志等级 (Log Level) diff --git a/EOM.TSHotelManagement.Common/Enums/ReserType.cs b/EOM.TSHotelManagement.Common/Enums/ReserType.cs index 4a14fe3..4134148 100644 --- a/EOM.TSHotelManagement.Common/Enums/ReserType.cs +++ b/EOM.TSHotelManagement.Common/Enums/ReserType.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.ComponentModel; namespace EOM.TSHotelManagement.Common { diff --git a/EOM.TSHotelManagement.Common/Helper/SqlFilterBuilder.cs b/EOM.TSHotelManagement.Common/Helper/SqlFilterBuilder.cs index 2b02892..7c0d1d9 100644 --- a/EOM.TSHotelManagement.Common/Helper/SqlFilterBuilder.cs +++ b/EOM.TSHotelManagement.Common/Helper/SqlFilterBuilder.cs @@ -1,9 +1,7 @@ +using SqlSugar; using System; -using System.Collections.Generic; -using System.Linq; using System.Linq.Expressions; using System.Reflection; -using SqlSugar; namespace EOM.TSHotelManagement.Common { diff --git a/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs index 8900e5b..a856515 100644 --- a/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/CreateNavBarInputDto.cs @@ -1,11 +1,10 @@ -using EOM.TSHotelManagement.Common; using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Contract { public class CreateNavBarInputDto : BaseInputDto { - [Required(ErrorMessage = "Ϊֶ"), MaxLength(50,ErrorMessage = "󳤶Ϊ50ַ")] + [Required(ErrorMessage = "Ϊֶ"), MaxLength(50, ErrorMessage = "󳤶Ϊ50ַ")] public string NavigationBarName { get; set; } public int NavigationBarOrder { get; set; } public string NavigationBarImage { get; set; } diff --git a/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs index 4abb9e0..b16f625 100644 --- a/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/ReadNavBarOutputDto.cs @@ -1,18 +1,16 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNavBarOutputDto : BaseOutputDto { public int Id { get; set; } - + public int NavigationBarId { get; set; } public string NavigationBarName { get; set; } - + public int NavigationBarOrder { get; set; } public string NavigationBarImage { get; set; } public string NavigationBarEvent { get; set; } - + public int MarginLeft { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs index 552e780..8196676 100644 --- a/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Application/NavBar/Dto/UpdateNavBarInputDto.cs @@ -6,19 +6,19 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "导航栏ID为必填字段")] public int NavigationBarId { get; set; } - + [Required(ErrorMessage = "导航栏名称为必填字段"), MaxLength(50, ErrorMessage = "导航栏名称长度不超过50字符")] public string NavigationBarName { get; set; } - + [Required(ErrorMessage = "导航栏排序为必填字段")] public int NavigationBarOrder { get; set; } - + [MaxLength(255, ErrorMessage = "导航栏图片长度不超过255字符")] public string NavigationBarImage { get; set; } - + [Required(ErrorMessage = "导航栏事件为必填字段"), MaxLength(200, ErrorMessage = "导航栏事件长度不超过200字符")] public string NavigationBarEvent { get; set; } - + [Required(ErrorMessage = "左边距为必填字段")] public int MarginLeft { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/BaseDto/CsrfTokenDto.cs b/EOM.TSHotelManagement.Contract/BaseDto/CsrfTokenDto.cs index 4e1a3e5..0947d74 100644 --- a/EOM.TSHotelManagement.Contract/BaseDto/CsrfTokenDto.cs +++ b/EOM.TSHotelManagement.Contract/BaseDto/CsrfTokenDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class CsrfTokenDto { diff --git a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs index 99071ba..de3cac3 100644 --- a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs @@ -6,22 +6,22 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "资产编号为必填字段"), MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } - + [Required(ErrorMessage = "资产名称为必填字段"), MaxLength(200, ErrorMessage = "资产名称长度不超过200字符")] public string AssetName { get; set; } - + [Required(ErrorMessage = "资产总值为必填字段")] public decimal AssetValue { get; set; } - + [Required(ErrorMessage = "部门代码为必填字段"), MaxLength(128, ErrorMessage = "部门代码长度不超过128字符")] public string DepartmentCode { get; set; } - + [Required(ErrorMessage = "获取日期为必填字段")] public DateTime AcquisitionDate { get; set; } - + [Required(ErrorMessage = "资产来源为必填字段"), MaxLength(500, ErrorMessage = "资产来源长度不超过500字符")] public string AssetSource { get; set; } - + [Required(ErrorMessage = "经办员工为必填字段"), MaxLength(128, ErrorMessage = "经办员工长度不超过128字符")] public string AcquiredByEmployeeId { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs index 34124cd..5bb4ae9 100644 --- a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAssetInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs index 71f4146..3050150 100644 --- a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs @@ -1,24 +1,22 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAssetOutputDto : BaseOutputDto { public int Id { get; set; } public string AssetNumber { get; set; } public string AssetName { get; set; } - + public decimal AssetValue { get; set; } - + public string AssetValueFormatted { get; set; } public string DepartmentCode { get; set; } - + public string DepartmentName { get; set; } - + public DateTime AcquisitionDate { get; set; } public string AssetSource { get; set; } public string AcquiredByEmployeeId { get; set; } - + public string AcquiredByEmployeeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs index 48e1faa..bf5ad83 100644 --- a/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs @@ -6,22 +6,22 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "资产编号为必填字段"), MaxLength(128, ErrorMessage = "资产编号长度不超过128字符")] public string AssetNumber { get; set; } - + [Required(ErrorMessage = "资产名称为必填字段"), MaxLength(200, ErrorMessage = "资产名称长度不超过200字符")] public string AssetName { get; set; } - + [Required(ErrorMessage = "资产总值为必填字段")] public decimal AssetValue { get; set; } - + [Required(ErrorMessage = "部门代码为必填字段"), MaxLength(128, ErrorMessage = "部门代码长度不超过128字符")] public string DepartmentCode { get; set; } - + [Required(ErrorMessage = "获取日期为必填字段")] public DateTime AcquisitionDate { get; set; } - + [Required(ErrorMessage = "资产来源为必填字段"), MaxLength(500, ErrorMessage = "资产来源长度不超过500字符")] public string AssetSource { get; set; } - + [Required(ErrorMessage = "经办员工为必填字段"), MaxLength(128, ErrorMessage = "经办员工长度不超过128字符")] public string AcquiredByEmployeeId { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs index 42525a8..5de097a 100644 --- a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs @@ -6,28 +6,28 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } - + [Required(ErrorMessage = "客户性别为必填字段")] public int? CustomerGender { get; set; } - + [Required(ErrorMessage = "证件类型为必填字段")] public int PassportId { get; set; } - + [Required(ErrorMessage = "客户电话为必填字段"), MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } - + [Required(ErrorMessage = "出生日期为必填字段")] public DateTime DateOfBirth { get; set; } - + [Required(ErrorMessage = "证件号码为必填字段"), MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } - + [MaxLength(256, ErrorMessage = "客户地址长度不超过256字符")] public string CustomerAddress { get; set; } - + [Required(ErrorMessage = "客户类型为必填字段")] public int CustomerType { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs index 5a5ee00..d3c87bd 100644 --- a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadCustomerInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index 5bab410..5d47611 100644 --- a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -1,6 +1,5 @@  using EOM.TSHotelManagement.Common; -using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Contract { @@ -8,40 +7,40 @@ namespace EOM.TSHotelManagement.Contract { [UIDisplay("ID", true, false)] public int Id { get; set; } - + [UIDisplay("客户编号")] public string CustomerNumber { get; set; } - + [UIDisplay("客户姓名")] public string CustomerName { get; set; } - + [UIDisplay("性别", true, false)] public int? CustomerGender { get; set; } - + [UIDisplay("证件类型", true, false)] public int PassportId { get; set; } - + [UIDisplay("性别", false, true)] public string GenderName { get; set; } - + [UIDisplay("联系方式")] public string CustomerPhoneNumber { get; set; } - + [UIDisplay("出生日期")] public DateTime DateOfBirth { get; set; } - + [UIDisplay("客户类型", true, false)] public int CustomerType { get; set; } - + [UIDisplay("客户类型", false, true)] public string CustomerTypeName { get; set; } - + [UIDisplay("证件类型", false, true)] public string PassportName { get; set; } - + [UIDisplay("证件号码")] public string IdCardNumber { get; set; } - + [UIDisplay("客户地址")] public string CustomerAddress { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs index e6fb337..e982f8f 100644 --- a/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs @@ -6,28 +6,28 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(250, ErrorMessage = "客户名称长度不超过250字符")] public string CustomerName { get; set; } - + [Required(ErrorMessage = "客户性别为必填字段")] public int? CustomerGender { get; set; } - + [Required(ErrorMessage = "证件类型为必填字段")] public int PassportId { get; set; } - + [Required(ErrorMessage = "客户电话为必填字段"), MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } - + [Required(ErrorMessage = "出生日期为必填字段")] public DateOnly DateOfBirth { get; set; } - + [Required(ErrorMessage = "证件号码为必填字段"), MaxLength(256, ErrorMessage = "证件号码长度不超过256字符")] public string IdCardNumber { get; set; } - + [MaxLength(256, ErrorMessage = "客户地址长度不超过256字符")] public string CustomerAddress { get; set; } - + [Required(ErrorMessage = "客户类型为必填字段")] public int CustomerType { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs index ab528df..6451a26 100644 --- a/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs @@ -6,25 +6,25 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "信息编号为必填字段"), MaxLength(128, ErrorMessage = "信息编号长度不超过128字符")] public string InformationNumber { get; set; } - + [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } - + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - + [Required(ErrorMessage = "开始日期为必填字段")] public DateTime StartDate { get; set; } - + [Required(ErrorMessage = "结束日期为必填字段")] public DateTime EndDate { get; set; } - + [Required(ErrorMessage = "电费为必填字段")] public decimal PowerUsage { get; set; } - + [Required(ErrorMessage = "水费为必填字段")] public decimal WaterUsage { get; set; } - + [Required(ErrorMessage = "记录员为必填字段"), MaxLength(150, ErrorMessage = "记录员长度不超过150字符")] public string Recorder { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs index c4712ef..8e3b343 100644 --- a/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs @@ -1,15 +1,13 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEnergyManagementInputDto : ListInputDto { public int Id { get; set; } public string InformationId { get; set; } public string RoomNo { get; set; } - + public DateOnly? UseDate { get; set; } - + public DateOnly? EndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs index ad78b4d..9dce1db 100644 --- a/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs @@ -6,25 +6,25 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "信息编号为必填字段"), MaxLength(128, ErrorMessage = "信息编号长度不超过128字符")] public string InformationId { get; set; } - + [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } - + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - + [Required(ErrorMessage = "开始日期为必填字段")] public DateTime StartDate { get; set; } - + [Required(ErrorMessage = "结束日期为必填字段")] public DateTime EndDate { get; set; } - + [Required(ErrorMessage = "电费为必填字段")] public decimal PowerUsage { get; set; } - + [Required(ErrorMessage = "水费为必填字段")] public decimal WaterUsage { get; set; } - + [Required(ErrorMessage = "记录员为必填字段"), MaxLength(150, ErrorMessage = "记录员长度不超过150字符")] public string Recorder { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/News/Dto/AddNewsInputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/AddNewsInputDto.cs index 22063f7..3cf94a2 100644 --- a/EOM.TSHotelManagement.Contract/Business/News/Dto/AddNewsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/AddNewsInputDto.cs @@ -6,25 +6,25 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "新闻编号为必填字段"), MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } - + [Required(ErrorMessage = "新闻标题为必填字段"), MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } - + [Required(ErrorMessage = "新闻内容为必填字段")] public string NewsContent { get; set; } - + [Required(ErrorMessage = "新闻类型为必填字段"), MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } - + [Required(ErrorMessage = "新闻链接为必填字段"), MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } - + [Required(ErrorMessage = "新闻日期为必填字段")] public DateTime NewsDate { get; set; } - + [Required(ErrorMessage = "新闻状态为必填字段"), MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } - + [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsInputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsInputDto.cs index 2330e1a..2f2dc20 100644 --- a/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsInputDto.cs @@ -1,16 +1,14 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNewsInputDto : ListInputDto { public string NewId { get; set; } public string NewsTitle { get; set; } - + public string NewsContent { get; set; } public string NewsType { get; set; } public string NewsLink { get; set; } - + public DateTime NewsDate { get; set; } public string NewsStatus { get; set; } public string NewsImage { get; set; } diff --git a/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsOuputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsOuputDto.cs index c3b2868..08b4f01 100644 --- a/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsOuputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/ReadNewsOuputDto.cs @@ -1,22 +1,20 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNewsOuputDto : BaseDto { public int Id { get; set; } public string NewId { get; set; } public string NewsTitle { get; set; } - + public string NewsContent { get; set; } public string NewsType { get; set; } - + public string NewsTypeDescription { get; set; } public string NewsLink { get; set; } - + public DateTime NewsDate { get; set; } public string NewsStatus { get; set; } - + public string NewsStatusDescription { get; set; } public string NewsImage { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/News/Dto/UpdateNewsInputDto.cs b/EOM.TSHotelManagement.Contract/Business/News/Dto/UpdateNewsInputDto.cs index 5bcb77a..8b449f8 100644 --- a/EOM.TSHotelManagement.Contract/Business/News/Dto/UpdateNewsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/News/Dto/UpdateNewsInputDto.cs @@ -6,25 +6,25 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "新闻编号为必填字段"), MaxLength(128, ErrorMessage = "新闻编号长度不超过128字符")] public string NewId { get; set; } - + [Required(ErrorMessage = "新闻标题为必填字段"), MaxLength(256, ErrorMessage = "新闻标题长度不超过256字符")] public string NewsTitle { get; set; } - + [Required(ErrorMessage = "新闻内容为必填字段")] public string NewsContent { get; set; } - + [Required(ErrorMessage = "新闻类型为必填字段"), MaxLength(64, ErrorMessage = "新闻类型长度不超过64字符")] public string NewsType { get; set; } - + [Required(ErrorMessage = "新闻链接为必填字段"), MaxLength(200, ErrorMessage = "新闻链接长度不超过200字符")] public string NewsLink { get; set; } - + [Required(ErrorMessage = "新闻日期为必填字段")] public DateTime NewsDate { get; set; } - + [Required(ErrorMessage = "新闻状态为必填字段"), MaxLength(64, ErrorMessage = "新闻状态长度不超过64字符")] public string NewsStatus { get; set; } - + [MaxLength(200, ErrorMessage = "新闻图片长度不超过200字符")] public string NewsImage { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs index 1da6dd8..a6abf88 100644 --- a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs @@ -6,7 +6,7 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "宣传ID为必填字段"), MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } - + [Required(ErrorMessage = "宣传内容为必填字段"), MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs index efaac4d..6bb2c5c 100644 --- a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPromotionContentInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs index fb7e4d1..e34c59e 100644 --- a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPromotionContentOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs index ffe6976..f6f4791 100644 --- a/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs @@ -6,7 +6,7 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "宣传ID为必填字段"), MaxLength(128, ErrorMessage = "宣传ID长度不超过128字符")] public string PromotionContentNumber { get; set; } - + [Required(ErrorMessage = "宣传内容为必填字段"), MaxLength(2000, ErrorMessage = "宣传内容长度不超过2000字符")] public string PromotionContentMessage { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/CreateReserInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/CreateReserInputDto.cs index 080a2b8..187e6fe 100644 --- a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/CreateReserInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/CreateReserInputDto.cs @@ -6,22 +6,22 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "预约编号为必填字段"), MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } - + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } - + [Required(ErrorMessage = "预约电话为必填字段"), MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } - + [Required(ErrorMessage = "预约房号为必填字段"), MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } - + [Required(ErrorMessage = "预约渠道为必填字段"), MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } - + [Required(ErrorMessage = "预约起始日期为必填字段")] public DateTime ReservationStartDate { get; set; } - + [Required(ErrorMessage = "预约结束日期为必填字段")] public DateTime ReservationEndDate { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserInputDto.cs index 756eabb..d396bbb 100644 --- a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadReserInputDto : ListInputDto { @@ -9,9 +7,9 @@ namespace EOM.TSHotelManagement.Contract public string ReservationPhoneNumber { get; set; } public string ReservationRoomNumber { get; set; } public string ReservationChannel { get; set; } - + public DateTime ReservationStartDate { get; set; } - + public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserOutputDto.cs index c1e9a42..cbf65f3 100644 --- a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -1,32 +1,31 @@ using EOM.TSHotelManagement.Common; -using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Contract { public class ReadReserOutputDto : BaseOutputDto { public int Id { get; set; } - + [UIDisplay("预约编号")] public string ReservationId { get; set; } - + [UIDisplay("客户姓名")] public string CustomerName { get; set; } - + [UIDisplay("联系方式")] public string ReservationPhoneNumber { get; set; } - + [UIDisplay("预定房号")] public string ReservationRoomNumber { get; set; } - + [UIDisplay("预约渠道")] public string ReservationChannel { get; set; } - + public string ReservationChannelDescription { get; set; } - + [UIDisplay("预约开始时")] public DateTime ReservationStartDate { get; set; } - + [UIDisplay("预约结束时")] public DateTime ReservationEndDate { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/UpdateReserInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/UpdateReserInputDto.cs index 96fcee2..c0ed9a9 100644 --- a/EOM.TSHotelManagement.Contract/Business/Reser/Dto/UpdateReserInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Reser/Dto/UpdateReserInputDto.cs @@ -6,22 +6,22 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "预约编号为必填字段"), MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } - + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } - + [Required(ErrorMessage = "预约电话为必填字段"), MaxLength(256, ErrorMessage = "预约电话长度不超过256字符")] public string ReservationPhoneNumber { get; set; } - + [Required(ErrorMessage = "预约房号为必填字段"), MaxLength(128, ErrorMessage = "预约房号长度不超过128字符")] public string ReservationRoomNumber { get; set; } - + [Required(ErrorMessage = "预约渠道为必填字段"), MaxLength(50, ErrorMessage = "预约渠道长度不超过50字符")] public string ReservationChannel { get; set; } - + [Required(ErrorMessage = "预约起始日期为必填字段")] public DateTime ReservationStartDate { get; set; } - + [Required(ErrorMessage = "预约结束日期为必填字段")] public DateTime ReservationEndDate { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs index ea01411..e24472d 100644 --- a/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckinRoomByReservationDto.cs @@ -6,33 +6,33 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - + [Required(ErrorMessage = "客户名称为必填字段"), MaxLength(200, ErrorMessage = "客户名称长度不超过200字符")] public string CustomerName { get; set; } - + public int? CustomerGender { get; set; } - + [Required(ErrorMessage = "护照ID为必填字段")] public int PassportId { get; set; } - + [Required(ErrorMessage = "客户电话为必填字段"), MaxLength(256, ErrorMessage = "客户电话长度不超过256字符")] public string CustomerPhoneNumber { get; set; } - + [Required(ErrorMessage = "出生日期为必填字段")] public DateOnly DateOfBirth { get; set; } - + [Required(ErrorMessage = "身份证号为必填字段"), MaxLength(128, ErrorMessage = "身份证号长度不超过128字符")] public string IdCardNumber { get; set; } - + [MaxLength(500, ErrorMessage = "客户地址长度不超过500字符")] public string CustomerAddress { get; set; } - + [Required(ErrorMessage = "客户类型为必填字段")] public int CustomerType { get; set; } - + [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } - + [Required(ErrorMessage = "预约编号为必填字段"), MaxLength(128, ErrorMessage = "预约编号长度不超过128字符")] public string ReservationId { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckoutRoomDto.cs b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckoutRoomDto.cs index ddee4d5..96c653a 100644 --- a/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckoutRoomDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Room/Dto/CheckoutRoomDto.cs @@ -6,13 +6,13 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "房间编号为必填字段"), MaxLength(128, ErrorMessage = "房间编号长度不超过128字符")] public string RoomNumber { get; set; } - + [Required(ErrorMessage = "客户编号为必填字段"), MaxLength(128, ErrorMessage = "客户编号长度不超过128字符")] public string CustomerNumber { get; set; } - + [Required(ErrorMessage = "水费为必填字段")] public decimal WaterUsage { get; set; } - + [Required(ErrorMessage = "电费为必填字段")] public decimal ElectricityUsage { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs index edb9a9c..ad1f185 100644 --- a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs @@ -6,16 +6,16 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "商品编号为必填字段"), MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } - + [Required(ErrorMessage = "商品名称为必填字段"), MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } - + [Required(ErrorMessage = "商品价格为必填字段")] public decimal ProductPrice { get; set; } - + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } - + [Required(ErrorMessage = "库存数量为必填字段")] public int Stock { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs index a0b0ed1..d4cf117 100644 --- a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs @@ -6,15 +6,15 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "商品编号为必填字段"), MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } - + [MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } - + public decimal ProductPrice { get; set; } - + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } - + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs index 0d1ada5..d93972c 100644 --- a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs @@ -1,15 +1,13 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSellThingInputDto : ListInputDto { public string ProductNumber { get; set; } public string ProductName { get; set; } - + public decimal ProductPrice { get; set; } public string Specification { get; set; } - + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs index 73200ef..3f8814b 100644 --- a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs @@ -1,24 +1,23 @@ using EOM.TSHotelManagement.Common; -using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Contract { public class ReadSellThingOutputDto : BaseOutputDto { public int Id { get; set; } - + [UIDisplay("商品编号")] public string ProductNumber { get; set; } - + [UIDisplay("商品名称")] public string ProductName { get; set; } - + [UIDisplay("商品价格")] public decimal ProductPrice { get; set; } - + [UIDisplay("规格型号")] public string Specification { get; set; } - + [UIDisplay("库存", true, true)] public int Stock { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs index 03c2dd9..2037dac 100644 --- a/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs @@ -6,16 +6,16 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "商品编号为必填字段"), MaxLength(128, ErrorMessage = "商品编号长度不超过128字符")] public string ProductNumber { get; set; } - + [Required(ErrorMessage = "商品名称为必填字段"), MaxLength(500, ErrorMessage = "商品名称长度不超过500字符")] public string ProductName { get; set; } - + [Required(ErrorMessage = "商品价格为必填字段")] public decimal ProductPrice { get; set; } - + [MaxLength(1000, ErrorMessage = "规格型号长度不超过1000字符")] public string Specification { get; set; } - + [Required(ErrorMessage = "库存数量为必填字段")] public int Stock { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs index 91170c3..6b0e286 100644 --- a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/AddCustomerSpendInputDto.cs @@ -6,21 +6,21 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "房间编号为必填字段")] public string RoomNumber { get; set; } - + [Required(ErrorMessage = "商品编号为必填字段")] public string ProductNumber { get; set; } - + [Required(ErrorMessage = "商品名称为必填字段")] public string ProductName { get; set; } - + [Required(ErrorMessage = "数量为必填字段")] public int Quantity { get; set; } - + [Required(ErrorMessage = "价格为必填字段")] public decimal Price { get; set; } - + public string WorkerNo { get; set; } - + public string SoftwareVersion { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs index 2f8823a..c9fd6f0 100644 --- a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs @@ -6,30 +6,30 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "商品编号为必填字段")] public string ProductNumber { get; set; } - + [Required(ErrorMessage = "消费编号为必填字段")] public string SpendNumber { get; set; } - + public string RoomNumber { get; set; } - + public string CustomerNumber { get; set; } - + public string ProductName { get; set; } - + [Required(ErrorMessage = "消费数量为必填字段")] public int ConsumptionQuantity { get; set; } - + [Required(ErrorMessage = "商品单价为必填字段")] public decimal ProductPrice { get; set; } - + [Required(ErrorMessage = "消费金额为必填字段")] public decimal ConsumptionAmount { get; set; } - + [Required(ErrorMessage = "消费时间为必填字段")] public DateTime ConsumptionTime { get; set; } - + public string SettlementStatus { get; set; } - + public string ConsumptionType { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs index 9870305..ec24295 100644 --- a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs @@ -6,7 +6,7 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "房间编号为必填字段")] public string RoomNumber { get; set; } - + [Required(ErrorMessage = "客户编号为必填字段")] public string CustomerNumber { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs index bcaafc7..9025758 100644 --- a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs @@ -1,25 +1,23 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSpendInputDto : ListInputDto { public string SpendNumber { get; set; } - + public string RoomNumber { get; set; } - + public string CustomerNumber { get; set; } - + public string ProductName { get; set; } - + public int ConsumptionQuantity { get; set; } - + public decimal ProductPrice { get; set; } - + public decimal ConsumptionAmount { get; set; } - + public string SettlementStatus { get; set; } - + public DateTime ConsumptionTime { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs index fb1d62e..4da0315 100644 --- a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs @@ -1,50 +1,49 @@ using EOM.TSHotelManagement.Common; -using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Contract { public class ReadSpendOutputDto : BaseOutputDto { public int Id { get; set; } - + [UIDisplay("消费编号", false, false)] public string SpendNumber { get; set; } - + [UIDisplay("房间号")] public string RoomNumber { get; set; } - + [UIDisplay("客户编号")] public string CustomerNumber { get; set; } - + [UIDisplay("商品编号", false, false)] public string ProductNumber { get; set; } - + [UIDisplay("商品名称")] public string ProductName { get; set; } - + [UIDisplay("消费数量", true)] public int ConsumptionQuantity { get; set; } - + [UIDisplay("商品单价")] public decimal ProductPrice { get; set; } - + public string ProductPriceFormatted { get; set; } - + [UIDisplay("消费金额")] public decimal ConsumptionAmount { get; set; } - + public string ConsumptionAmountFormatted { get; set; } - + [UIDisplay("消费时间")] public DateTime ConsumptionTime { get; set; } public string SettlementStatus { get; set; } - + [UIDisplay("消费类型", false, false)] public string ConsumptionType { get; set; } - + [UIDisplay("消费类型", false, true)] public string ConsumptionTypeDescription { get; set; } - + [UIDisplay("结算状态")] public string SettlementStatusDescription { get; set; } } diff --git a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs index 8c4e838..60413f8 100644 --- a/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs @@ -6,29 +6,29 @@ namespace EOM.TSHotelManagement.Contract { [Required(ErrorMessage = "消费编号为必填字段")] public string SpendNumber { get; set; } - + public string RoomNumber { get; set; } - + public string OriginalRoomNumber { get; set; } - + public string CustomerNumber { get; set; } - + public string ProductName { get; set; } - + [Required(ErrorMessage = "消费数量为必填字段")] public int ConsumptionQuantity { get; set; } - + [Required(ErrorMessage = "商品单价为必填字段")] public decimal ProductPrice { get; set; } - + [Required(ErrorMessage = "消费金额为必填字段")] public decimal ConsumptionAmount { get; set; } - + [Required(ErrorMessage = "消费时间为必填字段")] public DateTime ConsumptionTime { get; set; } - + public string SettlementStatus { get; set; } - + public string ConsumptionType { get; set; } } } diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs index ce13297..5aec75f 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index cb025df..f2724f5 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs index 233819c..ed55910 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeCheckInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs index 85fe190..0b2ec8c 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeCheckOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs index 99e9fef..038b308 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeHistoryInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs index 38bdc48..c28300c 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeHistoryOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs index a3c988e..094c77a 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeePhotoInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs index cb829cc..d611a0d 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeePhotoOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs index 21cab11..0f621f1 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeRewardPunishmentInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs index 26c5279..dc358f9 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEmployeeRewardPunishmentOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs index b81871c..ec16aca 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRewardPunishmentTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs index 4b0cad8..e2d3d04 100644 --- a/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRewardPunishmentTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs index 4f95ff8..b5fd4cb 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs index 8c89546..c65919c 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs index ba5214c..7af1ec0 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs index d990118..384e257 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAdministratorTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs index 1947506..b500523 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs index efd4fef..2f93049 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs index a1a1b79..76fc735 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeTypeInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs index 69054d2..3cf24c6 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/AppointmentNoticeType/ReadAppointmentNoticeTypeOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadAppointmentNoticeTypeOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs index b004fd7..221bb4d 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadDepartmentInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs index bbc5c7a..fc43f37 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadDepartmentOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs index cd56fa6..aa4226e 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadMenuInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs index 043944d..24e363d 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadMenuOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs index 1a73f11..4ab0607 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNationInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs index 72e1561..2288f8b 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadNationOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs index f093d5e..491b478 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/AssignUserPermissionsInputDto.cs @@ -1,5 +1,4 @@ using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Contract; namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs index 6adaf00..f593d5a 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/GrantRolePermissionsInputDto.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Contract; namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs index 93a3247..d7c8b12 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/ReadPermissionDtos.cs @@ -1,5 +1,4 @@ using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Contract; namespace EOM.TSHotelManagement.Contract { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs index d9a2b1b..bc9aa1e 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Permission/UserRolePermissionOutputDto.cs @@ -1,5 +1,4 @@ using System.ComponentModel.DataAnnotations; -using EOM.TSHotelManagement.Contract; namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs index 939adad..78baa07 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPositionInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs index 2af9a19..1428658 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadPositionOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs index 8a07575..6320423 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEducationInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs index dd37d63..3b36f42 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadEducationOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs index 881ffa8..523577a 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignRoleUsersInputDto.cs @@ -1,5 +1,3 @@ -using System.Collections.Generic; - namespace EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role { /// diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs index 4bf633d..e21ff59 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/AssignUserRolesInputDto.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace EOM.TSHotelManagement.Contract diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs index 12b9265..0fb4260 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoleInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs index 52b8de1..5d22eb6 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadRoleOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs index e338904..624fdb4 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSupervisionStatisticsInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs index 7321245..3d4b66c 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSupervisionStatisticsOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs index faffce0..fd240c9 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; - namespace EOM.TSHotelManagement.Contract { public class DeleteSystemInformationInputDto : BaseInputDto diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs index 3b4bad9..dffc04b 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSystemInformationInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs index efa5bb5..ca5554e 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadSystemInformationOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs index 7a6f617..46de721 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadVipLevelRuleInputDto : ListInputDto { diff --git a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs index d74fbbd..4cfccd6 100644 --- a/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs @@ -1,6 +1,4 @@ -using System.ComponentModel.DataAnnotations; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadVipLevelRuleOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index b09c214..21dad37 100644 --- a/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -1,6 +1,4 @@ -using EOM.TSHotelManagement.Common; - -namespace EOM.TSHotelManagement.Contract +namespace EOM.TSHotelManagement.Contract { public class ReadOperationLogOutputDto : BaseOutputDto { diff --git a/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs b/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs index 964d499..b33618c 100644 --- a/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs +++ b/EOM.TSHotelManagement.Data/DatabaseInitializer/DatabaseInitializer.cs @@ -1,6 +1,6 @@ +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Migration; -using EOM.TSHotelManagement.Common; using Microsoft.Extensions.Configuration; using MySqlConnector; using SqlSugar; @@ -130,27 +130,27 @@ namespace EOM.TSHotelManagement.Data Database = null, }; break; - //case DbType.SqlServer: //This project not include reference Package.Please manual install Microsoft.EntityFrameworkCore.SqlServer - // builder = new SqlConnectionStringBuilder(connectionString) - // { - // InitialCatalog = "master", - // ConnectTimeout = 30 - // }; - // break; - //case DbType.Oracle: //This project not include reference Package.Please manual install Oracle.ManagedDataAccess.Core - // builder = new OracleConnectionStringBuilder(connectionString) - // { - // UserID = "sys as sysdba", - // }; - // break; - //case DbType.PostgreSQL: //This project not include reference Package.Please manual install Npgsql.EntityFrameworkCore.PostgreSQL - // builder = new NpgsqlConnectionStringBuilder(connectionString) - // { - // Database = "postgres", - // Timeout = 30, - // Pooling = false - // }; - // break; + //case DbType.SqlServer: //This project not include reference Package.Please manual install Microsoft.EntityFrameworkCore.SqlServer + // builder = new SqlConnectionStringBuilder(connectionString) + // { + // InitialCatalog = "master", + // ConnectTimeout = 30 + // }; + // break; + //case DbType.Oracle: //This project not include reference Package.Please manual install Oracle.ManagedDataAccess.Core + // builder = new OracleConnectionStringBuilder(connectionString) + // { + // UserID = "sys as sysdba", + // }; + // break; + //case DbType.PostgreSQL: //This project not include reference Package.Please manual install Npgsql.EntityFrameworkCore.PostgreSQL + // builder = new NpgsqlConnectionStringBuilder(connectionString) + // { + // Database = "postgres", + // Timeout = 30, + // Pooling = false + // }; + // break; } return new SqlSugarClient(new ConnectionConfig diff --git a/EOM.TSHotelManagement.Data/Repository/GenericRepository.cs b/EOM.TSHotelManagement.Data/Repository/GenericRepository.cs index b669f1e..d5b26cd 100644 --- a/EOM.TSHotelManagement.Data/Repository/GenericRepository.cs +++ b/EOM.TSHotelManagement.Data/Repository/GenericRepository.cs @@ -1,5 +1,5 @@ -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using Microsoft.AspNetCore.Http; using SqlSugar; using System.Linq.Expressions; diff --git a/EOM.TSHotelManagement.Domain/Business/Asset/Asset.cs b/EOM.TSHotelManagement.Domain/Business/Asset/Asset.cs index 49fa764..7f79ea6 100644 --- a/EOM.TSHotelManagement.Domain/Business/Asset/Asset.cs +++ b/EOM.TSHotelManagement.Domain/Business/Asset/Asset.cs @@ -43,35 +43,35 @@ namespace EOM.TSHotelManagement.Domain /// 资产编号 (Asset Number) /// [SqlSugar.SugarColumn(ColumnName = "asset_number", IsNullable = false, IsPrimaryKey = true, Length = 128, ColumnDescription = "资产编号")] - + public string AssetNumber { get; set; } /// /// 资产名称 (Asset Name) /// [SqlSugar.SugarColumn(ColumnName = "asset_name", IsNullable = false, Length = 200, ColumnDescription = "资产名称")] - + public string AssetName { get; set; } /// /// 资产总值 (Asset Value) /// [SqlSugar.SugarColumn(ColumnName = "asset_value", IsNullable = false, DecimalDigits = 2, Length = 18, ColumnDescription = "资产名称")] - + public decimal AssetValue { get; set; } /// /// 资产总值描述 (格式化后的字符串) (Asset Value Description - Formatted) /// [SqlSugar.SugarColumn(IsIgnore = true)] - + public string AssetValueFormatted { get; set; } /// /// 所属部门代码 (Department Code) /// [SqlSugar.SugarColumn(ColumnName = "department_code", IsNullable = false, Length = 128, ColumnDescription = "所属部门代码 (Department Code)")] - + public string DepartmentCode { get; set; } /// @@ -84,21 +84,21 @@ namespace EOM.TSHotelManagement.Domain /// 入库时间 (购置日期) (Acquisition Date) /// [SqlSugar.SugarColumn(ColumnName = "acquisition_date", IsNullable = false, ColumnDescription = "入库时间 (购置日期) (Acquisition Date)")] - + public DateOnly AcquisitionDate { get; set; } /// /// 资产来源 (Asset Source) /// [SqlSugar.SugarColumn(ColumnName = "asset_source", IsNullable = false, Length = 500, ColumnDescription = "资产来源 (Asset Source)")] - + public string AssetSource { get; set; } /// /// 资产经办人 (员工ID) (Acquired By - Employee ID) /// [SqlSugar.SugarColumn(ColumnName = "acquired_by_employee", IsNullable = false, Length = 128, ColumnDescription = "资产经办人 (员工ID) (Acquired By - Employee ID)")] - + public string AcquiredByEmployeeId { get; set; } /// diff --git a/EOM.TSHotelManagement.Domain/Business/Room/Room.cs b/EOM.TSHotelManagement.Domain/Business/Room/Room.cs index affa6f6..b161cef 100644 --- a/EOM.TSHotelManagement.Domain/Business/Room/Room.cs +++ b/EOM.TSHotelManagement.Domain/Business/Room/Room.cs @@ -50,7 +50,7 @@ namespace EOM.TSHotelManagement.Domain IsNullable = false, Length = 128 )] - + public string RoomNumber { get; set; } /// @@ -61,7 +61,7 @@ namespace EOM.TSHotelManagement.Domain ColumnDescription = "房间类型ID (关联房间类型表)", IsNullable = false )] - + public int RoomTypeId { get; set; } /// @@ -109,7 +109,7 @@ namespace EOM.TSHotelManagement.Domain ColumnDescription = "房间状态ID (如0-空闲/1-已入住)", IsNullable = false )] - + public int RoomStateId { get; set; } /// @@ -127,7 +127,7 @@ namespace EOM.TSHotelManagement.Domain IsNullable = false, DecimalDigits = 2 )] - + public decimal RoomRent { get; set; } /// @@ -140,7 +140,7 @@ namespace EOM.TSHotelManagement.Domain DecimalDigits = 2, DefaultValue = "0.00" )] - + public decimal RoomDeposit { get; set; } /// @@ -152,7 +152,7 @@ namespace EOM.TSHotelManagement.Domain IsNullable = false, Length = 200 )] - + public string RoomLocation { get; set; } /// diff --git a/EOM.TSHotelManagement.Domain/Business/Room/RoomType.cs b/EOM.TSHotelManagement.Domain/Business/Room/RoomType.cs index e14057d..783f7c2 100644 --- a/EOM.TSHotelManagement.Domain/Business/Room/RoomType.cs +++ b/EOM.TSHotelManagement.Domain/Business/Room/RoomType.cs @@ -48,7 +48,7 @@ namespace EOM.TSHotelManagement.Domain ColumnDescription = "房间类型唯一编号 (Unique Room Type ID)", IsNullable = false )] - + public int RoomTypeId { get; set; } /// @@ -60,7 +60,7 @@ namespace EOM.TSHotelManagement.Domain IsNullable = false, Length = 200 )] - + public string RoomTypeName { get; set; } /// @@ -73,7 +73,7 @@ namespace EOM.TSHotelManagement.Domain IsNullable = false, DecimalDigits = 2 )] - + public decimal RoomRent { get; set; } /// @@ -87,7 +87,7 @@ namespace EOM.TSHotelManagement.Domain DecimalDigits = 2, DefaultValue = "0.00" )] - + public decimal RoomDeposit { get; set; } /// diff --git a/EOM.TSHotelManagement.Domain/SystemManagement/Administrator.cs b/EOM.TSHotelManagement.Domain/SystemManagement/Administrator.cs index 7e4a782..fb52e73 100644 --- a/EOM.TSHotelManagement.Domain/SystemManagement/Administrator.cs +++ b/EOM.TSHotelManagement.Domain/SystemManagement/Administrator.cs @@ -43,35 +43,35 @@ namespace EOM.TSHotelManagement.Domain /// 管理员账号 (Administrator Account) /// [SugarColumn(ColumnName = "admin_number", IsPrimaryKey = true, IsNullable = false, Length = 128, ColumnDescription = "管理员账号 (Administrator Account)")] - + public string Number { get; set; } /// /// 管理员账号 (Administrator Account) /// [SugarColumn(ColumnName = "admin_account", IsNullable = false, Length = 128, ColumnDescription = "管理员名称 (Administrator Name)")] - + public string Account { get; set; } /// /// 管理员密码 (Administrator Password) /// [SugarColumn(ColumnName = "admin_password", IsNullable = false, Length = 256, ColumnDescription = "管理员密码 (Administrator Password)")] - + public string Password { get; set; } /// /// 管理员类型 (Administrator Type) /// [SugarColumn(ColumnName = "admin_type", IsNullable = false, Length = 150, ColumnDescription = "管理员类型 (Administrator Type)")] - + public string Type { get; set; } /// /// 管理员名称 (Administrator Name) /// [SugarColumn(ColumnName = "admin_name", IsNullable = false, Length = 200, ColumnDescription = "管理员名称 (Administrator Name)")] - + public string Name { get; set; } /// diff --git a/EOM.TSHotelManagement.Infrastructure/Config/CsrfTokenConfig.cs b/EOM.TSHotelManagement.Infrastructure/Config/CsrfTokenConfig.cs index 78ce323..7811ea6 100644 --- a/EOM.TSHotelManagement.Infrastructure/Config/CsrfTokenConfig.cs +++ b/EOM.TSHotelManagement.Infrastructure/Config/CsrfTokenConfig.cs @@ -1,5 +1,3 @@ -using System; - namespace EOM.TSHotelManagement.Infrastructure { public class CsrfTokenConfig diff --git a/EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs b/EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs index b206fa7..2a3f91b 100644 --- a/EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs +++ b/EOM.TSHotelManagement.Infrastructure/Constant/ConstantBase.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Linq; - -namespace EOM.TSHotelManagement.Infrastructure +namespace EOM.TSHotelManagement.Infrastructure { public class ConstantBase where T : ConstantBase { diff --git a/EOM.TSHotelManagement.Service/Application/NavBar/NavBarService.cs b/EOM.TSHotelManagement.Service/Application/NavBar/NavBarService.cs index c28baae..b206c04 100644 --- a/EOM.TSHotelManagement.Service/Application/NavBar/NavBarService.cs +++ b/EOM.TSHotelManagement.Service/Application/NavBar/NavBarService.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Business/Asset/AssetService.cs b/EOM.TSHotelManagement.Service/Business/Asset/AssetService.cs index 70e1fb2..47c3164 100644 --- a/EOM.TSHotelManagement.Service/Business/Asset/AssetService.cs +++ b/EOM.TSHotelManagement.Service/Business/Asset/AssetService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/Business/Customer/Account/CustomerAccountService.cs b/EOM.TSHotelManagement.Service/Business/Customer/Account/CustomerAccountService.cs index ce0b9aa..f191964 100644 --- a/EOM.TSHotelManagement.Service/Business/Customer/Account/CustomerAccountService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/Account/CustomerAccountService.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.CodeLib; using jvncorelib.EntityLib; using Microsoft.AspNetCore.Http; @@ -140,7 +140,7 @@ namespace EOM.TSHotelManagement.Service if (!AccountRegex.IsMatch(readCustomerAccountInputDto.Account)) return new SingleOutputDto() { Code = BusinessStatusCode.BadRequest, Message = LocalizationHelper.GetLocalizedString("Account can only contain letters, numbers, and underscores", "账号只能包含字母、数字和下划线"), Data = new ReadCustomerAccountOutputDto() }; - if (!PasswordRegex.IsMatch(readCustomerAccountInputDto.Password)) + if (!PasswordRegex.IsMatch(readCustomerAccountInputDto.Password)) return new SingleOutputDto() { Code = BusinessStatusCode.BadRequest, Message = LocalizationHelper.GetLocalizedString("Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, and one number", "密码必须至少8个字符,并且包含至少一个大写字母、一个小写字母和一个数字"), Data = new ReadCustomerAccountOutputDto() }; var customerAccount = customerAccountRepository.AsQueryable().Single(x => x.Account == readCustomerAccountInputDto.Account); diff --git a/EOM.TSHotelManagement.Service/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Service/Business/Customer/CustomerService.cs index a051d72..a3b9a67 100644 --- a/EOM.TSHotelManagement.Service/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/CustomerService.cs @@ -21,11 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/Business/Customer/Permission/CustomerPermissionService.cs b/EOM.TSHotelManagement.Service/Business/Customer/Permission/CustomerPermissionService.cs index 4dadb50..02fa017 100644 --- a/EOM.TSHotelManagement.Service/Business/Customer/Permission/CustomerPermissionService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/Permission/CustomerPermissionService.cs @@ -1,14 +1,10 @@ +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Business/Customer/Permission/ICustomerPermissionService.cs b/EOM.TSHotelManagement.Service/Business/Customer/Permission/ICustomerPermissionService.cs index ffcacb2..8866e08 100644 --- a/EOM.TSHotelManagement.Service/Business/Customer/Permission/ICustomerPermissionService.cs +++ b/EOM.TSHotelManagement.Service/Business/Customer/Permission/ICustomerPermissionService.cs @@ -1,11 +1,5 @@ using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Business/EnergyManagement/EnergyManagementService.cs b/EOM.TSHotelManagement.Service/Business/EnergyManagement/EnergyManagementService.cs index 36aa67e..e8c3622 100644 --- a/EOM.TSHotelManagement.Service/Business/EnergyManagement/EnergyManagementService.cs +++ b/EOM.TSHotelManagement.Service/Business/EnergyManagement/EnergyManagementService.cs @@ -21,12 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using jvncorelib.EntityLib; -using SqlSugar; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Business/News/NewsService.cs b/EOM.TSHotelManagement.Service/Business/News/NewsService.cs index 332b7f8..f72219c 100644 --- a/EOM.TSHotelManagement.Service/Business/News/NewsService.cs +++ b/EOM.TSHotelManagement.Service/Business/News/NewsService.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; namespace EOM.TSHotelManagement.Service diff --git a/EOM.TSHotelManagement.Service/Business/PromotionContent/PromotionContentService.cs b/EOM.TSHotelManagement.Service/Business/PromotionContent/PromotionContentService.cs index 0f73c9b..95821da 100644 --- a/EOM.TSHotelManagement.Service/Business/PromotionContent/PromotionContentService.cs +++ b/EOM.TSHotelManagement.Service/Business/PromotionContent/PromotionContentService.cs @@ -21,12 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using jvncorelib.EntityLib; -using SqlSugar; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Service/Business/Reser/ReserService.cs index d651d3c..9763e3a 100644 --- a/EOM.TSHotelManagement.Service/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Service/Business/Reser/ReserService.cs @@ -21,11 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using SqlSugar; using System.Transactions; diff --git a/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs index 3d4f92f..eb25092 100644 --- a/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Service/Business/Room/RoomService.cs @@ -21,11 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using jvncorelib.CodeLib; using jvncorelib.EntityLib; using SqlSugar; @@ -141,7 +140,7 @@ namespace EOM.TSHotelManagement.Service result.ForEach(r => { var roomType = listRoomType.SingleOrDefault(a => a.RoomTypeId == r.RoomTypeId); - r.RoomName = roomType?.RoomTypeName ?? string.Empty; + r.RoomName = roomType?.RoomTypeName ?? string.Empty; var customer = listCustomer.SingleOrDefault(a => a.CustomerNumber == r.CustomerNumber); r.CustomerName = customer?.CustomerName ?? string.Empty; var helper = new EnumHelper(); diff --git a/EOM.TSHotelManagement.Service/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Service/Business/Room/RoomTypeService.cs index 7be70f0..e6e09b4 100644 --- a/EOM.TSHotelManagement.Service/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Service/Business/Room/RoomTypeService.cs @@ -21,12 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using jvncorelib.EntityLib; -using SqlSugar; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Business/Sellthing/SellService.cs b/EOM.TSHotelManagement.Service/Business/Sellthing/SellService.cs index 3a1c84e..f8c00bb 100644 --- a/EOM.TSHotelManagement.Service/Business/Sellthing/SellService.cs +++ b/EOM.TSHotelManagement.Service/Business/Sellthing/SellService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs index ca7f3fd..c9efdb4 100644 --- a/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Service/Business/Spend/SpendService.cs @@ -21,11 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using jvncorelib.CodeLib; using jvncorelib.EntityLib; using Microsoft.AspNetCore.Http; diff --git a/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs b/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs index 798ebed..f708f7e 100644 --- a/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs +++ b/EOM.TSHotelManagement.Service/Dashboard/DashboardService.cs @@ -1,11 +1,9 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using System.Text; -using static Org.BouncyCastle.Crypto.Engines.SM2Engine; namespace EOM.TSHotelManagement.Service { @@ -375,7 +373,7 @@ namespace EOM.TSHotelManagement.Service "System error, please try again later", "系统繁忙,请稍后重试") }; - + } return new SingleOutputDto { diff --git a/EOM.TSHotelManagement.Service/Employee/Check/EmployeeCheckService.cs b/EOM.TSHotelManagement.Service/Employee/Check/EmployeeCheckService.cs index 5958fee..82e0d9a 100644 --- a/EOM.TSHotelManagement.Service/Employee/Check/EmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Check/EmployeeCheckService.cs @@ -21,12 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using jvncorelib.EntityLib; -using SqlSugar; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Service/Employee/EmployeeService.cs index 4ca9ab6..7b3cf75 100644 --- a/EOM.TSHotelManagement.Service/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Service/Employee/EmployeeService.cs @@ -21,11 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; using System.Security.Claims; diff --git a/EOM.TSHotelManagement.Service/Employee/History/EmployeeHistoryService.cs b/EOM.TSHotelManagement.Service/Employee/History/EmployeeHistoryService.cs index 969e1c7..de93a8e 100644 --- a/EOM.TSHotelManagement.Service/Employee/History/EmployeeHistoryService.cs +++ b/EOM.TSHotelManagement.Service/Employee/History/EmployeeHistoryService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Employee/Permission/EmployeePermissionService.cs b/EOM.TSHotelManagement.Service/Employee/Permission/EmployeePermissionService.cs index 153def3..c59a2a8 100644 --- a/EOM.TSHotelManagement.Service/Employee/Permission/EmployeePermissionService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Permission/EmployeePermissionService.cs @@ -1,14 +1,10 @@ +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Employee/Permission/IEmployeePermissionService.cs b/EOM.TSHotelManagement.Service/Employee/Permission/IEmployeePermissionService.cs index 46f1f5d..e6fd8e8 100644 --- a/EOM.TSHotelManagement.Service/Employee/Permission/IEmployeePermissionService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Permission/IEmployeePermissionService.cs @@ -1,10 +1,5 @@ using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/Employee/Photo/EmployeePhotoService.cs b/EOM.TSHotelManagement.Service/Employee/Photo/EmployeePhotoService.cs index 24f99b3..333fa04 100644 --- a/EOM.TSHotelManagement.Service/Employee/Photo/EmployeePhotoService.cs +++ b/EOM.TSHotelManagement.Service/Employee/Photo/EmployeePhotoService.cs @@ -1,7 +1,7 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using Microsoft.AspNetCore.Http; diff --git a/EOM.TSHotelManagement.Service/Employee/RewardPunishment/RewardPunishmentService.cs b/EOM.TSHotelManagement.Service/Employee/RewardPunishment/RewardPunishmentService.cs index 35e6c03..2854668 100644 --- a/EOM.TSHotelManagement.Service/Employee/RewardPunishment/RewardPunishmentService.cs +++ b/EOM.TSHotelManagement.Service/Employee/RewardPunishment/RewardPunishmentService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs index 4b66b6b..43e3237 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/AdminService.cs @@ -21,16 +21,15 @@ *SOFTWARE. * */ - using EOM.TSHotelManagement.Contract; - using EOM.TSHotelManagement.Domain; - using EOM.TSHotelManagement.Common; - using EOM.TSHotelManagement.Data; - using jvncorelib.EncryptorLib; - using jvncorelib.EntityLib; - using SqlSugar; - using System.Security.Claims; - using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; - using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; +using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; +using jvncorelib.EncryptorLib; +using jvncorelib.EntityLib; +using SqlSugar; +using System.Security.Claims; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Administrator/IAdminService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/IAdminService.cs index da06841..b173230 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Administrator/IAdminService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Administrator/IAdminService.cs @@ -22,7 +22,6 @@ * */ using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Base/BaseService.cs index 2ced569..009e062 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Base/BaseService.cs @@ -21,11 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Menu/MenuService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Menu/MenuService.cs index 66de68a..73fe148 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Menu/MenuService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Notice/NoticeService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Notice/NoticeService.cs index f39706a..05903c8 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Notice/NoticeService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Notice/NoticeService.cs @@ -21,12 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using jvncorelib.EntityLib; -using SqlSugar; +using EOM.TSHotelManagement.Domain; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Permission/IPermissionAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Permission/IPermissionAppService.cs index 6337c2b..24fbf00 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Permission/IPermissionAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Permission/IPermissionAppService.cs @@ -1,5 +1,4 @@ using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; namespace EOM.TSHotelManagement.Service { diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Permission/PermissionAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Permission/PermissionAppService.cs index b878eca..f2640a7 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Permission/PermissionAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Permission/PermissionAppService.cs @@ -1,8 +1,7 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/SystemManagement/Role/RoleAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/Role/RoleAppService.cs index ee81b94..0ae8359 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/Role/RoleAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/Role/RoleAppService.cs @@ -1,9 +1,9 @@ -using EOM.TSHotelManagement.Contract; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Permission; using EOM.TSHotelManagement.Contract.SystemManagement.Dto.Role; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs b/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs index c241597..6f5f351 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/SystemManagement/VipRule/VipRuleAppService.cs b/EOM.TSHotelManagement.Service/SystemManagement/VipRule/VipRuleAppService.cs index 9dd43a6..ad6799c 100644 --- a/EOM.TSHotelManagement.Service/SystemManagement/VipRule/VipRuleAppService.cs +++ b/EOM.TSHotelManagement.Service/SystemManagement/VipRule/VipRuleAppService.cs @@ -21,10 +21,10 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; diff --git a/EOM.TSHotelManagement.Service/Util/UtilService.cs b/EOM.TSHotelManagement.Service/Util/UtilService.cs index a10b6aa..08e88be 100644 --- a/EOM.TSHotelManagement.Service/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Service/Util/UtilService.cs @@ -1,8 +1,7 @@ -using EOM.TSHotelManagement.Contract; -using EOM.TSHotelManagement.Domain; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Contract; using EOM.TSHotelManagement.Data; -using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Domain; using jvncorelib.EntityLib; using SqlSugar; -- Gitee