Skip to content

Commit

Permalink
Merge pull request #52 from abdurrohmanq/unidevs
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
abdurrohmanq authored Nov 10, 2023
2 parents b0e38bf + 88a7e1a commit 20630f2
Show file tree
Hide file tree
Showing 44 changed files with 1,004 additions and 267 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /App
COPY . .
RUN dotnet restore
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /App
COPY --from=build-env /App/out .
EXPOSE 82
ENV ASPNETCORE_URLS=http://+:82
ENTRYPOINT ["dotnet", "MedX.WebApi.dll"]
97 changes: 0 additions & 97 deletions MedX.UnitTest/AppointmentControllerTest.cs

This file was deleted.

31 changes: 0 additions & 31 deletions MedX.UnitTest/MedX.UnitTest.csproj

This file was deleted.

41 changes: 0 additions & 41 deletions MedX.UnitTest/PasswordValidatorTest.cs

This file was deleted.

1 change: 0 additions & 1 deletion MedX.UnitTest/Usings.cs

This file was deleted.

9 changes: 0 additions & 9 deletions MedX.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MedX.Service", "src\MedX.Se
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MedX.Domain", "src\MedX.Domain\MedX.Domain.csproj", "{00ED443E-1ACF-4F62-A9AB-D976AE39327C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{D94B18A3-92E9-4A34-945A-D262BBEF8229}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MedX.Tests", "test\MedX.Tests\MedX.Tests.csproj", "{522EC1FF-C5F8-4136-A846-CD3E76B30A88}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,10 +35,6 @@ Global
{00ED443E-1ACF-4F62-A9AB-D976AE39327C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00ED443E-1ACF-4F62-A9AB-D976AE39327C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00ED443E-1ACF-4F62-A9AB-D976AE39327C}.Release|Any CPU.Build.0 = Release|Any CPU
{522EC1FF-C5F8-4136-A846-CD3E76B30A88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{522EC1FF-C5F8-4136-A846-CD3E76B30A88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{522EC1FF-C5F8-4136-A846-CD3E76B30A88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{522EC1FF-C5F8-4136-A846-CD3E76B30A88}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -52,7 +44,6 @@ Global
{2A5CFE2B-E743-4F9C-8BFF-416391A2F023} = {681E78B2-785A-4771-B7B9-9BC2D72A8856}
{FF5939B4-5925-40E4-8FB1-C40A6967FB9D} = {681E78B2-785A-4771-B7B9-9BC2D72A8856}
{00ED443E-1ACF-4F62-A9AB-D976AE39327C} = {681E78B2-785A-4771-B7B9-9BC2D72A8856}
{522EC1FF-C5F8-4136-A846-CD3E76B30A88} = {D94B18A3-92E9-4A34-945A-D262BBEF8229}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1FC32A05-93D1-4963-9B39-FDAB64CD0452}
Expand Down
4 changes: 4 additions & 0 deletions src/MedX.Data/Contexts/AppDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
#region Fluent API
base.OnModelCreating(modelBuilder);

modelBuilder.Entity<Patient>()
.Property(u => u.DateOfBirth)
.HasColumnType("timestamp");

modelBuilder.Entity<Appointment>()
.HasOne(d => d.Doctor)
.WithMany(a => a.Appointments)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace MedX.Data.Migrations
{
/// <inheritdoc />
public partial class InitialMig : Migration
public partial class InitialMigration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
Expand Down Expand Up @@ -46,25 +46,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
table.PrimaryKey("PK_Asset", x => x.Id);
});

migrationBuilder.CreateTable(
name: "CashDesks",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Description = table.Column<string>(type: "text", nullable: true),
Balance = table.Column<decimal>(type: "numeric", nullable: false),
AccountNumber = table.Column<string>(type: "text", nullable: true),
IsIncome = table.Column<bool>(type: "boolean", nullable: false),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CashDesks", x => x.Id);
});

migrationBuilder.CreateTable(
name: "Administrators",
columns: table => new
Expand Down Expand Up @@ -332,6 +313,33 @@ protected override void Up(MigrationBuilder migrationBuilder)
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateTable(
name: "CashDesks",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Amount = table.Column<decimal>(type: "numeric", nullable: true),
AccountNumber = table.Column<string>(type: "text", nullable: true),
Description = table.Column<string>(type: "text", nullable: true),
Balance = table.Column<decimal>(type: "numeric", nullable: false),
IsIncome = table.Column<bool>(type: "boolean", nullable: false),
PaymentId = table.Column<long>(type: "bigint", nullable: false),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CashDesks", x => x.Id);
table.ForeignKey(
name: "FK_CashDesks_Payments_PaymentId",
column: x => x.PaymentId,
principalTable: "Payments",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateIndex(
name: "IX_Administrators_ImageId",
table: "Administrators",
Expand All @@ -357,6 +365,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
table: "Appointments",
column: "PatientId");

migrationBuilder.CreateIndex(
name: "IX_CashDesks_PaymentId",
table: "CashDesks",
column: "PaymentId");

migrationBuilder.CreateIndex(
name: "IX_Doctors_ImageId",
table: "Doctors",
Expand Down Expand Up @@ -421,15 +434,15 @@ protected override void Down(MigrationBuilder migrationBuilder)
migrationBuilder.DropTable(
name: "MedicalRecords");

migrationBuilder.DropTable(
name: "Payments");

migrationBuilder.DropTable(
name: "Treatments");

migrationBuilder.DropTable(
name: "Affairs");

migrationBuilder.DropTable(
name: "Payments");

migrationBuilder.DropTable(
name: "Doctors");

Expand Down
Loading

0 comments on commit 20630f2

Please sign in to comment.