diff --git a/Backend/Account/Account.csproj b/Backend/Account/Account.csproj
index c09d84a..d4ae594 100644
--- a/Backend/Account/Account.csproj
+++ b/Backend/Account/Account.csproj
@@ -12,12 +12,16 @@
-
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
-
+
diff --git a/Backend/Account/Migrations/20240309121534_InitialCreate.Designer.cs b/Backend/Account/Migrations/20240309121534_InitialCreate.Designer.cs
new file mode 100644
index 0000000..2ae53e0
--- /dev/null
+++ b/Backend/Account/Migrations/20240309121534_InitialCreate.Designer.cs
@@ -0,0 +1,55 @@
+//
+using System;
+using Account.Repository.EFC;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace Account.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20240309121534_InitialCreate")]
+ partial class InitialCreate
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.2")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("Account.Repository.Entities.Account", b =>
+ {
+ b.Property("AccId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Balance")
+ .HasColumnType("decimal(18, 2)");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("PasswordHashed")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("SubscriptionValidUntil")
+ .HasColumnType("datetime(6)");
+
+ b.HasKey("AccId");
+
+ b.ToTable("Accounts");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Backend/Account/Migrations/20240309121534_InitialCreate.cs b/Backend/Account/Migrations/20240309121534_InitialCreate.cs
new file mode 100644
index 0000000..b85f068
--- /dev/null
+++ b/Backend/Account/Migrations/20240309121534_InitialCreate.cs
@@ -0,0 +1,43 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Account.Migrations
+{
+ ///
+ public partial class InitialCreate : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterDatabase()
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "Accounts",
+ columns: table => new
+ {
+ AccId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ Email = table.Column(type: "longtext", nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ PasswordHashed = table.Column(type: "longtext", nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Balance = table.Column(type: "decimal(18,2)", nullable: false),
+ SubscriptionValidUntil = table.Column(type: "datetime(6)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Accounts", x => x.AccId);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Accounts");
+ }
+ }
+}
diff --git a/Backend/Account/Migrations/DatabaseContextModelSnapshot.cs b/Backend/Account/Migrations/DatabaseContextModelSnapshot.cs
new file mode 100644
index 0000000..13ceec2
--- /dev/null
+++ b/Backend/Account/Migrations/DatabaseContextModelSnapshot.cs
@@ -0,0 +1,52 @@
+//
+using System;
+using Account.Repository.EFC;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace Account.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ partial class DatabaseContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.2")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("Account.Repository.Entities.Account", b =>
+ {
+ b.Property("AccId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Balance")
+ .HasColumnType("decimal(18, 2)");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("PasswordHashed")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("SubscriptionValidUntil")
+ .HasColumnType("datetime(6)");
+
+ b.HasKey("AccId");
+
+ b.ToTable("Accounts");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/.gitignore b/Backend/OpenVidStreamer.ManagementNdiscovary/.gitignore
new file mode 100644
index 0000000..b27e79b
--- /dev/null
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/.gitignore
@@ -0,0 +1 @@
+consul.exe
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checkpoint-signature b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checkpoint-signature
index c081602..813e270 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checkpoint-signature
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checkpoint-signature
@@ -1,4 +1,4 @@
-9c06faad-e0b5-e70f-ad18-d529049d8249
+941a1d78-bcf2-ce80-cdd2-4a444c786a39
This signature is a randomly generated UUID used to de-duplicate
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/d98c81909b08d3d417eb6424d3d605d1fb2e931f0ad2c9fd42b75c499a525cb1 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/28401e9c6265013efeb95f603a67903d6fa06f993737132e6c74f9684d4e2073
similarity index 82%
rename from Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/d98c81909b08d3d417eb6424d3d605d1fb2e931f0ad2c9fd42b75c499a525cb1
rename to Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/28401e9c6265013efeb95f603a67903d6fa06f993737132e6c74f9684d4e2073
index ede49d6..49a63e0 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/d98c81909b08d3d417eb6424d3d605d1fb2e931f0ad2c9fd42b75c499a525cb1
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/28401e9c6265013efeb95f603a67903d6fa06f993737132e6c74f9684d4e2073
@@ -1 +1 @@
-{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-18735830-2ff0-4d59-858d-775a2b16434f","Name":"Service 'OpenVisStreamer.RecommendationAlgo' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-18735830-2ff0-4d59-858d-775a2b16434f","ServiceName":"OpenVisStreamer.RecommendationAlgo","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5006/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
+{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-4fd79d63-818e-4aa3-a150-bba8aeac77c0","Name":"Service 'OpenVisStreamer.RecommendationAlgo' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-4fd79d63-818e-4aa3-a150-bba8aeac77c0","ServiceName":"OpenVisStreamer.RecommendationAlgo","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5006/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/7c28c7ae729d256ab887bf0163d8d5c7632b88e857ab37e55e9741dd3d253a0f b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/7c28c7ae729d256ab887bf0163d8d5c7632b88e857ab37e55e9741dd3d253a0f
new file mode 100644
index 0000000..e760d2b
--- /dev/null
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/7c28c7ae729d256ab887bf0163d8d5c7632b88e857ab37e55e9741dd3d253a0f
@@ -0,0 +1 @@
+{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-5a6d808b-1a1a-4dc1-9dcd-e999fa66863f","Name":"Service 'OpenVisStreamer.Upload' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-5a6d808b-1a1a-4dc1-9dcd-e999fa66863f","ServiceName":"OpenVisStreamer.Upload","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5008/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/954151230592812024c4d7f0c64e04df824b6d3249e93f386c724744fefffeaa b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/954151230592812024c4d7f0c64e04df824b6d3249e93f386c724744fefffeaa
new file mode 100644
index 0000000..cc1fc4b
--- /dev/null
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/954151230592812024c4d7f0c64e04df824b6d3249e93f386c724744fefffeaa
@@ -0,0 +1 @@
+{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-63aa5e41-def8-470d-b199-ecc62f1e8ff5","Name":"Service 'OpenVisStreamer.Upload' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-63aa5e41-def8-470d-b199-ecc62f1e8ff5","ServiceName":"OpenVisStreamer.Upload","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5008/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/9d35ebd061ca92b6a356396242fd6383c4663192a49d1a4f08ff92cf022a9d83 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/9d35ebd061ca92b6a356396242fd6383c4663192a49d1a4f08ff92cf022a9d83
new file mode 100644
index 0000000..23f4751
--- /dev/null
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/9d35ebd061ca92b6a356396242fd6383c4663192a49d1a4f08ff92cf022a9d83
@@ -0,0 +1 @@
+{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-2fac3c74-5694-47a2-89a0-45c7b13f824f","Name":"Service 'OpenVisStreamer.Upload' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-2fac3c74-5694-47a2-89a0-45c7b13f824f","ServiceName":"OpenVisStreamer.Upload","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5008/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a1c15452fbb80cdd7b4691f854e92c3258eb739b680f99ee615d3ed245a04cad b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a1c15452fbb80cdd7b4691f854e92c3258eb739b680f99ee615d3ed245a04cad
deleted file mode 100644
index cf1915b..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a1c15452fbb80cdd7b4691f854e92c3258eb739b680f99ee615d3ed245a04cad
+++ /dev/null
@@ -1 +0,0 @@
-{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-a03419f8-110e-4d0c-90c8-5205d43be024","Name":"Service 'OpenVisStreamer.Account' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-a03419f8-110e-4d0c-90c8-5205d43be024","ServiceName":"OpenVisStreamer.Account","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5005/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/7d910b191e1ef8b1f6c1cd58f070425fd71014a59e7b2f74286ed9b713ae1c03 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a70da4ce99367e8edb2d677028888aad5b6fa3eaf8e07ae42f539f632b8efb3d
similarity index 82%
rename from Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/7d910b191e1ef8b1f6c1cd58f070425fd71014a59e7b2f74286ed9b713ae1c03
rename to Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a70da4ce99367e8edb2d677028888aad5b6fa3eaf8e07ae42f539f632b8efb3d
index 9b6dfee..216b36b 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/7d910b191e1ef8b1f6c1cd58f070425fd71014a59e7b2f74286ed9b713ae1c03
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a70da4ce99367e8edb2d677028888aad5b6fa3eaf8e07ae42f539f632b8efb3d
@@ -1 +1 @@
-{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-f0e80451-b36e-4ea6-a517-7586cd2a271f","Name":"Service 'OpenVisStreamer.VideoLibrary' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-f0e80451-b36e-4ea6-a517-7586cd2a271f","ServiceName":"OpenVisStreamer.VideoLibrary","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5004/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
+{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-4fe37622-1df7-4a32-8cf0-775f254627ac","Name":"Service 'OpenVisStreamer.VideoLibrary' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-4fe37622-1df7-4a32-8cf0-775f254627ac","ServiceName":"OpenVisStreamer.VideoLibrary","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5004/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a785d6854fe8d828d2d96d784551ef7946659c0dc7abef0542dfe859a248699b b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a785d6854fe8d828d2d96d784551ef7946659c0dc7abef0542dfe859a248699b
deleted file mode 100644
index 129cefd..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/a785d6854fe8d828d2d96d784551ef7946659c0dc7abef0542dfe859a248699b
+++ /dev/null
@@ -1 +0,0 @@
-{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-c1ce918a-500e-4717-856b-01b0ef901539","Name":"Service 'OpenVisStreamer.Account' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-c1ce918a-500e-4717-856b-01b0ef901539","ServiceName":"OpenVisStreamer.Account","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5005/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/e20f1c0e59b938cce1d7aa862bc6e465738f8acd4466bd4f917a0e7e00383152 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/e20f1c0e59b938cce1d7aa862bc6e465738f8acd4466bd4f917a0e7e00383152
deleted file mode 100644
index 9918ea7..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/e20f1c0e59b938cce1d7aa862bc6e465738f8acd4466bd4f917a0e7e00383152
+++ /dev/null
@@ -1 +0,0 @@
-{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-e2664ccb-60d8-4245-9a5f-a3e553834c6c","Name":"Service 'OpenVisStreamer.Account' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-e2664ccb-60d8-4245-9a5f-a3e553834c6c","ServiceName":"OpenVisStreamer.Account","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5005/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/fb8b90e4f642e9f90bcb4a85af1075a25e12f0025b41a24dc592fffeadd5a4a2 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/fb8b90e4f642e9f90bcb4a85af1075a25e12f0025b41a24dc592fffeadd5a4a2
deleted file mode 100644
index 0db9fe4..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/checks/fb8b90e4f642e9f90bcb4a85af1075a25e12f0025b41a24dc592fffeadd5a4a2
+++ /dev/null
@@ -1 +0,0 @@
-{"Check":{"Node":"OpenVidStreamer.ManagementNdiscovary","CheckID":"service:ServiceName-raga70sRog-e1f28b1d-054b-4826-aa5f-100ca9d96664","Name":"Service 'OpenVisStreamer.VideoLibrary' check","Status":"critical","Notes":"","Output":"","ServiceID":"ServiceName-raga70sRog-e1f28b1d-054b-4826-aa5f-100ca9d96664","ServiceName":"OpenVisStreamer.VideoLibrary","ServiceTags":null,"Type":"http","Interval":"30s","Timeout":"","ExposedPort":0,"Definition":{},"CreateIndex":0,"ModifyIndex":0},"ChkType":{"CheckID":"","Name":"","Status":"","Notes":"","ScriptArgs":null,"HTTP":"https://localhost:5004/health","H2PING":"","H2PingUseTLS":false,"Header":null,"Method":"","Body":"","DisableRedirects":false,"TCP":"","TCPUseTLS":false,"UDP":"","Interval":30000000000,"AliasNode":"","AliasService":"","DockerContainerID":"","Shell":"","GRPC":"","GRPCUseTLS":false,"OSService":"","TLSServerName":"","TLSSkipVerify":false,"Timeout":0,"TTL":0,"SuccessBeforePassing":0,"FailuresBeforeWarning":0,"FailuresBeforeCritical":0,"ProxyHTTP":"","ProxyGRPC":"","DeregisterCriticalServiceAfter":0,"OutputMaxSize":0},"Token":"","Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/node-id b/Backend/OpenVidStreamer.ManagementNdiscovary/var/node-id
index adef436..9160998 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/node-id
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/node-id
@@ -1 +1 @@
-9dd4b92d-5da4-8eb5-9ba6-925d5d5a1a89
\ No newline at end of file
+f576fa39-64b7-f602-5f9b-025f9482fd86
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/raft/raft.db b/Backend/OpenVidStreamer.ManagementNdiscovary/var/raft/raft.db
index 1a11d8f..803c3cb 100644
Binary files a/Backend/OpenVidStreamer.ManagementNdiscovary/var/raft/raft.db and b/Backend/OpenVidStreamer.ManagementNdiscovary/var/raft/raft.db differ
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/local.snapshot b/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/local.snapshot
index e3c0e40..62aa0f0 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/local.snapshot
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/local.snapshot
@@ -2,5 +2,3 @@ alive: OpenVidStreamer.ManagementNdiscovary 127.0.0.1:8301
event-clock: 1
alive: OpenVidStreamer.ManagementNdiscovary 127.0.0.1:8301
event-clock: 2
-alive: OpenVidStreamer.ManagementNdiscovary 127.0.0.1:8301
-event-clock: 3
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/remote.snapshot b/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/remote.snapshot
index d246999..b6931a6 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/remote.snapshot
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/serf/remote.snapshot
@@ -1,3 +1,2 @@
alive: OpenVidStreamer.ManagementNdiscovary.dc1 127.0.0.1:8302
alive: OpenVidStreamer.ManagementNdiscovary.dc1 127.0.0.1:8302
-alive: OpenVidStreamer.ManagementNdiscovary.dc1 127.0.0.1:8302
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/server_metadata.json b/Backend/OpenVidStreamer.ManagementNdiscovary/var/server_metadata.json
index f7073d2..ce5a62c 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/server_metadata.json
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/server_metadata.json
@@ -1 +1 @@
-{"last_seen_unix":1709549896}
\ No newline at end of file
+{"last_seen_unix":1709993285}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/2a420e77efa2f8ef0df4a70c32ffdd6d327ee10d0d95a94258424b9d9562afed b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/0dbb407776d1a5582d38316d99864ed0a01541a2da323273deff156e78808d60
similarity index 66%
rename from Backend/OpenVidStreamer.ManagementNdiscovary/var/services/2a420e77efa2f8ef0df4a70c32ffdd6d327ee10d0d95a94258424b9d9562afed
rename to Backend/OpenVidStreamer.ManagementNdiscovary/var/services/0dbb407776d1a5582d38316d99864ed0a01541a2da323273deff156e78808d60
index 91ad215..fd4ba90 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/2a420e77efa2f8ef0df4a70c32ffdd6d327ee10d0d95a94258424b9d9562afed
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/0dbb407776d1a5582d38316d99864ed0a01541a2da323273deff156e78808d60
@@ -1 +1 @@
-{"Token":"","Service":{"ID":"ServiceName-raga70sRog-e1f28b1d-054b-4826-aa5f-100ca9d96664","Service":"OpenVisStreamer.VideoLibrary","Tags":null,"Address":"localhost","Meta":null,"Port":5004,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
+{"Token":"","Service":{"ID":"ServiceName-raga70sRog-4fe37622-1df7-4a32-8cf0-775f254627ac","Service":"OpenVisStreamer.VideoLibrary","Tags":null,"Address":"localhost","Meta":null,"Port":5004,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/1d0faa4aa9a9ca5bcd8ed486060fc09427b039198394caa28ecedae6f07ce570 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/1d0faa4aa9a9ca5bcd8ed486060fc09427b039198394caa28ecedae6f07ce570
new file mode 100644
index 0000000..4566090
--- /dev/null
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/1d0faa4aa9a9ca5bcd8ed486060fc09427b039198394caa28ecedae6f07ce570
@@ -0,0 +1 @@
+{"Token":"","Service":{"ID":"ServiceName-raga70sRog-2fac3c74-5694-47a2-89a0-45c7b13f824f","Service":"OpenVisStreamer.Upload","Tags":null,"Address":"localhost","Meta":null,"Port":5008,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/254ddcce871f14fdf0bdfde9e913ac2c5d51e04e842897ef449e6d5f23ec6cd2 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/254ddcce871f14fdf0bdfde9e913ac2c5d51e04e842897ef449e6d5f23ec6cd2
new file mode 100644
index 0000000..3e6da67
--- /dev/null
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/254ddcce871f14fdf0bdfde9e913ac2c5d51e04e842897ef449e6d5f23ec6cd2
@@ -0,0 +1 @@
+{"Token":"","Service":{"ID":"ServiceName-raga70sRog-63aa5e41-def8-470d-b199-ecc62f1e8ff5","Service":"OpenVisStreamer.Upload","Tags":null,"Address":"localhost","Meta":null,"Port":5008,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/3d6ba9950935f508270257c601794d47674bf8559add54dff2915deebf08dc8d b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/3d6ba9950935f508270257c601794d47674bf8559add54dff2915deebf08dc8d
deleted file mode 100644
index f1d1d51..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/3d6ba9950935f508270257c601794d47674bf8559add54dff2915deebf08dc8d
+++ /dev/null
@@ -1 +0,0 @@
-{"Token":"","Service":{"ID":"ServiceName-raga70sRog-a03419f8-110e-4d0c-90c8-5205d43be024","Service":"OpenVisStreamer.Account","Tags":null,"Address":"localhost","Meta":null,"Port":5005,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/3f1e91ccf7dd07dbd630622f0419e2e900df0a64ff7377a5cd28f07dac116bf1 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/3f1e91ccf7dd07dbd630622f0419e2e900df0a64ff7377a5cd28f07dac116bf1
deleted file mode 100644
index 72f9ac3..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/3f1e91ccf7dd07dbd630622f0419e2e900df0a64ff7377a5cd28f07dac116bf1
+++ /dev/null
@@ -1 +0,0 @@
-{"Token":"","Service":{"ID":"ServiceName-raga70sRog-c1ce918a-500e-4717-856b-01b0ef901539","Service":"OpenVisStreamer.Account","Tags":null,"Address":"localhost","Meta":null,"Port":5005,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/7c491de2f32779303f27ed88aa303458c5fc252877b875d79c2f2606ad32660d b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/7c491de2f32779303f27ed88aa303458c5fc252877b875d79c2f2606ad32660d
deleted file mode 100644
index 9421a68..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/7c491de2f32779303f27ed88aa303458c5fc252877b875d79c2f2606ad32660d
+++ /dev/null
@@ -1 +0,0 @@
-{"Token":"","Service":{"ID":"ServiceName-raga70sRog-f0e80451-b36e-4ea6-a517-7586cd2a271f","Service":"OpenVisStreamer.VideoLibrary","Tags":null,"Address":"localhost","Meta":null,"Port":5004,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/80aaf980b7797262f3b6dcd2695eb735c0e96a9c3bdac6299b4052ae1237a0ad b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/80aaf980b7797262f3b6dcd2695eb735c0e96a9c3bdac6299b4052ae1237a0ad
new file mode 100644
index 0000000..f0d51c8
--- /dev/null
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/80aaf980b7797262f3b6dcd2695eb735c0e96a9c3bdac6299b4052ae1237a0ad
@@ -0,0 +1 @@
+{"Token":"","Service":{"ID":"ServiceName-raga70sRog-5a6d808b-1a1a-4dc1-9dcd-e999fa66863f","Service":"OpenVisStreamer.Upload","Tags":null,"Address":"localhost","Meta":null,"Port":5008,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/6ddb3e575c2c2254ecf242d5f3ab3f0caa90284a7fa7307673b87aa68206f0c9 b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/b7e505470ca342b081f06c6dec9881752483dee1d13d29ffe41c8a8e6d266da3
similarity index 66%
rename from Backend/OpenVidStreamer.ManagementNdiscovary/var/services/6ddb3e575c2c2254ecf242d5f3ab3f0caa90284a7fa7307673b87aa68206f0c9
rename to Backend/OpenVidStreamer.ManagementNdiscovary/var/services/b7e505470ca342b081f06c6dec9881752483dee1d13d29ffe41c8a8e6d266da3
index 7e4bdf0..6f6fdf7 100644
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/6ddb3e575c2c2254ecf242d5f3ab3f0caa90284a7fa7307673b87aa68206f0c9
+++ b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/b7e505470ca342b081f06c6dec9881752483dee1d13d29ffe41c8a8e6d266da3
@@ -1 +1 @@
-{"Token":"","Service":{"ID":"ServiceName-raga70sRog-18735830-2ff0-4d59-858d-775a2b16434f","Service":"OpenVisStreamer.RecommendationAlgo","Tags":null,"Address":"localhost","Meta":null,"Port":5006,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
+{"Token":"","Service":{"ID":"ServiceName-raga70sRog-4fd79d63-818e-4aa3-a150-bba8aeac77c0","Service":"OpenVisStreamer.RecommendationAlgo","Tags":null,"Address":"localhost","Meta":null,"Port":5006,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/f2f6e93efe5816f2ac9773b410b0480e5cd481e7344f7f2bb3413ce2994c37bc b/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/f2f6e93efe5816f2ac9773b410b0480e5cd481e7344f7f2bb3413ce2994c37bc
deleted file mode 100644
index ec8ebea..0000000
--- a/Backend/OpenVidStreamer.ManagementNdiscovary/var/services/f2f6e93efe5816f2ac9773b410b0480e5cd481e7344f7f2bb3413ce2994c37bc
+++ /dev/null
@@ -1 +0,0 @@
-{"Token":"","Service":{"ID":"ServiceName-raga70sRog-e2664ccb-60d8-4245-9a5f-a3e553834c6c","Service":"OpenVisStreamer.Account","Tags":null,"Address":"localhost","Meta":null,"Port":5005,"Weights":{"Passing":1,"Warning":1},"EnableTagOverride":false,"Proxy":{"Mode":"","MeshGateway":{},"Expose":{}},"Connect":{},"PeerName":"","CreateIndex":0,"ModifyIndex":0},"Source":"remote"}
\ No newline at end of file
diff --git a/Backend/RecommendationAlgo/Migrations/20240309120844_InitialCreate.Designer.cs b/Backend/RecommendationAlgo/Migrations/20240309120844_InitialCreate.Designer.cs
new file mode 100644
index 0000000..acf6235
--- /dev/null
+++ b/Backend/RecommendationAlgo/Migrations/20240309120844_InitialCreate.Designer.cs
@@ -0,0 +1,82 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using RecommendationAlgo.Repository.EFC;
+
+#nullable disable
+
+namespace RecommendationAlgo.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20240309120844_InitialCreate")]
+ partial class InitialCreate
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.2")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("RecommendationAlgo.Repository.Entities.VideoStats", b =>
+ {
+ b.Property("VideoId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Category")
+ .HasColumnType("int");
+
+ b.Property("VideoLength")
+ .HasColumnType("decimal(65,30)");
+
+ b.HasKey("VideoId");
+
+ b.ToTable("VideoStats");
+ });
+
+ modelBuilder.Entity("RecommendationAlgo.Repository.Entities.WatchHistory", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0);
+
+ b.Property("VideoId")
+ .HasColumnType("char(36)")
+ .HasColumnOrder(1);
+
+ b.Property("FullyWatched")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Liked")
+ .HasColumnType("int");
+
+ b.Property("WatchedTime")
+ .HasColumnType("decimal(18, 2)");
+
+ b.HasKey("UserId", "VideoId");
+
+ b.HasIndex("VideoId");
+
+ b.ToTable("WatchHistories");
+ });
+
+ modelBuilder.Entity("RecommendationAlgo.Repository.Entities.WatchHistory", b =>
+ {
+ b.HasOne("RecommendationAlgo.Repository.Entities.VideoStats", null)
+ .WithMany()
+ .HasForeignKey("VideoId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Backend/RecommendationAlgo/Migrations/20240309120844_InitialCreate.cs b/Backend/RecommendationAlgo/Migrations/20240309120844_InitialCreate.cs
new file mode 100644
index 0000000..786c56b
--- /dev/null
+++ b/Backend/RecommendationAlgo/Migrations/20240309120844_InitialCreate.cs
@@ -0,0 +1,69 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace RecommendationAlgo.Migrations
+{
+ ///
+ public partial class InitialCreate : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterDatabase()
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "VideoStats",
+ columns: table => new
+ {
+ VideoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ VideoLength = table.Column(type: "decimal(65,30)", nullable: false),
+ Category = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_VideoStats", x => x.VideoId);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "WatchHistories",
+ columns: table => new
+ {
+ UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ VideoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ WatchedTime = table.Column(type: "decimal(18,2)", nullable: false),
+ Liked = table.Column(type: "int", nullable: false),
+ FullyWatched = table.Column(type: "tinyint(1)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_WatchHistories", x => new { x.UserId, x.VideoId });
+ table.ForeignKey(
+ name: "FK_WatchHistories_VideoStats_VideoId",
+ column: x => x.VideoId,
+ principalTable: "VideoStats",
+ principalColumn: "VideoId",
+ onDelete: ReferentialAction.Cascade);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_WatchHistories_VideoId",
+ table: "WatchHistories",
+ column: "VideoId");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "WatchHistories");
+
+ migrationBuilder.DropTable(
+ name: "VideoStats");
+ }
+ }
+}
diff --git a/Backend/RecommendationAlgo/Migrations/DatabaseContextModelSnapshot.cs b/Backend/RecommendationAlgo/Migrations/DatabaseContextModelSnapshot.cs
new file mode 100644
index 0000000..3e39e87
--- /dev/null
+++ b/Backend/RecommendationAlgo/Migrations/DatabaseContextModelSnapshot.cs
@@ -0,0 +1,79 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using RecommendationAlgo.Repository.EFC;
+
+#nullable disable
+
+namespace RecommendationAlgo.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ partial class DatabaseContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.2")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("RecommendationAlgo.Repository.Entities.VideoStats", b =>
+ {
+ b.Property("VideoId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Category")
+ .HasColumnType("int");
+
+ b.Property("VideoLength")
+ .HasColumnType("decimal(65,30)");
+
+ b.HasKey("VideoId");
+
+ b.ToTable("VideoStats");
+ });
+
+ modelBuilder.Entity("RecommendationAlgo.Repository.Entities.WatchHistory", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0);
+
+ b.Property("VideoId")
+ .HasColumnType("char(36)")
+ .HasColumnOrder(1);
+
+ b.Property("FullyWatched")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Liked")
+ .HasColumnType("int");
+
+ b.Property("WatchedTime")
+ .HasColumnType("decimal(18, 2)");
+
+ b.HasKey("UserId", "VideoId");
+
+ b.HasIndex("VideoId");
+
+ b.ToTable("WatchHistories");
+ });
+
+ modelBuilder.Entity("RecommendationAlgo.Repository.Entities.WatchHistory", b =>
+ {
+ b.HasOne("RecommendationAlgo.Repository.Entities.VideoStats", null)
+ .WithMany()
+ .HasForeignKey("VideoId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Backend/RecommendationAlgo/Program.cs b/Backend/RecommendationAlgo/Program.cs
index 49dd80b..f92c252 100644
--- a/Backend/RecommendationAlgo/Program.cs
+++ b/Backend/RecommendationAlgo/Program.cs
@@ -5,6 +5,7 @@
using RecommendationAlgo.MessageConsumers;
using RecommendationAlgo.Repository;
using RecommendationAlgo.Repository.EFC;
+using Microsoft.EntityFrameworkCore.Design;
var builder = WebApplication.CreateBuilder(args);
diff --git a/Backend/RecommendationAlgo/RecommendationAlgo.csproj b/Backend/RecommendationAlgo/RecommendationAlgo.csproj
index 4daecc2..228b66e 100644
--- a/Backend/RecommendationAlgo/RecommendationAlgo.csproj
+++ b/Backend/RecommendationAlgo/RecommendationAlgo.csproj
@@ -13,6 +13,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/Backend/RecommendationAlgo/appsettings.json b/Backend/RecommendationAlgo/appsettings.json
index 01a86bd..58322ee 100644
--- a/Backend/RecommendationAlgo/appsettings.json
+++ b/Backend/RecommendationAlgo/appsettings.json
@@ -6,7 +6,7 @@
}
},
"ConnectionStrings": {
- "DefaultConnection": "server=statistics-db-service;uid=admin;pwd=12345;database=StatisticsDB;"
+ "DefaultConnection": "server=statistics-db-service;uid=root;database=StatisticsDB;"
},
"AllowedHosts": "*",
"consulUri": "http://consul-service:8500",
diff --git a/Backend/RecommendationAlgo/render-deployment.yaml b/Backend/RecommendationAlgo/recommendationAlgo-deployment.yaml
similarity index 100%
rename from Backend/RecommendationAlgo/render-deployment.yaml
rename to Backend/RecommendationAlgo/recommendationAlgo-deployment.yaml
diff --git a/Backend/RecommendationAlgo/render-hpa.yaml b/Backend/RecommendationAlgo/recommendationAlgo-hpa.yaml
similarity index 100%
rename from Backend/RecommendationAlgo/render-hpa.yaml
rename to Backend/RecommendationAlgo/recommendationAlgo-hpa.yaml
diff --git a/Backend/RecommendationAlgo/render-service.yaml b/Backend/RecommendationAlgo/recommendationAlgo-service.yaml
similarity index 100%
rename from Backend/RecommendationAlgo/render-service.yaml
rename to Backend/RecommendationAlgo/recommendationAlgo-service.yaml
diff --git a/Backend/Upload/Controllers/UploadController.cs b/Backend/Upload/Controllers/UploadController.cs
index 9e71c0a..ca97d4c 100644
--- a/Backend/Upload/Controllers/UploadController.cs
+++ b/Backend/Upload/Controllers/UploadController.cs
@@ -18,9 +18,9 @@ public class UploadController(UploadService uploadService) :ControllerBase
///
[HttpPost("upload")]
public async Task UploadVideoWithMetadata(
- [FromForm] string videoMetadata,
- [FromForm] IFormFile videoFile,
- [FromForm] IFormFile thumbnailFile)
+ [FromForm] string videoMetadata,
+ IFormFile videoFile,
+ IFormFile thumbnailFile)
{
var accId = AccIdExtractorFromHttpContext.GetAccId(HttpContext);
diff --git a/Backend/Upload/Program.cs b/Backend/Upload/Program.cs
index f7d1ed8..afa0ea5 100644
--- a/Backend/Upload/Program.cs
+++ b/Backend/Upload/Program.cs
@@ -6,13 +6,10 @@
// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
-builder.Services.AddEndpointsApiExplorer();
-builder.Services.AddSwaggerGen();
builder.Services.AddScoped();
builder.Services.AddHealthChecks();
builder.Services.AddControllers();
-
builder.Services.AddMassTransit(busConfigurator =>
{
busConfigurator.SetKebabCaseEndpointNameFormatter();
@@ -28,6 +25,9 @@
});
+builder.Services.AddEndpointsApiExplorer();
+builder.Services.AddSwaggerGen();
+
var app = builder.Build();
// Configure the HTTP request pipeline.
@@ -38,6 +38,7 @@
}
app.UseHttpsRedirection();
+app.MapControllers();
ConsulRegisterer.Register(app, app.Environment, app.Lifetime, builder.Configuration);
diff --git a/Backend/Upload/appsettings.Development.json b/Backend/Upload/appsettings.Development.json
index 8e4cb07..61a57b8 100644
--- a/Backend/Upload/appsettings.Development.json
+++ b/Backend/Upload/appsettings.Development.json
@@ -9,7 +9,7 @@
"PVstorageBucketPath": "D:\\PRJ\\OpenVidStreamer\\DEVstorageBucket",
"RabbitMQ":{
- "HostAddress": "amqp://localhost:5672",
+ "HostAddress": "amqp://127.0.0.1:5672",
"UserName": "guest",
"Password": "guest"
},
diff --git a/Backend/VideoLibrary/Controllers/VideoController.cs b/Backend/VideoLibrary/Controllers/VideoController.cs
index 0a8b596..fe51e1e 100644
--- a/Backend/VideoLibrary/Controllers/VideoController.cs
+++ b/Backend/VideoLibrary/Controllers/VideoController.cs
@@ -27,7 +27,7 @@ public async Task>> GetRecommendedVideos(VideoCatego
public async Task> GetVideoById(Guid id)
{
var video = await _videoService.GetVideoById(id);
- if (video == null)
+ if (video is null)
{
return NotFound();
}
diff --git a/Backend/VideoLibrary/Migrations/20240309122752_InitialCreate.Designer.cs b/Backend/VideoLibrary/Migrations/20240309122752_InitialCreate.Designer.cs
new file mode 100644
index 0000000..dc16934
--- /dev/null
+++ b/Backend/VideoLibrary/Migrations/20240309122752_InitialCreate.Designer.cs
@@ -0,0 +1,73 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using OpenVisStreamer.VideoLibrary.Repository.EFC;
+
+#nullable disable
+
+namespace OpenVisStreamer.VideoLibrary.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20240309122752_InitialCreate")]
+ partial class InitialCreate
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.2")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("OpenVisStreamer.VideoLibrary.Repository.Entities.Video", b =>
+ {
+ b.Property("VideoId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Category")
+ .HasColumnType("int");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("IsPublic")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ThumbnailUri")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("UploadDateTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("VideoUri")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("uploadedByAccoutId")
+ .HasColumnType("char(36)");
+
+ b.Property("videoLength")
+ .HasColumnType("decimal(18, 2)");
+
+ b.HasKey("VideoId");
+
+ b.ToTable("Videos");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Backend/VideoLibrary/Migrations/20240309122752_InitialCreate.cs b/Backend/VideoLibrary/Migrations/20240309122752_InitialCreate.cs
new file mode 100644
index 0000000..8525463
--- /dev/null
+++ b/Backend/VideoLibrary/Migrations/20240309122752_InitialCreate.cs
@@ -0,0 +1,50 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace OpenVisStreamer.VideoLibrary.Migrations
+{
+ ///
+ public partial class InitialCreate : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterDatabase()
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "Videos",
+ columns: table => new
+ {
+ VideoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ Title = table.Column(type: "varchar(255)", maxLength: 255, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Description = table.Column(type: "longtext", nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ Category = table.Column(type: "int", nullable: false),
+ videoLength = table.Column(type: "decimal(18,2)", nullable: false),
+ VideoUri = table.Column(type: "longtext", nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ ThumbnailUri = table.Column(type: "longtext", nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ uploadedByAccoutId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ UploadDateTime = table.Column(type: "datetime(6)", nullable: false),
+ IsPublic = table.Column(type: "tinyint(1)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Videos", x => x.VideoId);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Videos");
+ }
+ }
+}
diff --git a/Backend/VideoLibrary/Migrations/DatabaseContextModelSnapshot.cs b/Backend/VideoLibrary/Migrations/DatabaseContextModelSnapshot.cs
new file mode 100644
index 0000000..d9592a7
--- /dev/null
+++ b/Backend/VideoLibrary/Migrations/DatabaseContextModelSnapshot.cs
@@ -0,0 +1,70 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using OpenVisStreamer.VideoLibrary.Repository.EFC;
+
+#nullable disable
+
+namespace OpenVisStreamer.VideoLibrary.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ partial class DatabaseContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.2")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("OpenVisStreamer.VideoLibrary.Repository.Entities.Video", b =>
+ {
+ b.Property("VideoId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Category")
+ .HasColumnType("int");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("IsPublic")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ThumbnailUri")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("UploadDateTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("VideoUri")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("uploadedByAccoutId")
+ .HasColumnType("char(36)");
+
+ b.Property("videoLength")
+ .HasColumnType("decimal(18, 2)");
+
+ b.HasKey("VideoId");
+
+ b.ToTable("Videos");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Backend/VideoLibrary/Model/Mappers/VideoMapper.cs b/Backend/VideoLibrary/Model/Mappers/VideoMapper.cs
index 4a27086..87277f5 100644
--- a/Backend/VideoLibrary/Model/Mappers/VideoMapper.cs
+++ b/Backend/VideoLibrary/Model/Mappers/VideoMapper.cs
@@ -6,5 +6,7 @@ namespace OpenVisStreamer.VideoLibrary.Model.Mappers;
[Mapper]
public partial class VideoMapper
{
- public partial VideoDTO VideoToVideoDto(Video video);
+
+
+ public partial VideoDTO? VideoToVideoDto(Video video);
}
\ No newline at end of file
diff --git a/Backend/VideoLibrary/Program.cs b/Backend/VideoLibrary/Program.cs
index 532934a..5405472 100644
--- a/Backend/VideoLibrary/Program.cs
+++ b/Backend/VideoLibrary/Program.cs
@@ -1,16 +1,30 @@
using Consul;
using MassTransit;
+using Microsoft.EntityFrameworkCore;
using OpenVisStreamer.VideoLibrary;
using OpenVisStreamer.VideoLibrary.MessageConsumers;
+using OpenVisStreamer.VideoLibrary.Repository;
+using OpenVisStreamer.VideoLibrary.Repository.EFC;
+using OpenVisStreamer.VideoLibrary.Services;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
+
+
+builder.Services.AddDbContext(options =>
+ options.UseMySql(builder.Configuration.GetConnectionString("DefaultConnection"),
+ new MariaDbServerVersion(new Version(10, 4, 24))));
+
+builder.Services.AddScoped();
+builder.Services.AddScoped();
+builder.Services.AddControllers();
+
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddHealthChecks();
-builder.Services.AddControllers();
+
builder.Services.AddMassTransit(busConfigurator =>
{
busConfigurator.SetKebabCaseEndpointNameFormatter();
diff --git a/Backend/VideoLibrary/Services/VideoService.cs b/Backend/VideoLibrary/Services/VideoService.cs
index f10450c..9b0c826 100644
--- a/Backend/VideoLibrary/Services/VideoService.cs
+++ b/Backend/VideoLibrary/Services/VideoService.cs
@@ -20,9 +20,12 @@ public VideoService(VideoRepository videoRepository, IBus bus)
}
- public async Task GetVideoById(Guid videoId)
+ public async Task GetVideoById(Guid videoId)
{
var video = await _videoRepository.GetVideoById(videoId);
+ if (video is null)
+ return null;
+
return _videoMapper.VideoToVideoDto(video);
}
diff --git a/Backend/VideoLibrary/VideoLibrary.csproj b/Backend/VideoLibrary/VideoLibrary.csproj
index c021dc2..ad5fa94 100644
--- a/Backend/VideoLibrary/VideoLibrary.csproj
+++ b/Backend/VideoLibrary/VideoLibrary.csproj
@@ -12,10 +12,14 @@
-
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
-
+
diff --git a/Backend/VideoLibrary/appsettings.Development.json b/Backend/VideoLibrary/appsettings.Development.json
index eda1b69..8f7bdd4 100644
--- a/Backend/VideoLibrary/appsettings.Development.json
+++ b/Backend/VideoLibrary/appsettings.Development.json
@@ -6,7 +6,7 @@
}
},
"ConnectionStrings": {
- "DefaultConnection": "server=127.0.0.1;uid=admin;pwd=12345;database=videolibDB;"
+ "DefaultConnection": "server=127.0.0.1;uid=root;database=videolibDB;"
},
"AllowedHosts": "*",
"consulUri": "http://localhost:8500",