diff options
Diffstat (limited to 'backend/api')
-rw-r--r-- | backend/api/api/Data/MongoDbSettings.cs | 17 | ||||
-rw-r--r-- | backend/api/api/Models/User.cs | 18 | ||||
-rw-r--r-- | backend/api/api/Services/MongoDbService.cs | 11 | ||||
-rw-r--r-- | backend/api/api/api.csproj | 5 | ||||
-rw-r--r-- | backend/api/api/appsettings.json | 26 |
5 files changed, 67 insertions, 10 deletions
diff --git a/backend/api/api/Data/MongoDbSettings.cs b/backend/api/api/Data/MongoDbSettings.cs new file mode 100644 index 00000000..8b42a02c --- /dev/null +++ b/backend/api/api/Data/MongoDbSettings.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore; +using MongoDB.Driver; + +namespace api.Data +{ + public class MongoDbSettings + { + public string? ConnectionURI { get; set; } = null; + public string? DatabaseName { get; set; } = null; + public string? CollectionName { get; set; } = null; + + + + + + } +} diff --git a/backend/api/api/Models/User.cs b/backend/api/api/Models/User.cs new file mode 100644 index 00000000..d0f2bc0f --- /dev/null +++ b/backend/api/api/Models/User.cs @@ -0,0 +1,18 @@ +using System.ComponentModel.DataAnnotations; + +namespace api.Models +{ + public class User + { + [Key] + public Guid userId { get; set; } + public string username { get; set; } + public string email { get; set; } + public string password { get; set; } + + + public string firstName { get; set; } + public int lastName { get; set; } + + } +} diff --git a/backend/api/api/Services/MongoDbService.cs b/backend/api/api/Services/MongoDbService.cs new file mode 100644 index 00000000..f8b37536 --- /dev/null +++ b/backend/api/api/Services/MongoDbService.cs @@ -0,0 +1,11 @@ + + + +namespace api.Services +{ + public class MongoDbService + { + + + } +} diff --git a/backend/api/api/api.csproj b/backend/api/api/api.csproj index d2a5dd9d..1451fa77 100644 --- a/backend/api/api/api.csproj +++ b/backend/api/api/api.csproj @@ -12,4 +12,9 @@ <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.16.0" /> </ItemGroup> + <ItemGroup> + <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" /> + <PackageReference Include="MongoDB.Driver" Version="2.14.1" /> + </ItemGroup> + </Project> diff --git a/backend/api/api/appsettings.json b/backend/api/api/appsettings.json index 5d8e7156..b9144d93 100644 --- a/backend/api/api/appsettings.json +++ b/backend/api/api/appsettings.json @@ -1,12 +1,18 @@ { - "AppSettings": { - "JwtToken": "2mnttqPtRb4GIWHFtagm" - }, - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" + "AppSettings": { + "JwtToken": "2mnttqPtRb4GIWHFtagm" + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "MongoDb": { + "ConnectionURI": "mongodb+srv://LINKIKKKKKKK", + "DatabaseName": "", + "CollectionName": "" + + } } |