Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions DeliveryService.Domain/ClassDiagram.cd
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="DeliveryService.Domain.Courier.CourierEntity">
<Position X="1.25" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAUCAGAgAAEAAAAAAAAAAAAAAAAIAAAIAAAAAAAAAAg=</HashCode>
<FileName>Courier\CourierEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.Customer.CustomerEntity">
<Position X="10" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAUCAGAgAAEAAAAAAAAAAAAAAAAIAAAIAAAAAAAAAAg=</HashCode>
<FileName>Customer\CustomerEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.Manager.ManagerEntity">
<Position X="5.5" Y="4" Width="1.5" />
<TypeIdentifier>
<HashCode>IAUCAEAgAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAg=</HashCode>
<FileName>Manager\ManagerEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.Order.OrderEntity">
<Position X="5.5" Y="8.25" Width="1.5" />
<NestedTypes>
<Enum Name="DeliveryService.Domain.Order.OrderEntity.OrderStatus" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Order\OrderEntity.cs</NewMemberFileName>
</TypeIdentifier>
</Enum>
</NestedTypes>
<TypeIdentifier>
<HashCode>AAMCBAAEAAEgAAAAAIAAAABEABAQBAQAAAgAAAAAAAA=</HashCode>
<FileName>Order\OrderEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.PaymentOrder.PaymentOrderEntity">
<Position X="2.75" Y="8.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AABCAAAAAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>PaymentOrder\PaymentOrderEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.Product.ProductEntity">
<Position X="9" Y="11.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAAAAAQAAAEAAAAAACAAAAAAAAAAAAAAAAIAAAAA=</HashCode>
<FileName>Product\ProductEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.Restaraunt.RestaurantEntity">
<Position X="9" Y="6.75" Width="1.5" />
<NestedTypes>
<Enum Name="DeliveryService.Domain.Restaraunt.RestaurantEntity.IsOpen" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Restaurant\RestaurantEntity.cs</NewMemberFileName>
</TypeIdentifier>
</Enum>
</NestedTypes>
<TypeIdentifier>
<HashCode>AAACAAAEAAAAAAAAAAAAAAQEAAAAAAACACAAAAAAAAQ=</HashCode>
<FileName>Restaurant\RestaurantEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.Role.RoleEntity">
<Position X="3.25" Y="1" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Role\RoleEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.User.UserEntity">
<Position X="5.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAEAAACAAAAAAEAAQAAAAAAIAAAACAAAAAAAAAAg=</HashCode>
<FileName>User\UserEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeliveryService.Domain.OrderItemEntity">
<Position X="2.25" Y="12.25" Width="1.5" />
<TypeIdentifier>
<HashCode>EAECAAAAAAAAAEAAAAAACAQAAAAAQAAAAAAAAAAAAAA=</HashCode>
<FileName>OrderItemEntity\OrderItemEntity.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SectionEntity">
<Position X="11.5" Y="11.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAACAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>SectionEntity\SectionEntity.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Product" />
</ShowAsAssociation>
</Class>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>
6 changes: 0 additions & 6 deletions DeliveryService.Domain/Product/ProductEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ public class ProductEntity

public SectionEntity? Section { get; set; }

public ProductEntity(int id, string title)
{
Id = id;
Title = title;
}

public ProductEntity(int id, string name, double price, SectionEntity section)
{
Id = id;
Expand Down
10 changes: 9 additions & 1 deletion DeliveryService.Domain/SectionEntity/SectionEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
public Guid Id { get; set; }
public string Name { get; set; }

public SectionEntity(Guid id, string name)
public DeliveryService.Domain.Product.ProductEntity Product
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хороший код

{
get => default;
set
{
}
}

public SectionEntity(Guid id, string name)
{
Id = id;
Name = name;
Expand Down
23 changes: 13 additions & 10 deletions DeliveryService_ASP.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeliveryService.App", "Deli
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeliveryService.Contracts", "DeliveryService.Contracts\DeliveryService.Contracts.csproj", "{B02B938D-8CA0-4CD0-B31A-B3167D7B4605}"
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{13B28158-9D06-458A-A62D-B6019BC6EE3D}"
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{2FC6AD18-3BEB-43F7-9FDD-3CF226455744}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp2", "..\ConsoleApp2\ConsoleApp2.csproj", "{10DF0D27-F726-472F-A01E-16C22224C9D3}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{4FD900BD-08C8-417F-9162-EF047244097B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeliveryService.Services.PaymentAPI", "..\DeliveryService.Services.PaymentAPI\DeliveryService.Services.PaymentAPI.csproj", "{F2DDA11D-5610-4D94-A4B7-74ADDF5E42D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -49,14 +51,14 @@ Global
{B02B938D-8CA0-4CD0-B31A-B3167D7B4605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B02B938D-8CA0-4CD0-B31A-B3167D7B4605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B02B938D-8CA0-4CD0-B31A-B3167D7B4605}.Release|Any CPU.Build.0 = Release|Any CPU
{13B28158-9D06-458A-A62D-B6019BC6EE3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13B28158-9D06-458A-A62D-B6019BC6EE3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13B28158-9D06-458A-A62D-B6019BC6EE3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13B28158-9D06-458A-A62D-B6019BC6EE3D}.Release|Any CPU.Build.0 = Release|Any CPU
{10DF0D27-F726-472F-A01E-16C22224C9D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10DF0D27-F726-472F-A01E-16C22224C9D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10DF0D27-F726-472F-A01E-16C22224C9D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10DF0D27-F726-472F-A01E-16C22224C9D3}.Release|Any CPU.Build.0 = Release|Any CPU
{2FC6AD18-3BEB-43F7-9FDD-3CF226455744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FC6AD18-3BEB-43F7-9FDD-3CF226455744}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FC6AD18-3BEB-43F7-9FDD-3CF226455744}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FC6AD18-3BEB-43F7-9FDD-3CF226455744}.Release|Any CPU.Build.0 = Release|Any CPU
{F2DDA11D-5610-4D94-A4B7-74ADDF5E42D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2DDA11D-5610-4D94-A4B7-74ADDF5E42D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2DDA11D-5610-4D94-A4B7-74ADDF5E42D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2DDA11D-5610-4D94-A4B7-74ADDF5E42D9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -67,6 +69,7 @@ Global
{2ED1AD2D-0740-410E-895D-9842D10A221A} = {EDB841FB-9A89-4E15-8BF2-6CF7A63475AA}
{EB23172B-1FE1-4281-AC50-4F560A18F5D0} = {C4E7D0C8-C6E2-481A-8214-4D2CADC6F311}
{B02B938D-8CA0-4CD0-B31A-B3167D7B4605} = {7FCA4D67-5A3E-476F-B125-A2E1C2AE835D}
{F2DDA11D-5610-4D94-A4B7-74ADDF5E42D9} = {4FD900BD-08C8-417F-9162-EF047244097B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8C515027-DD6A-4FB2-A343-04CC8DDFD87E}
Expand Down
2 changes: 1 addition & 1 deletion DeliveryService_ASP.NET/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#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.

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dcproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup Label="Globals">
<ProjectVersion>2.1</ProjectVersion>
<DockerTargetOS>Linux</DockerTargetOS>
<ProjectGuid>13b28158-9d06-458a-a62d-b6019bc6ee3d</ProjectGuid>
<ProjectGuid>2fc6ad18-3beb-43f7-9fdd-3cf226455744</ProjectGuid>
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl>
<DockerServiceName>deliveryservice.api</DockerServiceName>
Expand Down
20 changes: 9 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ services:
dockerfile: DeliveryService_ASP.NET/Dockerfile
ports:
- 5000:80
minio:
container_name: minio
image: minio/minio:RELEASE.2021-09-15T04-54-25Z.hotfix.908b0f10a
rabbitmq:
image: rabbitmq:3.8-management-alpine
hostname: delivery_rabbitmq
restart: always
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
command: server --console-address ":9001" /data
volumes:
- ./docker/minio:/data
- RABBITMQ_DEFAULT_USER=rmuser
- RABBITMQ_DEFAULT_PASS=rmpassword
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit log_levels [{connection,error},{default,error}] disk_free_limit 2147483648
ports:
- "9000:9000"
- "9001:9001"

- 15672:15672
- 5672:5672