forked from CGI-FR/IoT-Hub-Portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from lucas-mrq/add-rooms
Add Planning & Layer Management
- Loading branch information
Showing
85 changed files
with
6,393 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG BUILD_VERSION=1.2.3 | ||
ARG GITHUB_RUN_NUMBER=4 | ||
WORKDIR /src | ||
RUN ls | ||
COPY ["IoTHub.Portal.Server/IoTHub.Portal.Server.csproj", "IoTHub.Portal.Server/"] | ||
COPY ["IoTHub.Portal.Shared/IoTHub.Portal.Shared.csproj", "IoTHub.Portal.Shared/"] | ||
COPY ["IoTHub.Portal.Client/IoTHub.Portal.Client.csproj", "IoTHub.Portal.Client/"] | ||
RUN dotnet restore "IoTHub.Portal.Server/IoTHub.Portal.Server.csproj" | ||
COPY . . | ||
WORKDIR "/src/IoTHub.Portal.Server" | ||
RUN dotnet build "IoTHub.Portal.Server.csproj" -c Release -o /app/build -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" | ||
|
||
FROM build AS publish | ||
ARG BUILD_VERSION=1.2.3 | ||
ARG GITHUB_RUN_NUMBER=4 | ||
RUN dotnet publish "IoTHub.Portal.Server.csproj" -c Release -o /app/publish -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "IoTHub.Portal.Server.dll"] | ||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG BUILD_VERSION=1.2.3 | ||
ARG GITHUB_RUN_NUMBER=4 | ||
WORKDIR /src | ||
RUN ls | ||
COPY ["IoTHub.Portal.Server/IoTHub.Portal.Server.csproj", "IoTHub.Portal.Server/"] | ||
COPY ["IoTHub.Portal.Shared/IoTHub.Portal.Shared.csproj", "IoTHub.Portal.Shared/"] | ||
COPY ["IoTHub.Portal.Client/IoTHub.Portal.Client.csproj", "IoTHub.Portal.Client/"] | ||
RUN dotnet restore "IoTHub.Portal.Server/IoTHub.Portal.Server.csproj" | ||
COPY . . | ||
WORKDIR "/src/IoTHub.Portal.Server" | ||
RUN dotnet build "IoTHub.Portal.Server.csproj" -c Release -o /app/build -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" | ||
|
||
FROM build AS publish | ||
ARG BUILD_VERSION=1.2.3 | ||
ARG GITHUB_RUN_NUMBER=4 | ||
RUN dotnet publish "IoTHub.Portal.Server.csproj" -c Release -o /app/publish -p:Version="${BUILD_VERSION}.${GITHUB_RUN_NUMBER}" | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "IoTHub.Portal.Server.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace IoTHub.Portal.Infrastructure.Mappers | ||
{ | ||
using AutoMapper; | ||
using IoTHub.Portal.Domain.Entities; | ||
using IoTHub.Portal.Shared.Models.v10; | ||
|
||
public class LayerProfile : Profile | ||
{ | ||
public LayerProfile() | ||
{ | ||
_ = CreateMap<LayerDto, Layer>() | ||
.ReverseMap(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace IoTHub.Portal.Infrastructure.Mappers | ||
{ | ||
using AutoMapper; | ||
using IoTHub.Portal.Domain.Entities; | ||
using IoTHub.Portal.Shared.Models.v10; | ||
|
||
public class PlanningProfile : Profile | ||
{ | ||
public PlanningProfile() | ||
{ | ||
_ = CreateMap<PlanningDto, Planning>() | ||
.ReverseMap(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace IoTHub.Portal.Infrastructure.Mappers | ||
{ | ||
using AutoMapper; | ||
using IoTHub.Portal.Domain.Entities; | ||
using IoTHub.Portal.Shared.Models.v10; | ||
|
||
public class ScheduleProfile : Profile | ||
{ | ||
public ScheduleProfile() | ||
{ | ||
_ = CreateMap<ScheduleDto, Schedule>() | ||
.ReverseMap(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace IoTHub.Portal.Application.Services | ||
{ | ||
using System.Threading.Tasks; | ||
using IoTHub.Portal.Domain.Entities; | ||
using IoTHub.Portal.Shared.Models.v10; | ||
|
||
public interface ILayerService | ||
{ | ||
Task<LayerDto> CreateLayer(LayerDto level); | ||
Task UpdateLayer(LayerDto level); | ||
Task DeleteLayer(string levelId); | ||
Task<Layer> GetLayer(string levelId); | ||
Task<IEnumerable<LayerDto>> GetLayers(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/IoTHub.Portal.Application/Services/IPlanningService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace IoTHub.Portal.Application.Services | ||
{ | ||
using System.Threading.Tasks; | ||
using IoTHub.Portal.Domain.Entities; | ||
using IoTHub.Portal.Shared.Models.v10; | ||
|
||
public interface IPlanningService | ||
{ | ||
Task<PlanningDto> CreatePlanning(PlanningDto planning); | ||
Task UpdatePlanning(PlanningDto planning); | ||
Task DeletePlanning(string planningId); | ||
Task<Planning> GetPlanning(string planningId); | ||
Task<IEnumerable<PlanningDto>> GetPlannings(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/IoTHub.Portal.Application/Services/IScheduleService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace IoTHub.Portal.Application.Services | ||
{ | ||
using System.Threading.Tasks; | ||
using IoTHub.Portal.Domain.Entities; | ||
using IoTHub.Portal.Shared.Models.v10; | ||
|
||
public interface IScheduleService | ||
{ | ||
Task<ScheduleDto> CreateSchedule(ScheduleDto schedule); | ||
Task UpdateSchedule(ScheduleDto schedule); | ||
Task DeleteSchedule(string scheduleId); | ||
Task<Schedule> GetSchedule(string scheduleId); | ||
Task<IEnumerable<ScheduleDto>> GetSchedules(); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/IoTHub.Portal.Application/Services/ISendPlanningCommandService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace IoTHub.Portal.Application.Services | ||
{ | ||
public interface ISendPlanningCommandService | ||
{ | ||
} | ||
} |
Oops, something went wrong.