-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f5ab47
commit df8c3ab
Showing
11 changed files
with
207 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
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,14 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace CloudDrive.Dictionaries | ||
{ | ||
public enum OperationType | ||
{ | ||
[Display(Name = "Dodawanie")] | ||
Add = 0, | ||
[Display(Name = "Aktualizacja")] | ||
Update = 1, | ||
[Display(Name = "Usuwanie")] | ||
Remove = 2 | ||
} | ||
} |
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,13 @@ | ||
using CloudDrive.Dictionaries; | ||
|
||
namespace CloudDrive.Domain | ||
{ | ||
public class FileOperationsLogs | ||
{ | ||
public Guid Id { get; set; } | ||
public OperationType OperationType { get; set; } | ||
public DateTime Date { get; set; } | ||
public Guid UserFileId { get; set; } | ||
public virtual UserFile UserFile { get; set; } | ||
} | ||
} |
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
34 changes: 0 additions & 34 deletions
34
CloudDrive.EntityFramework/Migrations/MainDatabaseMigrations/20220314192017_Init.cs
This file was deleted.
Oops, something went wrong.
47 changes: 46 additions & 1 deletion
47
...igrations/20220314192017_Init.Designer.cs → ...igrations/20220428173942_Init.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
CloudDrive.EntityFramework/Migrations/MainDatabaseMigrations/20220428173942_Init.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,64 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace CloudDrive.EntityFramework.Migrations.MainDatabaseMigrations | ||
{ | ||
public partial class Init : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Files", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), | ||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false), | ||
Size = table.Column<long>(type: "bigint", nullable: false), | ||
FileVersion = table.Column<long>(type: "bigint", nullable: false), | ||
RelativePath = table.Column<string>(type: "nvarchar(max)", nullable: false), | ||
CreatedDate = table.Column<DateTime>(type: "datetime2", nullable: false), | ||
UpdatedDate = table.Column<DateTime>(type: "datetime2", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Files", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "FileOperationsLogs", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), | ||
OperationType = table.Column<int>(type: "int", nullable: false), | ||
Date = table.Column<DateTime>(type: "datetime2", nullable: false), | ||
UserFileId = table.Column<Guid>(type: "uniqueidentifier", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_FileOperationsLogs", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_FileOperationsLogs_Files_UserFileId", | ||
column: x => x.UserFileId, | ||
principalTable: "Files", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_FileOperationsLogs_UserFileId", | ||
table: "FileOperationsLogs", | ||
column: "UserFileId"); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "FileOperationsLogs"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Files"); | ||
} | ||
} | ||
} |
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