Index: ditorconfig
===================================================================
--- .editorconfig	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,4 +1,0 @@
-﻿[*.cs]
-
-# CS8600: Converting null literal or possible null value to non-nullable type.
-dotnet_diagnostic.CS8600.severity = none
Index: itattributes
===================================================================
--- .gitattributes	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,63 +1,0 @@
-###############################################################################
-# Set default behavior to automatically normalize line endings.
-###############################################################################
-* text=auto
-
-###############################################################################
-# Set default behavior for command prompt diff.
-#
-# This is need for earlier builds of msysgit that does not have it on by
-# default for csharp files.
-# Note: This is only used by command line
-###############################################################################
-#*.cs     diff=csharp
-
-###############################################################################
-# Set the merge driver for project and solution files
-#
-# Merging from the command prompt will add diff markers to the files if there
-# are conflicts (Merging from VS is not affected by the settings below, in VS
-# the diff markers are never inserted). Diff markers may cause the following 
-# file extensions to fail to load in VS. An alternative would be to treat
-# these files as binary and thus will always conflict and require user
-# intervention with every merge. To do so, just uncomment the entries below
-###############################################################################
-#*.sln       merge=binary
-#*.csproj    merge=binary
-#*.vbproj    merge=binary
-#*.vcxproj   merge=binary
-#*.vcproj    merge=binary
-#*.dbproj    merge=binary
-#*.fsproj    merge=binary
-#*.lsproj    merge=binary
-#*.wixproj   merge=binary
-#*.modelproj merge=binary
-#*.sqlproj   merge=binary
-#*.wwaproj   merge=binary
-
-###############################################################################
-# behavior for image files
-#
-# image files are treated as binary by default.
-###############################################################################
-#*.jpg   binary
-#*.png   binary
-#*.gif   binary
-
-###############################################################################
-# diff behavior for common document formats
-# 
-# Convert binary document formats to text before diffing them. This feature
-# is only available from the command line. Turn it on by uncommenting the 
-# entries below.
-###############################################################################
-#*.doc   diff=astextplain
-#*.DOC   diff=astextplain
-#*.docx  diff=astextplain
-#*.DOCX  diff=astextplain
-#*.dot   diff=astextplain
-#*.DOT   diff=astextplain
-#*.pdf   diff=astextplain
-#*.PDF   diff=astextplain
-#*.rtf   diff=astextplain
-#*.RTF   diff=astextplain
Index: itignore
===================================================================
--- .gitignore	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,363 +1,0 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-##
-## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
-
-# User-specific files
-*.rsuser
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Mono auto generated files
-mono_crash.*
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-[Ww][Ii][Nn]32/
-[Aa][Rr][Mm]/
-[Aa][Rr][Mm]64/
-bld/
-[Bb]in/
-[Oo]bj/
-[Oo]ut/
-[Ll]og/
-[Ll]ogs/
-
-# Visual Studio 2015/2017 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# Visual Studio 2017 auto generated files
-Generated\ Files/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUnit
-*.VisualState.xml
-TestResult.xml
-nunit-*.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# Benchmark Results
-BenchmarkDotNet.Artifacts/
-
-# .NET Core
-project.lock.json
-project.fragment.lock.json
-artifacts/
-
-# ASP.NET Scaffolding
-ScaffoldingReadMe.txt
-
-# StyleCop
-StyleCopReport.xml
-
-# Files built by Visual Studio
-*_i.c
-*_p.c
-*_h.h
-*.ilk
-*.meta
-*.obj
-*.iobj
-*.pch
-*.pdb
-*.ipdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*_wpftmp.csproj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# NuGet Symbol Packages
-*.snupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-*.appxbundle
-*.appxupload
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!?*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-*- [Bb]ackup.rdl
-*- [Bb]ackup ([0-9]).rdl
-*- [Bb]ackup ([0-9][0-9]).rdl
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# CodeRush personal settings
-.cr/personal
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-# Local History for Visual Studio
-.localhistory/
-
-# BeatPulse healthcheck temp database
-healthchecksdb
-
-# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
-
-# Ionide (cross platform F# VS Code tools) working folder
-.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
Index: ckend/Controllers/ReservationsController.cs
===================================================================
--- backend/Controllers/ReservationsController.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,36 +1,0 @@
-﻿namespace backend.Controllers;
-
-using backend.DTOs;
-using backend.Entities;
-using backend.Helpers;
-using backend.Models;
-using backend.Services;
-using Microsoft.AspNetCore.Mvc;
-using System.Security.Claims;
-
-[ApiController]
-[Route("[controller]")]
-public class ReservationsController : ControllerBase
-{
-    private readonly IReservationService _reservationService = null;
-
-    public ReservationsController(IReservationService reservationService)
-    {
-        _reservationService = reservationService;
-    }
-
-    [HttpPost()]
-    public async Task<IActionResult> CreateReservation([FromBody] CreateReservationRequest req)
-    {
-        await _reservationService.CreateReservation(req);
-        return Ok();
-    }
-
-    [Authorize]
-    [HttpPut("{rid}")]
-    public async Task<IActionResult> ChangeStatus(int rid, [FromQuery] ReservationStatus status)
-    {
-        await _reservationService.ChangeReservationStatus(rid, status);
-        return Ok();
-    }
-}
Index: ckend/Controllers/RestaurantsController.cs
===================================================================
--- backend/Controllers/RestaurantsController.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,39 +1,0 @@
-﻿namespace backend.Controllers;
-
-using backend.DTOs;
-using backend.Entities;
-using backend.Helpers;
-using backend.Models;
-using backend.Services;
-using Microsoft.AspNetCore.Mvc;
-using System.Security.Claims;
-
-[ApiController]
-[Route("[controller]")]
-public class RestaurantsController : ControllerBase
-{
-    private readonly IRestaurantService _restaurantService = null;
-
-    public RestaurantsController(IRestaurantService restaurantService)
-    {
-        _restaurantService = restaurantService;
-    }
-
-    [Authorize]
-    [HttpPost()]
-    public async Task<IActionResult> CreateRestaurant([FromQuery] string title)
-    {
-        var userId = (int) this.HttpContext.Items["User"];
-        await _restaurantService.CreateRestaurant(title, userId);
-
-
-        return Ok();
-    }
-
-    [HttpGet()]
-    public async Task<RestaurantResponse> GetRestaurant()
-    {
-        var response = await _restaurantService.GetRestaurant();
-        return response;
-    }
-}
Index: ckend/Controllers/UsersController.cs
===================================================================
--- backend/Controllers/UsersController.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,37 +1,0 @@
-﻿namespace backend.Controllers;
-
-using backend.DTOs;
-using backend.Helpers;
-using backend.Models;
-using backend.Services;
-using Microsoft.AspNetCore.Mvc;
-
-[ApiController]
-[Route("[controller]")]
-public class UsersController : ControllerBase
-{
-    private readonly IUserService _userService = null;
-
-    public UsersController(IUserService userService)
-    {
-        _userService = userService;
-    }
-
-    [HttpPost("login")]
-    public async Task<AuthenticateResponse> Authenticate(AuthenticateRequest model)
-    {
-        var response = await _userService.Authenticate(model);
-
-        if (response == null)
-            throw new Exception("Email or password is incorrect");
-
-        return response;
-    }
-
-    [HttpPost("register")]
-    public async Task<AuthenticateResponse> Register(CreateUserRequest req)
-    {
-        var response = await _userService.Register(req);
-        return response;
-    }
-}
Index: ckend/DTOs/AuthenticateRequest.cs
===================================================================
--- backend/DTOs/AuthenticateRequest.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,12 +1,0 @@
-namespace backend.Models;
-
-using System.ComponentModel.DataAnnotations;
-
-public class AuthenticateRequest
-{
-    [Required]
-    public string Email { get; set; }
-
-    [Required]
-    public string Password { get; set; }
-}
Index: ckend/DTOs/AuthenticateResponse.cs
===================================================================
--- backend/DTOs/AuthenticateResponse.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,15 +1,0 @@
-using backend.Entities;
-using Newtonsoft.Json;
-
-namespace backend.Models;
-
-
-public class AuthenticateResponse
-{
-    [JsonProperty]
-    public int Id { get; set; }
-    [JsonProperty]
-    public string Email { get; set; }
-    [JsonProperty]
-    public string Token { get; set; }
-}
Index: ckend/DTOs/CreateReservationRequest.cs
===================================================================
--- backend/DTOs/CreateReservationRequest.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,27 +1,0 @@
-﻿using backend.Entities;
-using Newtonsoft.Json;
-
-namespace backend.DTOs
-{
-    public class CreateReservationRequest
-    {
-        [JsonRequired]
-        [JsonProperty]
-        public DateTime StartDate { get; set; }
-        [JsonRequired]
-        [JsonProperty]
-        public ReservationPlace ReservationPlace { get; set; }
-        [JsonRequired]
-        [JsonProperty]
-        public ReservationType ReservationType { get; set; }
-        [JsonRequired]
-        [JsonProperty]
-        public int Persons { get; set; }
-        [JsonRequired]
-        [JsonProperty]
-        public string ContactName { get; set; }
-        [JsonRequired]
-        [JsonProperty]
-        public string ContactNumber { get; set; }
-    }
-}
Index: ckend/DTOs/CreateUserRequest.cs
===================================================================
--- backend/DTOs/CreateUserRequest.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,13 +1,0 @@
-﻿using Newtonsoft.Json;
-
-namespace backend.DTOs
-{
-    public class CreateUserRequest
-    {
-        [JsonProperty]
-        public string Email { get; set; }
-
-        [JsonProperty]
-        public string Password { get; set; }
-    }
-}
Index: ckend/DTOs/ReservationResponse.cs
===================================================================
--- backend/DTOs/ReservationResponse.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,25 +1,0 @@
-﻿using backend.Entities;
-using Newtonsoft.Json;
-
-namespace backend.DTOs
-{
-    public class ReservationResponse
-    {
-        [JsonProperty]
-        public int Id { get; set; }
-        [JsonProperty]
-        public DateTime StartDate { get; set; }
-        [JsonProperty]
-        public ReservationPlace ReservationPlace { get; set; }
-        [JsonProperty]
-        public ReservationStatus ReservationStatus { get; set; }
-        [JsonProperty]
-        public ReservationType ReservationType { get; set; }
-        [JsonProperty]
-        public int Persons { get; set; }
-        [JsonProperty]
-        public string ContactName { get; set; }
-        [JsonProperty]
-        public string ContactNumber { get; set; }
-    }
-}
Index: ckend/DTOs/RestaurantResponse.cs
===================================================================
--- backend/DTOs/RestaurantResponse.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,16 +1,0 @@
-﻿using Newtonsoft.Json;
-
-namespace backend.DTOs
-{
-    public class RestaurantResponse
-    {
-        [JsonProperty]
-        public int Id { get; set; }
-        [JsonProperty]
-        public int? OwnerId { get; set; }
-        [JsonProperty]
-        public List<ReservationResponse> Reservations { get; set; }
-        [JsonProperty]
-        public string Name { get; set; }
-    }
-}
Index: ckend/Data/DataContext.cs
===================================================================
--- backend/Data/DataContext.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,86 +1,0 @@
-﻿using backend.Entities;
-using Microsoft.EntityFrameworkCore;
-
-namespace backend.Data
-{
-    public class DataContext : DbContext
-    {
-        public DataContext(DbContextOptions<DataContext> dbContextOptions) : base(dbContextOptions)
-        {
-        }
-
-        private DbSet<User> users;
-        public DbSet<User> Users
-        {
-            get
-            {
-                if (users == null)
-                {
-                    users = Set<User>();
-                }
-
-                return users;
-            }
-        }
-
-        private DbSet<Restaurant> restaurants;
-        public DbSet<Restaurant> Restoraunts
-        {
-            get
-            {
-                if (restaurants == null)
-                {
-                    restaurants = Set<Restaurant>();
-                }
-
-                return restaurants;
-            }
-        }
-
-        private DbSet<Reservation> reservations;
-        public DbSet<Reservation> Reservations
-        {
-            get
-            { 
-                if (reservations == null)
-                {
-                    reservations = Set<Reservation>();
-                }
-
-                return reservations;
-            }
-        }
-
-
-        protected override void OnModelCreating(ModelBuilder modelBuilder)
-        {
-            //
-            // User
-            // 
-            modelBuilder.Entity<User>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd();
-            modelBuilder.Entity<User>()
-            .HasOne(p => p.Restaurant)
-            .WithOne(b => b.Owner);
-
-            //
-            // Restoraunt
-            // 
-            modelBuilder.Entity<Restaurant>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd();
-            modelBuilder.Entity<Restaurant>()
-            .HasOne(p => p.Owner)
-            .WithOne(b => b.Restaurant)
-            .HasForeignKey<Restaurant>(k => k.OwnerFk);
-            modelBuilder.Entity<Restaurant>()
-            .HasMany(p => p.Reservations)
-            .WithOne(b => b.Restaurant);
-
-            //
-            // Reservation
-            // 
-            modelBuilder.Entity<Reservation>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd();
-            modelBuilder.Entity<Reservation>()
-            .HasOne(p => p.Restaurant)
-            .WithMany(b => b.Reservations);
-        }
-    }
-}
Index: ckend/Entities/Reservation.cs
===================================================================
--- backend/Entities/Reservation.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,21 +1,0 @@
-﻿using Newtonsoft.Json;
-
-namespace backend.Entities
-{
-    public class Reservation
-    {
-        public int Id { get; set; }
-        public DateTime StartDate { get; set; }
-        public int Persons { get; set; }
-        public virtual Restaurant Restaurant { get; set; }
-        public ReservationPlace ReservationPlace { get; set; }
-        public ReservationStatus ReservationStatus { get; set; }
-        public ReservationType ReservationType { get; set; }
-        public string ContactName { get; set; }
-        public string ContactNumber { get; set; }
-    }
-
-    public enum ReservationType { Short, Long, Event }
-    public enum ReservationPlace { Outside, Inside}
-    public enum ReservationStatus { New, Confirmed, Cancelled }
-}
Index: ckend/Entities/Restaurant.cs
===================================================================
--- backend/Entities/Restaurant.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,13 +1,0 @@
-﻿using Newtonsoft.Json;
-
-namespace backend.Entities
-{
-    public class Restaurant
-    {
-        public int Id { get; set; }
-        public int? OwnerFk { get; set; }
-        public virtual User Owner { get; set; }
-        public virtual ICollection<Reservation> Reservations { get; set; }
-        public string Name { get; set; }
-    }
-}
Index: ckend/Entities/User.cs
===================================================================
--- backend/Entities/User.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,12 +1,0 @@
-using Newtonsoft.Json;
-
-namespace backend.Entities;
-
-public class User
-{
-    public int Id { get; set; }
-    public string Email { get; set; }
-    public string Password { get; set; }
-    [JsonIgnore]
-    public virtual Restaurant Restaurant { get; set; }
-}
Index: ckend/Helpers/AppSettings.cs
===================================================================
--- backend/Helpers/AppSettings.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,6 +1,0 @@
-namespace backend.Helpers;
-
-public class AppSettings
-{
-    public string Secret { get; set; }
-}
Index: ckend/Helpers/AuthorizeAttribute.cs
===================================================================
--- backend/Helpers/AuthorizeAttribute.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,19 +1,0 @@
-namespace backend.Helpers;
-
-using backend.Entities;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.Filters;
-
-[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
-public class AuthorizeAttribute : Attribute, IAuthorizationFilter
-{
-    public void OnAuthorization(AuthorizationFilterContext context)
-    {
-        var user = context.HttpContext.Items["User"];
-        if (user == null)
-        {
-            // not logged in
-            context.Result = new JsonResult(new { message = "Unauthorized" }) { StatusCode = StatusCodes.Status401Unauthorized };
-        }
-    }
-}
Index: ckend/Helpers/JwtMiddleware.cs
===================================================================
--- backend/Helpers/JwtMiddleware.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,55 +1,0 @@
-namespace WebApi.Helpers;
-
-using Microsoft.Extensions.Options;
-using Microsoft.IdentityModel.Tokens;
-using System.IdentityModel.Tokens.Jwt;
-using backend.Services;
-using backend.Helpers;
-
-public class JwtMiddleware
-{
-    private readonly RequestDelegate _next;
-    private readonly AppSettings _appSettings;
-
-    public JwtMiddleware(RequestDelegate next, IOptions<AppSettings> appSettings)
-    {
-        _next = next;
-        _appSettings = appSettings.Value;
-    }
-
-    public async Task Invoke(HttpContext context, IUserService userService)
-    {
-        var token = context.Request.Headers["Authorization"].FirstOrDefault()?.Split(" ").Last();
-
-        if (token != null)
-            attachUserToContext(context, userService, token);
-
-        await _next(context);
-    }
-
-    private void attachUserToContext(HttpContext context, IUserService userService, string token)
-    {
-        try
-        {
-            var tokenHandler = new JwtSecurityTokenHandler();
-            var key = System.Text.Encoding.ASCII.GetBytes(_appSettings.Secret);
-            tokenHandler.ValidateToken(token, new TokenValidationParameters
-            {
-                ValidateIssuerSigningKey = true,
-                IssuerSigningKey = new SymmetricSecurityKey(key),
-                ValidateIssuer = false,
-                ValidateAudience = false,
-                ClockSkew = TimeSpan.Zero
-            }, out SecurityToken validatedToken);
-
-            var jwtToken = (JwtSecurityToken)validatedToken;
-            var userId = int.Parse(jwtToken.Claims.First(x => x.Type == "id").Value);
-
-            context.Items["User"] = userId;
-        }
-        catch
-        {
-            // do nothing if jwt validation fails
-        }
-    }
-}
Index: ckend/Migrations/20220409103618_Initial-Architecture.Designer.cs
===================================================================
--- backend/Migrations/20220409103618_Initial-Architecture.Designer.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,142 +1,0 @@
-﻿// <auto-generated />
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using backend.Data;
-
-#nullable disable
-
-namespace backend.Migrations
-{
-    [DbContext(typeof(DataContext))]
-    [Migration("20220409103618_Initial-Architecture")]
-    partial class InitialArchitecture
-    {
-        protected override void BuildTargetModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("ProductVersion", "6.0.3")
-                .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
-            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("ContactName")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("ContactNumber")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int>("ReservationPlace")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationStatus")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationType")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("RestaurantId")
-                        .HasColumnType("integer");
-
-                    b.Property<DateTime>("StartDate")
-                        .HasColumnType("timestamp with time zone");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("RestaurantId");
-
-                    b.ToTable("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int?>("OwnerFk")
-                        .HasColumnType("integer");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("OwnerFk")
-                        .IsUnique();
-
-                    b.ToTable("Restoraunts");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Password")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("Username")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Users");
-                });
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
-                        .WithMany("Reservations")
-                        .HasForeignKey("RestaurantId")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("Restaurant");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.HasOne("backend.Entities.User", "Owner")
-                        .WithOne("Restaurant")
-                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
-
-                    b.Navigation("Owner");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Navigation("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Navigation("Restaurant")
-                        .IsRequired();
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}
Index: ckend/Migrations/20220409103618_Initial-Architecture.cs
===================================================================
--- backend/Migrations/20220409103618_Initial-Architecture.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,95 +1,0 @@
-﻿using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace backend.Migrations
-{
-    public partial class InitialArchitecture : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.CreateTable(
-                name: "Users",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "integer", nullable: false)
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
-                    Username = table.Column<string>(type: "text", nullable: false),
-                    Password = table.Column<string>(type: "text", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_Users", x => x.Id);
-                });
-
-            migrationBuilder.CreateTable(
-                name: "Restoraunts",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "integer", nullable: false)
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
-                    OwnerFk = table.Column<int>(type: "integer", nullable: true),
-                    Name = table.Column<string>(type: "text", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_Restoraunts", x => x.Id);
-                    table.ForeignKey(
-                        name: "FK_Restoraunts_Users_OwnerFk",
-                        column: x => x.OwnerFk,
-                        principalTable: "Users",
-                        principalColumn: "Id");
-                });
-
-            migrationBuilder.CreateTable(
-                name: "Reservations",
-                columns: table => new
-                {
-                    Id = table.Column<int>(type: "integer", nullable: false)
-                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
-                    StartDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
-                    RestaurantId = table.Column<int>(type: "integer", nullable: false),
-                    ReservationPlace = table.Column<int>(type: "integer", nullable: false),
-                    ReservationStatus = table.Column<int>(type: "integer", nullable: false),
-                    ReservationType = table.Column<int>(type: "integer", nullable: false),
-                    ContactName = table.Column<string>(type: "text", nullable: false),
-                    ContactNumber = table.Column<string>(type: "text", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_Reservations", x => x.Id);
-                    table.ForeignKey(
-                        name: "FK_Reservations_Restoraunts_RestaurantId",
-                        column: x => x.RestaurantId,
-                        principalTable: "Restoraunts",
-                        principalColumn: "Id",
-                        onDelete: ReferentialAction.Cascade);
-                });
-
-            migrationBuilder.CreateIndex(
-                name: "IX_Reservations_RestaurantId",
-                table: "Reservations",
-                column: "RestaurantId");
-
-            migrationBuilder.CreateIndex(
-                name: "IX_Restoraunts_OwnerFk",
-                table: "Restoraunts",
-                column: "OwnerFk",
-                unique: true);
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropTable(
-                name: "Reservations");
-
-            migrationBuilder.DropTable(
-                name: "Restoraunts");
-
-            migrationBuilder.DropTable(
-                name: "Users");
-        }
-    }
-}
Index: ckend/Migrations/20220411110455_Change-Propname.Designer.cs
===================================================================
--- backend/Migrations/20220411110455_Change-Propname.Designer.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,142 +1,0 @@
-﻿// <auto-generated />
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using backend.Data;
-
-#nullable disable
-
-namespace backend.Migrations
-{
-    [DbContext(typeof(DataContext))]
-    [Migration("20220411110455_Change-Propname")]
-    partial class ChangePropname
-    {
-        protected override void BuildTargetModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("ProductVersion", "6.0.3")
-                .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
-            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("ContactName")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("ContactNumber")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int>("ReservationPlace")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationStatus")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationType")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("RestaurantId")
-                        .HasColumnType("integer");
-
-                    b.Property<DateTime>("StartDate")
-                        .HasColumnType("timestamp with time zone");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("RestaurantId");
-
-                    b.ToTable("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int?>("OwnerFk")
-                        .HasColumnType("integer");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("OwnerFk")
-                        .IsUnique();
-
-                    b.ToTable("Restoraunts");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Email")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("Password")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Users");
-                });
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
-                        .WithMany("Reservations")
-                        .HasForeignKey("RestaurantId")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("Restaurant");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.HasOne("backend.Entities.User", "Owner")
-                        .WithOne("Restaurant")
-                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
-
-                    b.Navigation("Owner");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Navigation("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Navigation("Restaurant")
-                        .IsRequired();
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}
Index: ckend/Migrations/20220411110455_Change-Propname.cs
===================================================================
--- backend/Migrations/20220411110455_Change-Propname.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,25 +1,0 @@
-﻿using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace backend.Migrations
-{
-    public partial class ChangePropname : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.RenameColumn(
-                name: "Username",
-                table: "Users",
-                newName: "Email");
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.RenameColumn(
-                name: "Email",
-                table: "Users",
-                newName: "Username");
-        }
-    }
-}
Index: ckend/Migrations/20220411130410_Add-Persons.Designer.cs
===================================================================
--- backend/Migrations/20220411130410_Add-Persons.Designer.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,145 +1,0 @@
-﻿// <auto-generated />
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using backend.Data;
-
-#nullable disable
-
-namespace backend.Migrations
-{
-    [DbContext(typeof(DataContext))]
-    [Migration("20220411130410_Add-Persons")]
-    partial class AddPersons
-    {
-        protected override void BuildTargetModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("ProductVersion", "6.0.3")
-                .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
-            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("ContactName")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("ContactNumber")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int>("Persons")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationPlace")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationStatus")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationType")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("RestaurantId")
-                        .HasColumnType("integer");
-
-                    b.Property<DateTime>("StartDate")
-                        .HasColumnType("timestamp with time zone");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("RestaurantId");
-
-                    b.ToTable("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int?>("OwnerFk")
-                        .HasColumnType("integer");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("OwnerFk")
-                        .IsUnique();
-
-                    b.ToTable("Restoraunts");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Email")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("Password")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Users");
-                });
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
-                        .WithMany("Reservations")
-                        .HasForeignKey("RestaurantId")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("Restaurant");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.HasOne("backend.Entities.User", "Owner")
-                        .WithOne("Restaurant")
-                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
-
-                    b.Navigation("Owner");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Navigation("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Navigation("Restaurant")
-                        .IsRequired();
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}
Index: ckend/Migrations/20220411130410_Add-Persons.cs
===================================================================
--- backend/Migrations/20220411130410_Add-Persons.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,26 +1,0 @@
-﻿using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace backend.Migrations
-{
-    public partial class AddPersons : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.AddColumn<int>(
-                name: "Persons",
-                table: "Reservations",
-                type: "integer",
-                nullable: false,
-                defaultValue: 0);
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropColumn(
-                name: "Persons",
-                table: "Reservations");
-        }
-    }
-}
Index: ckend/Migrations/DataContextModelSnapshot.cs
===================================================================
--- backend/Migrations/DataContextModelSnapshot.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,143 +1,0 @@
-﻿// <auto-generated />
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using backend.Data;
-
-#nullable disable
-
-namespace backend.Migrations
-{
-    [DbContext(typeof(DataContext))]
-    partial class DataContextModelSnapshot : ModelSnapshot
-    {
-        protected override void BuildModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("ProductVersion", "6.0.3")
-                .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
-            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("ContactName")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("ContactNumber")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int>("Persons")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationPlace")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationStatus")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("ReservationType")
-                        .HasColumnType("integer");
-
-                    b.Property<int>("RestaurantId")
-                        .HasColumnType("integer");
-
-                    b.Property<DateTime>("StartDate")
-                        .HasColumnType("timestamp with time zone");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("RestaurantId");
-
-                    b.ToTable("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<int?>("OwnerFk")
-                        .HasColumnType("integer");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("OwnerFk")
-                        .IsUnique();
-
-                    b.ToTable("Restoraunts");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd()
-                        .HasColumnType("integer");
-
-                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
-
-                    b.Property<string>("Email")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.Property<string>("Password")
-                        .IsRequired()
-                        .HasColumnType("text");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Users");
-                });
-
-            modelBuilder.Entity("backend.Entities.Reservation", b =>
-                {
-                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
-                        .WithMany("Reservations")
-                        .HasForeignKey("RestaurantId")
-                        .OnDelete(DeleteBehavior.Cascade)
-                        .IsRequired();
-
-                    b.Navigation("Restaurant");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.HasOne("backend.Entities.User", "Owner")
-                        .WithOne("Restaurant")
-                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
-
-                    b.Navigation("Owner");
-                });
-
-            modelBuilder.Entity("backend.Entities.Restaurant", b =>
-                {
-                    b.Navigation("Reservations");
-                });
-
-            modelBuilder.Entity("backend.Entities.User", b =>
-                {
-                    b.Navigation("Restaurant")
-                        .IsRequired();
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}
Index: ckend/Program.cs
===================================================================
--- backend/Program.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,75 +1,0 @@
-using backend.Data;
-using backend.Helpers;
-using backend.Services;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.OpenApi.Models;
-using WebApi.Helpers;
-
-var builder = WebApplication.CreateBuilder(args);
-
-// Add services to the container.
-builder.Services.Configure<AppSettings>(builder.Configuration.GetSection("AppSettings"));
-builder.Services.AddControllers().AddNewtonsoftJson();
-// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
-builder.Services.AddEndpointsApiExplorer();
-builder.Services.AddSwaggerGen(c =>
-{
-    c.SwaggerDoc("v1", new OpenApiInfo() { Title = "resTools backend", Version = "v1" });
-    c.AddSecurityDefinition("Bearer",
-        new OpenApiSecurityScheme
-        {
-            In = Microsoft.OpenApi.Models.ParameterLocation.Header,
-            Description = "Please enter into field the word 'Bearer' following by space and JWT",
-            Name = "Authorization",
-            Type = Microsoft.OpenApi.Models.SecuritySchemeType.ApiKey,
-            Scheme="Bearer"
-        });
-    c.AddSecurityRequirement(new OpenApiSecurityRequirement()
-    {
-        {
-            new OpenApiSecurityScheme
-            {
-                Reference = new OpenApiReference
-                {
-                    Type = ReferenceType.SecurityScheme,
-                    Id = "Bearer"
-                },
-                Name = "Bearer",
-                In = ParameterLocation.Header,
-
-            },
-            new List<string>()
-        }
-    });
-});
-builder.Services.AddScoped<IUserService, UserService>();
-builder.Services.AddScoped<IRestaurantService, RestaurantService>();
-builder.Services.AddScoped<IReservationService, ReservationService>();
-builder.Services.AddScoped<ISmsService, SmsService>();
-
-builder.Services.AddDbContext<DataContext>(p => p.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
-
-var app = builder.Build();
-
-app.UseCors(x => x
-        .AllowAnyOrigin()
-        .AllowAnyMethod()
-        .AllowAnyHeader());
-
-// custom jwt auth middleware
-app.UseMiddleware<JwtMiddleware>();
-
-// Configure the HTTP request pipeline.
-if (app.Environment.IsDevelopment())
-{
-    app.UseSwagger();
-    app.UseSwaggerUI();
-}
-
-app.UseHttpsRedirection();
-
-app.UseAuthorization();
-
-app.MapControllers();
-
-app.Run();
Index: ckend/Properties/launchSettings.json
===================================================================
--- backend/Properties/launchSettings.json	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,31 +1,0 @@
-﻿{
-  "$schema": "https://json.schemastore.org/launchsettings.json",
-  "iisSettings": {
-    "windowsAuthentication": false,
-    "anonymousAuthentication": true,
-    "iisExpress": {
-      "applicationUrl": "http://localhost:16765",
-      "sslPort": 44324
-    }
-  },
-  "profiles": {
-    "backend": {
-      "commandName": "Project",
-      "dotnetRunMessages": true,
-      "launchBrowser": true,
-      "launchUrl": "swagger",
-      "applicationUrl": "https://localhost:7073;http://localhost:5073",
-      "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": "Development"
-      }
-    },
-    "IIS Express": {
-      "commandName": "IISExpress",
-      "launchBrowser": true,
-      "launchUrl": "swagger",
-      "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": "Development"
-      }
-    }
-  }
-}
Index: ckend/Services/ReservationService.cs
===================================================================
--- backend/Services/ReservationService.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,51 +1,0 @@
-﻿using backend.Data;
-using backend.DTOs;
-using backend.Entities;
-using Microsoft.EntityFrameworkCore;
-
-namespace backend.Services
-{
-    public interface IReservationService
-    {
-        public Task CreateReservation(CreateReservationRequest req);
-        public Task ChangeReservationStatus(int resId, ReservationStatus status);
-    }
-    public class ReservationService : IReservationService
-    {
-        private readonly DataContext _context = null;
-        private readonly ISmsService _smsService = null;
-
-        public ReservationService(DataContext context, ISmsService smsService)
-        {
-            _context = context;
-            _smsService = smsService;
-        }
-
-        public async Task ChangeReservationStatus(int resId, ReservationStatus status)
-        {
-            var reservation = await _context.Reservations.FindAsync(resId);
-            reservation.ReservationStatus = status;
-            _context.Update(reservation);
-            await _context.SaveChangesAsync();
-            _smsService.ReservationStatusUpdate(reservation.ContactName, reservation.ContactNumber, reservation.ReservationStatus);
-        }
-
-        public async Task CreateReservation(CreateReservationRequest req)
-        {
-            Restaurant res = await _context.Restoraunts.Include(x => x.Reservations).FirstOrDefaultAsync();
-            Reservation reservation = new Reservation()
-            {
-                ContactName = req.ContactName,
-                ContactNumber = req.ContactNumber,
-                ReservationPlace = req.ReservationPlace,
-                ReservationType = req.ReservationType,
-                StartDate = req.StartDate,
-                Persons = req.Persons,
-                ReservationStatus = ReservationStatus.New
-            };
-            res.Reservations.Add(reservation);
-            _context.Restoraunts.Update(res);
-            await _context.SaveChangesAsync();
-        }
-    }
-}
Index: ckend/Services/RestaurantService.cs
===================================================================
--- backend/Services/RestaurantService.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,54 +1,0 @@
-﻿using backend.Data;
-using backend.DTOs;
-using backend.Entities;
-using Microsoft.EntityFrameworkCore;
-
-namespace backend.Services
-{
-    public interface IRestaurantService
-    {
-        public Task CreateRestaurant(string name, int userId);
-        public Task<RestaurantResponse> GetRestaurant();
-    }
-    public class RestaurantService : IRestaurantService
-    {
-        private readonly DataContext _context = null;
-
-        public RestaurantService(DataContext context)
-        {
-            _context = context;
-        }
-        public async Task CreateRestaurant(string name, int userId)
-        {
-            User user = await _context.Users.FindAsync(userId);
-            Restaurant restaurant = new Restaurant() { Name = name, Owner = user};
-            await _context.Restoraunts.AddAsync(restaurant);
-            await _context.SaveChangesAsync();
-        }
-
-        public async Task<RestaurantResponse> GetRestaurant()
-        {
-            RestaurantResponse res = await _context.Restoraunts
-                .Include(x => x.Reservations)
-                .Select(x => new RestaurantResponse()
-                {
-                    Id = x.Id,
-                    Name = x.Name,
-                    OwnerId = x.OwnerFk,
-                    Reservations = x.Reservations.Select(t => new ReservationResponse()
-                    {
-                        ContactName = t.ContactName,
-                        ContactNumber = t.ContactNumber,
-                        Persons = t.Persons,
-                        StartDate = t.StartDate,
-                        ReservationStatus = t.ReservationStatus,
-                        Id = t.Id,
-                        ReservationPlace = t.ReservationPlace,
-                        ReservationType = t.ReservationType
-                    }).ToList()
-                })
-                .FirstOrDefaultAsync();
-            return res;
-        }
-    }
-}
Index: ckend/Services/SmsService.cs
===================================================================
--- backend/Services/SmsService.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,20 +1,0 @@
-﻿using backend.Entities;
-
-namespace backend.Services
-{
-    public interface ISmsService
-    {
-        public Task ReservationStatusUpdate(string name, string number, ReservationStatus newStatus);
-    }
-    public class SmsService : ISmsService
-    {
-        public async Task ReservationStatusUpdate(string name, string number, ReservationStatus newStatus)
-        {
-            string message = $"Hello {name}, the status of your reservation was changed to: { Enum.GetName(typeof(ReservationStatus), newStatus)}";
-
-            // simulate sending sms
-            await Task.Delay(100);
-            Console.WriteLine(message);
-        }
-    }
-}
Index: ckend/Services/UserService.cs
===================================================================
--- backend/Services/UserService.cs	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,73 +1,0 @@
-namespace backend.Services;
-
-using backend.Data;
-using backend.DTOs;
-using backend.Entities;
-using backend.Helpers;
-using backend.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Options;
-using Microsoft.IdentityModel.Tokens;
-using System.IdentityModel.Tokens.Jwt;
-using System.Security.Claims;
-
-public interface IUserService
-{
-    Task<AuthenticateResponse> Authenticate(AuthenticateRequest model);
-    Task<AuthenticateResponse> Register(CreateUserRequest req);
-    Task<User> GetById(int id);
-}
-
-public class UserService : IUserService
-{
-    private readonly AppSettings _appSettings;
-    private readonly DataContext _context = null;
-
-    public UserService(IOptions<AppSettings> appSettings, DataContext context)
-    {
-        _appSettings = appSettings.Value;
-        _context = context;
-    }
-
-    public async Task<AuthenticateResponse> Authenticate(AuthenticateRequest model)
-    {
-        User user = await _context.Users.FirstOrDefaultAsync(x => x.Email == model.Email && x.Password == model.Password);
-
-        // return null if user not found
-        if (user == null) return null;
-
-        // authentication successful so generate jwt token
-        var token = generateJwtToken(user);
-
-        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token};
-    }
-
-    public async Task<User> GetById(int id)
-    {
-        return await _context.Users.FindAsync(id);
-    }
-
-    public async Task<AuthenticateResponse> Register(CreateUserRequest req)
-    {
-        User user = new User() { Email = req.Email, Password = req.Password };
-        await _context.Users.AddAsync(user);
-        await _context.SaveChangesAsync();
-        var token = generateJwtToken(user);
-        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token };
-    }
-
-    private string generateJwtToken(User user)
-    {
-        // generate token that is valid for 7 days
-        var tokenHandler = new JwtSecurityTokenHandler();
-        var key = System.Text.Encoding.ASCII.GetBytes(_appSettings.Secret);
-        var tokenDescriptor = new SecurityTokenDescriptor
-        {
-            Subject = new ClaimsIdentity(new[] { new Claim("id", user.Id.ToString()) }),
-            Expires = DateTime.UtcNow.AddDays(7),
-            SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature)
-        };
-        var token = tokenHandler.CreateToken(tokenDescriptor);
-        return tokenHandler.WriteToken(token);
-    }
-}
Index: ckend/appsettings.Development.json
===================================================================
--- backend/appsettings.Development.json	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,8 +1,0 @@
-{
-  "Logging": {
-    "LogLevel": {
-      "Default": "Information",
-      "Microsoft.AspNetCore": "Warning"
-    }
-  }
-}
Index: ckend/appsettings.json
===================================================================
--- backend/appsettings.json	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,15 +1,0 @@
-{
-  "AppSettings": {
-    "Secret": "chWS2ewNYT2tpLWIm1L5ty12c8FINao7p65LxPPM7GjkytlI5X1iZYWuh5KQhZgxkQqf8FVZuklWTfp0fDd4pvFy8ND6ecgircfxG2IckDzte1I2ZrTMS7xhpsux8vLxLGkGUi9ZXOAO9oaOYP5IelwJdiHiryEj9BdfMGT1QgRfsHHazqz6gtrJIcdW2pb3yrXPGtQ20UvXgXxw7dyAwd3byZexM0t781qgp7rT71YgkVyc8YBx74U6DcWtSka7"
-  },
-  "Logging": {
-    "LogLevel": {
-      "Default": "Information",
-      "Microsoft.AspNetCore": "Warning"
-    }
-  },
-  "ConnectionStrings": {
-    "DefaultConnection": "Server=localhost; port=5432; user id = postgres; database=resToolsDB; password=121212; pooling = true; includeerrordetail = true"
-  },
-  "AllowedHosts": "*"
-}
Index: ckend/backend.csproj
===================================================================
--- backend/backend.csproj	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,29 +1,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Web">
-
-  <PropertyGroup>
-    <TargetFramework>net6.0</TargetFramework>
-    <Nullable>enable</Nullable>
-    <ImplicitUsings>enable</ImplicitUsings>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <None Include="..\.editorconfig" Link=".editorconfig" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.3" />
-    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.3" />
-    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.3" />
-    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.3">
-      <PrivateAssets>all</PrivateAssets>
-      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
-    </PackageReference>
-    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
-    <PackageReference Include="Npgsql" Version="6.0.3" />
-    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.3" />
-    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
-    <PackageReference Include="Swashbuckle.Core" Version="5.6.0" />
-    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.17.0" />
-  </ItemGroup>
-
-</Project>
Index: sTools_backend.sln
===================================================================
--- resTools_backend.sln	(revision 057037b3df07d92e2be689285380664471687a07)
+++ 	(revision )
@@ -1,30 +1,0 @@
-﻿
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.31912.275
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "backend", "backend\backend.csproj", "{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1369BF0A-CBA9-4788-8EB8-4E0AC8EA65B0}"
-	ProjectSection(SolutionItems) = preProject
-		.editorconfig = .editorconfig
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Release|Any CPU = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Release|Any CPU.Build.0 = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-		SolutionGuid = {8BA7AC3F-E83E-4A90-B836-D0F3F25872A7}
-	EndGlobalSection
-EndGlobal
Index: resTools_backend/.editorconfig
===================================================================
--- resTools_backend/.editorconfig	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/.editorconfig	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,4 @@
+﻿[*.cs]
+
+# CS8600: Converting null literal or possible null value to non-nullable type.
+dotnet_diagnostic.CS8600.severity = none
Index: resTools_backend/.gitattributes
===================================================================
--- resTools_backend/.gitattributes	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/.gitattributes	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs     diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following 
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln       merge=binary
+#*.csproj    merge=binary
+#*.vbproj    merge=binary
+#*.vcxproj   merge=binary
+#*.vcproj    merge=binary
+#*.dbproj    merge=binary
+#*.fsproj    merge=binary
+#*.lsproj    merge=binary
+#*.wixproj   merge=binary
+#*.modelproj merge=binary
+#*.sqlproj   merge=binary
+#*.wwaproj   merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg   binary
+#*.png   binary
+#*.gif   binary
+
+###############################################################################
+# diff behavior for common document formats
+# 
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the 
+# entries below.
+###############################################################################
+#*.doc   diff=astextplain
+#*.DOC   diff=astextplain
+#*.docx  diff=astextplain
+#*.DOCX  diff=astextplain
+#*.dot   diff=astextplain
+#*.DOT   diff=astextplain
+#*.pdf   diff=astextplain
+#*.PDF   diff=astextplain
+#*.rtf   diff=astextplain
+#*.RTF   diff=astextplain
Index: resTools_backend/.gitignore
===================================================================
--- resTools_backend/.gitignore	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/.gitignore	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,363 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Oo]ut/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
Index: resTools_backend/backend/Controllers/ReservationsController.cs
===================================================================
--- resTools_backend/backend/Controllers/ReservationsController.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Controllers/ReservationsController.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,36 @@
+﻿namespace backend.Controllers;
+
+using backend.DTOs;
+using backend.Entities;
+using backend.Helpers;
+using backend.Models;
+using backend.Services;
+using Microsoft.AspNetCore.Mvc;
+using System.Security.Claims;
+
+[ApiController]
+[Route("[controller]")]
+public class ReservationsController : ControllerBase
+{
+    private readonly IReservationService _reservationService = null;
+
+    public ReservationsController(IReservationService reservationService)
+    {
+        _reservationService = reservationService;
+    }
+
+    [HttpPost()]
+    public async Task<IActionResult> CreateReservation([FromBody] CreateReservationRequest req)
+    {
+        await _reservationService.CreateReservation(req);
+        return Ok();
+    }
+
+    [Authorize]
+    [HttpPut("{rid}")]
+    public async Task<IActionResult> ChangeStatus(int rid, [FromQuery] ReservationStatus status)
+    {
+        await _reservationService.ChangeReservationStatus(rid, status);
+        return Ok();
+    }
+}
Index: resTools_backend/backend/Controllers/RestaurantsController.cs
===================================================================
--- resTools_backend/backend/Controllers/RestaurantsController.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Controllers/RestaurantsController.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,39 @@
+﻿namespace backend.Controllers;
+
+using backend.DTOs;
+using backend.Entities;
+using backend.Helpers;
+using backend.Models;
+using backend.Services;
+using Microsoft.AspNetCore.Mvc;
+using System.Security.Claims;
+
+[ApiController]
+[Route("[controller]")]
+public class RestaurantsController : ControllerBase
+{
+    private readonly IRestaurantService _restaurantService = null;
+
+    public RestaurantsController(IRestaurantService restaurantService)
+    {
+        _restaurantService = restaurantService;
+    }
+
+    [Authorize]
+    [HttpPost()]
+    public async Task<IActionResult> CreateRestaurant([FromQuery] string title)
+    {
+        var userId = (int) this.HttpContext.Items["User"];
+        await _restaurantService.CreateRestaurant(title, userId);
+
+
+        return Ok();
+    }
+
+    [HttpGet()]
+    public async Task<RestaurantResponse> GetRestaurant()
+    {
+        var response = await _restaurantService.GetRestaurant();
+        return response;
+    }
+}
Index: resTools_backend/backend/Controllers/UsersController.cs
===================================================================
--- resTools_backend/backend/Controllers/UsersController.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Controllers/UsersController.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,37 @@
+﻿namespace backend.Controllers;
+
+using backend.DTOs;
+using backend.Helpers;
+using backend.Models;
+using backend.Services;
+using Microsoft.AspNetCore.Mvc;
+
+[ApiController]
+[Route("[controller]")]
+public class UsersController : ControllerBase
+{
+    private readonly IUserService _userService = null;
+
+    public UsersController(IUserService userService)
+    {
+        _userService = userService;
+    }
+
+    [HttpPost("login")]
+    public async Task<AuthenticateResponse> Authenticate(AuthenticateRequest model)
+    {
+        var response = await _userService.Authenticate(model);
+
+        if (response == null)
+            throw new Exception("Email or password is incorrect");
+
+        return response;
+    }
+
+    [HttpPost("register")]
+    public async Task<AuthenticateResponse> Register(CreateUserRequest req)
+    {
+        var response = await _userService.Register(req);
+        return response;
+    }
+}
Index: resTools_backend/backend/DTOs/AuthenticateRequest.cs
===================================================================
--- resTools_backend/backend/DTOs/AuthenticateRequest.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/DTOs/AuthenticateRequest.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,12 @@
+namespace backend.Models;
+
+using System.ComponentModel.DataAnnotations;
+
+public class AuthenticateRequest
+{
+    [Required]
+    public string Email { get; set; }
+
+    [Required]
+    public string Password { get; set; }
+}
Index: resTools_backend/backend/DTOs/AuthenticateResponse.cs
===================================================================
--- resTools_backend/backend/DTOs/AuthenticateResponse.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/DTOs/AuthenticateResponse.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,15 @@
+using backend.Entities;
+using Newtonsoft.Json;
+
+namespace backend.Models;
+
+
+public class AuthenticateResponse
+{
+    [JsonProperty]
+    public int Id { get; set; }
+    [JsonProperty]
+    public string Email { get; set; }
+    [JsonProperty]
+    public string Token { get; set; }
+}
Index: resTools_backend/backend/DTOs/CreateReservationRequest.cs
===================================================================
--- resTools_backend/backend/DTOs/CreateReservationRequest.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/DTOs/CreateReservationRequest.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,27 @@
+﻿using backend.Entities;
+using Newtonsoft.Json;
+
+namespace backend.DTOs
+{
+    public class CreateReservationRequest
+    {
+        [JsonRequired]
+        [JsonProperty]
+        public DateTime StartDate { get; set; }
+        [JsonRequired]
+        [JsonProperty]
+        public ReservationPlace ReservationPlace { get; set; }
+        [JsonRequired]
+        [JsonProperty]
+        public ReservationType ReservationType { get; set; }
+        [JsonRequired]
+        [JsonProperty]
+        public int Persons { get; set; }
+        [JsonRequired]
+        [JsonProperty]
+        public string ContactName { get; set; }
+        [JsonRequired]
+        [JsonProperty]
+        public string ContactNumber { get; set; }
+    }
+}
Index: resTools_backend/backend/DTOs/CreateUserRequest.cs
===================================================================
--- resTools_backend/backend/DTOs/CreateUserRequest.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/DTOs/CreateUserRequest.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,13 @@
+﻿using Newtonsoft.Json;
+
+namespace backend.DTOs
+{
+    public class CreateUserRequest
+    {
+        [JsonProperty]
+        public string Email { get; set; }
+
+        [JsonProperty]
+        public string Password { get; set; }
+    }
+}
Index: resTools_backend/backend/DTOs/ReservationResponse.cs
===================================================================
--- resTools_backend/backend/DTOs/ReservationResponse.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/DTOs/ReservationResponse.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,25 @@
+﻿using backend.Entities;
+using Newtonsoft.Json;
+
+namespace backend.DTOs
+{
+    public class ReservationResponse
+    {
+        [JsonProperty]
+        public int Id { get; set; }
+        [JsonProperty]
+        public DateTime StartDate { get; set; }
+        [JsonProperty]
+        public ReservationPlace ReservationPlace { get; set; }
+        [JsonProperty]
+        public ReservationStatus ReservationStatus { get; set; }
+        [JsonProperty]
+        public ReservationType ReservationType { get; set; }
+        [JsonProperty]
+        public int Persons { get; set; }
+        [JsonProperty]
+        public string ContactName { get; set; }
+        [JsonProperty]
+        public string ContactNumber { get; set; }
+    }
+}
Index: resTools_backend/backend/DTOs/RestaurantResponse.cs
===================================================================
--- resTools_backend/backend/DTOs/RestaurantResponse.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/DTOs/RestaurantResponse.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,16 @@
+﻿using Newtonsoft.Json;
+
+namespace backend.DTOs
+{
+    public class RestaurantResponse
+    {
+        [JsonProperty]
+        public int Id { get; set; }
+        [JsonProperty]
+        public int? OwnerId { get; set; }
+        [JsonProperty]
+        public List<ReservationResponse> Reservations { get; set; }
+        [JsonProperty]
+        public string Name { get; set; }
+    }
+}
Index: resTools_backend/backend/Data/DataContext.cs
===================================================================
--- resTools_backend/backend/Data/DataContext.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Data/DataContext.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,86 @@
+﻿using backend.Entities;
+using Microsoft.EntityFrameworkCore;
+
+namespace backend.Data
+{
+    public class DataContext : DbContext
+    {
+        public DataContext(DbContextOptions<DataContext> dbContextOptions) : base(dbContextOptions)
+        {
+        }
+
+        private DbSet<User> users;
+        public DbSet<User> Users
+        {
+            get
+            {
+                if (users == null)
+                {
+                    users = Set<User>();
+                }
+
+                return users;
+            }
+        }
+
+        private DbSet<Restaurant> restaurants;
+        public DbSet<Restaurant> Restoraunts
+        {
+            get
+            {
+                if (restaurants == null)
+                {
+                    restaurants = Set<Restaurant>();
+                }
+
+                return restaurants;
+            }
+        }
+
+        private DbSet<Reservation> reservations;
+        public DbSet<Reservation> Reservations
+        {
+            get
+            { 
+                if (reservations == null)
+                {
+                    reservations = Set<Reservation>();
+                }
+
+                return reservations;
+            }
+        }
+
+
+        protected override void OnModelCreating(ModelBuilder modelBuilder)
+        {
+            //
+            // User
+            // 
+            modelBuilder.Entity<User>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd();
+            modelBuilder.Entity<User>()
+            .HasOne(p => p.Restaurant)
+            .WithOne(b => b.Owner);
+
+            //
+            // Restoraunt
+            // 
+            modelBuilder.Entity<Restaurant>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd();
+            modelBuilder.Entity<Restaurant>()
+            .HasOne(p => p.Owner)
+            .WithOne(b => b.Restaurant)
+            .HasForeignKey<Restaurant>(k => k.OwnerFk);
+            modelBuilder.Entity<Restaurant>()
+            .HasMany(p => p.Reservations)
+            .WithOne(b => b.Restaurant);
+
+            //
+            // Reservation
+            // 
+            modelBuilder.Entity<Reservation>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd();
+            modelBuilder.Entity<Reservation>()
+            .HasOne(p => p.Restaurant)
+            .WithMany(b => b.Reservations);
+        }
+    }
+}
Index: resTools_backend/backend/Entities/Reservation.cs
===================================================================
--- resTools_backend/backend/Entities/Reservation.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Entities/Reservation.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,21 @@
+﻿using Newtonsoft.Json;
+
+namespace backend.Entities
+{
+    public class Reservation
+    {
+        public int Id { get; set; }
+        public DateTime StartDate { get; set; }
+        public int Persons { get; set; }
+        public virtual Restaurant Restaurant { get; set; }
+        public ReservationPlace ReservationPlace { get; set; }
+        public ReservationStatus ReservationStatus { get; set; }
+        public ReservationType ReservationType { get; set; }
+        public string ContactName { get; set; }
+        public string ContactNumber { get; set; }
+    }
+
+    public enum ReservationType { Short, Long, Event }
+    public enum ReservationPlace { Outside, Inside}
+    public enum ReservationStatus { New, Confirmed, Cancelled }
+}
Index: resTools_backend/backend/Entities/Restaurant.cs
===================================================================
--- resTools_backend/backend/Entities/Restaurant.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Entities/Restaurant.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,13 @@
+﻿using Newtonsoft.Json;
+
+namespace backend.Entities
+{
+    public class Restaurant
+    {
+        public int Id { get; set; }
+        public int? OwnerFk { get; set; }
+        public virtual User Owner { get; set; }
+        public virtual ICollection<Reservation> Reservations { get; set; }
+        public string Name { get; set; }
+    }
+}
Index: resTools_backend/backend/Entities/User.cs
===================================================================
--- resTools_backend/backend/Entities/User.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Entities/User.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,12 @@
+using Newtonsoft.Json;
+
+namespace backend.Entities;
+
+public class User
+{
+    public int Id { get; set; }
+    public string Email { get; set; }
+    public string Password { get; set; }
+    [JsonIgnore]
+    public virtual Restaurant Restaurant { get; set; }
+}
Index: resTools_backend/backend/Helpers/AppSettings.cs
===================================================================
--- resTools_backend/backend/Helpers/AppSettings.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Helpers/AppSettings.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,6 @@
+namespace backend.Helpers;
+
+public class AppSettings
+{
+    public string Secret { get; set; }
+}
Index: resTools_backend/backend/Helpers/AuthorizeAttribute.cs
===================================================================
--- resTools_backend/backend/Helpers/AuthorizeAttribute.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Helpers/AuthorizeAttribute.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,19 @@
+namespace backend.Helpers;
+
+using backend.Entities;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Filters;
+
+[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
+public class AuthorizeAttribute : Attribute, IAuthorizationFilter
+{
+    public void OnAuthorization(AuthorizationFilterContext context)
+    {
+        var user = context.HttpContext.Items["User"];
+        if (user == null)
+        {
+            // not logged in
+            context.Result = new JsonResult(new { message = "Unauthorized" }) { StatusCode = StatusCodes.Status401Unauthorized };
+        }
+    }
+}
Index: resTools_backend/backend/Helpers/JwtMiddleware.cs
===================================================================
--- resTools_backend/backend/Helpers/JwtMiddleware.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Helpers/JwtMiddleware.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,55 @@
+namespace WebApi.Helpers;
+
+using Microsoft.Extensions.Options;
+using Microsoft.IdentityModel.Tokens;
+using System.IdentityModel.Tokens.Jwt;
+using backend.Services;
+using backend.Helpers;
+
+public class JwtMiddleware
+{
+    private readonly RequestDelegate _next;
+    private readonly AppSettings _appSettings;
+
+    public JwtMiddleware(RequestDelegate next, IOptions<AppSettings> appSettings)
+    {
+        _next = next;
+        _appSettings = appSettings.Value;
+    }
+
+    public async Task Invoke(HttpContext context, IUserService userService)
+    {
+        var token = context.Request.Headers["Authorization"].FirstOrDefault()?.Split(" ").Last();
+
+        if (token != null)
+            attachUserToContext(context, userService, token);
+
+        await _next(context);
+    }
+
+    private void attachUserToContext(HttpContext context, IUserService userService, string token)
+    {
+        try
+        {
+            var tokenHandler = new JwtSecurityTokenHandler();
+            var key = System.Text.Encoding.ASCII.GetBytes(_appSettings.Secret);
+            tokenHandler.ValidateToken(token, new TokenValidationParameters
+            {
+                ValidateIssuerSigningKey = true,
+                IssuerSigningKey = new SymmetricSecurityKey(key),
+                ValidateIssuer = false,
+                ValidateAudience = false,
+                ClockSkew = TimeSpan.Zero
+            }, out SecurityToken validatedToken);
+
+            var jwtToken = (JwtSecurityToken)validatedToken;
+            var userId = int.Parse(jwtToken.Claims.First(x => x.Type == "id").Value);
+
+            context.Items["User"] = userId;
+        }
+        catch
+        {
+            // do nothing if jwt validation fails
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220409103618_Initial-Architecture.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220409103618_Initial-Architecture.Designer.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Migrations/20220409103618_Initial-Architecture.Designer.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,142 @@
+﻿// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using backend.Data;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    [DbContext(typeof(DataContext))]
+    [Migration("20220409103618_Initial-Architecture")]
+    partial class InitialArchitecture
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "6.0.3")
+                .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ContactName")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("ContactNumber")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("ReservationPlace")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationStatus")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationType")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<DateTime>("StartDate")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("OwnerFk")
+                        .IsUnique();
+
+                    b.ToTable("Restoraunts");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Password")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("Username")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Users");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reservations")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.HasOne("backend.Entities.User", "Owner")
+                        .WithOne("Restaurant")
+                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
+
+                    b.Navigation("Owner");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Navigation("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Navigation("Restaurant")
+                        .IsRequired();
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220409103618_Initial-Architecture.cs
===================================================================
--- resTools_backend/backend/Migrations/20220409103618_Initial-Architecture.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Migrations/20220409103618_Initial-Architecture.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,95 @@
+﻿using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class InitialArchitecture : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.CreateTable(
+                name: "Users",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "integer", nullable: false)
+                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+                    Username = table.Column<string>(type: "text", nullable: false),
+                    Password = table.Column<string>(type: "text", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Users", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Restoraunts",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "integer", nullable: false)
+                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+                    OwnerFk = table.Column<int>(type: "integer", nullable: true),
+                    Name = table.Column<string>(type: "text", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Restoraunts", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_Restoraunts_Users_OwnerFk",
+                        column: x => x.OwnerFk,
+                        principalTable: "Users",
+                        principalColumn: "Id");
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Reservations",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "integer", nullable: false)
+                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+                    StartDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
+                    RestaurantId = table.Column<int>(type: "integer", nullable: false),
+                    ReservationPlace = table.Column<int>(type: "integer", nullable: false),
+                    ReservationStatus = table.Column<int>(type: "integer", nullable: false),
+                    ReservationType = table.Column<int>(type: "integer", nullable: false),
+                    ContactName = table.Column<string>(type: "text", nullable: false),
+                    ContactNumber = table.Column<string>(type: "text", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Reservations", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_Reservations_Restoraunts_RestaurantId",
+                        column: x => x.RestaurantId,
+                        principalTable: "Restoraunts",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                });
+
+            migrationBuilder.CreateIndex(
+                name: "IX_Reservations_RestaurantId",
+                table: "Reservations",
+                column: "RestaurantId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_Restoraunts_OwnerFk",
+                table: "Restoraunts",
+                column: "OwnerFk",
+                unique: true);
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropTable(
+                name: "Reservations");
+
+            migrationBuilder.DropTable(
+                name: "Restoraunts");
+
+            migrationBuilder.DropTable(
+                name: "Users");
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220411110455_Change-Propname.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220411110455_Change-Propname.Designer.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Migrations/20220411110455_Change-Propname.Designer.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,142 @@
+﻿// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using backend.Data;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    [DbContext(typeof(DataContext))]
+    [Migration("20220411110455_Change-Propname")]
+    partial class ChangePropname
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "6.0.3")
+                .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ContactName")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("ContactNumber")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("ReservationPlace")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationStatus")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationType")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<DateTime>("StartDate")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("OwnerFk")
+                        .IsUnique();
+
+                    b.ToTable("Restoraunts");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Email")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("Password")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Users");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reservations")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.HasOne("backend.Entities.User", "Owner")
+                        .WithOne("Restaurant")
+                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
+
+                    b.Navigation("Owner");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Navigation("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Navigation("Restaurant")
+                        .IsRequired();
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220411110455_Change-Propname.cs
===================================================================
--- resTools_backend/backend/Migrations/20220411110455_Change-Propname.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Migrations/20220411110455_Change-Propname.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,25 @@
+﻿using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class ChangePropname : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.RenameColumn(
+                name: "Username",
+                table: "Users",
+                newName: "Email");
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.RenameColumn(
+                name: "Email",
+                table: "Users",
+                newName: "Username");
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220411130410_Add-Persons.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220411130410_Add-Persons.Designer.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Migrations/20220411130410_Add-Persons.Designer.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,145 @@
+﻿// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using backend.Data;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    [DbContext(typeof(DataContext))]
+    [Migration("20220411130410_Add-Persons")]
+    partial class AddPersons
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "6.0.3")
+                .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ContactName")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("ContactNumber")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Persons")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationPlace")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationStatus")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationType")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<DateTime>("StartDate")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("OwnerFk")
+                        .IsUnique();
+
+                    b.ToTable("Restoraunts");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Email")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("Password")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Users");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reservations")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.HasOne("backend.Entities.User", "Owner")
+                        .WithOne("Restaurant")
+                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
+
+                    b.Navigation("Owner");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Navigation("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Navigation("Restaurant")
+                        .IsRequired();
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220411130410_Add-Persons.cs
===================================================================
--- resTools_backend/backend/Migrations/20220411130410_Add-Persons.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Migrations/20220411130410_Add-Persons.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,26 @@
+﻿using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class AddPersons : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<int>(
+                name: "Persons",
+                table: "Reservations",
+                type: "integer",
+                nullable: false,
+                defaultValue: 0);
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "Persons",
+                table: "Reservations");
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/DataContextModelSnapshot.cs
===================================================================
--- resTools_backend/backend/Migrations/DataContextModelSnapshot.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Migrations/DataContextModelSnapshot.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,143 @@
+﻿// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using backend.Data;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    [DbContext(typeof(DataContext))]
+    partial class DataContextModelSnapshot : ModelSnapshot
+    {
+        protected override void BuildModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "6.0.3")
+                .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("ContactName")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("ContactNumber")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Persons")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationPlace")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationStatus")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("ReservationType")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<DateTime>("StartDate")
+                        .HasColumnType("timestamp with time zone");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("OwnerFk")
+                        .IsUnique();
+
+                    b.ToTable("Restoraunts");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Email")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<string>("Password")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Users");
+                });
+
+            modelBuilder.Entity("backend.Entities.Reservation", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Reservations")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.HasOne("backend.Entities.User", "Owner")
+                        .WithOne("Restaurant")
+                        .HasForeignKey("backend.Entities.Restaurant", "OwnerFk");
+
+                    b.Navigation("Owner");
+                });
+
+            modelBuilder.Entity("backend.Entities.Restaurant", b =>
+                {
+                    b.Navigation("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Navigation("Restaurant")
+                        .IsRequired();
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
Index: resTools_backend/backend/Program.cs
===================================================================
--- resTools_backend/backend/Program.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Program.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,75 @@
+using backend.Data;
+using backend.Helpers;
+using backend.Services;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.OpenApi.Models;
+using WebApi.Helpers;
+
+var builder = WebApplication.CreateBuilder(args);
+
+// Add services to the container.
+builder.Services.Configure<AppSettings>(builder.Configuration.GetSection("AppSettings"));
+builder.Services.AddControllers().AddNewtonsoftJson();
+// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
+builder.Services.AddEndpointsApiExplorer();
+builder.Services.AddSwaggerGen(c =>
+{
+    c.SwaggerDoc("v1", new OpenApiInfo() { Title = "resTools backend", Version = "v1" });
+    c.AddSecurityDefinition("Bearer",
+        new OpenApiSecurityScheme
+        {
+            In = Microsoft.OpenApi.Models.ParameterLocation.Header,
+            Description = "Please enter into field the word 'Bearer' following by space and JWT",
+            Name = "Authorization",
+            Type = Microsoft.OpenApi.Models.SecuritySchemeType.ApiKey,
+            Scheme="Bearer"
+        });
+    c.AddSecurityRequirement(new OpenApiSecurityRequirement()
+    {
+        {
+            new OpenApiSecurityScheme
+            {
+                Reference = new OpenApiReference
+                {
+                    Type = ReferenceType.SecurityScheme,
+                    Id = "Bearer"
+                },
+                Name = "Bearer",
+                In = ParameterLocation.Header,
+
+            },
+            new List<string>()
+        }
+    });
+});
+builder.Services.AddScoped<IUserService, UserService>();
+builder.Services.AddScoped<IRestaurantService, RestaurantService>();
+builder.Services.AddScoped<IReservationService, ReservationService>();
+builder.Services.AddScoped<ISmsService, SmsService>();
+
+builder.Services.AddDbContext<DataContext>(p => p.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
+
+var app = builder.Build();
+
+app.UseCors(x => x
+        .AllowAnyOrigin()
+        .AllowAnyMethod()
+        .AllowAnyHeader());
+
+// custom jwt auth middleware
+app.UseMiddleware<JwtMiddleware>();
+
+// Configure the HTTP request pipeline.
+if (app.Environment.IsDevelopment())
+{
+    app.UseSwagger();
+    app.UseSwaggerUI();
+}
+
+app.UseHttpsRedirection();
+
+app.UseAuthorization();
+
+app.MapControllers();
+
+app.Run();
Index: resTools_backend/backend/Properties/launchSettings.json
===================================================================
--- resTools_backend/backend/Properties/launchSettings.json	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Properties/launchSettings.json	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,31 @@
+﻿{
+  "$schema": "https://json.schemastore.org/launchsettings.json",
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:16765",
+      "sslPort": 44324
+    }
+  },
+  "profiles": {
+    "backend": {
+      "commandName": "Project",
+      "dotnetRunMessages": true,
+      "launchBrowser": true,
+      "launchUrl": "swagger",
+      "applicationUrl": "https://localhost:7073;http://localhost:5073",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    },
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "launchUrl": "swagger",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    }
+  }
+}
Index: resTools_backend/backend/Services/ReservationService.cs
===================================================================
--- resTools_backend/backend/Services/ReservationService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Services/ReservationService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,51 @@
+﻿using backend.Data;
+using backend.DTOs;
+using backend.Entities;
+using Microsoft.EntityFrameworkCore;
+
+namespace backend.Services
+{
+    public interface IReservationService
+    {
+        public Task CreateReservation(CreateReservationRequest req);
+        public Task ChangeReservationStatus(int resId, ReservationStatus status);
+    }
+    public class ReservationService : IReservationService
+    {
+        private readonly DataContext _context = null;
+        private readonly ISmsService _smsService = null;
+
+        public ReservationService(DataContext context, ISmsService smsService)
+        {
+            _context = context;
+            _smsService = smsService;
+        }
+
+        public async Task ChangeReservationStatus(int resId, ReservationStatus status)
+        {
+            var reservation = await _context.Reservations.FindAsync(resId);
+            reservation.ReservationStatus = status;
+            _context.Update(reservation);
+            await _context.SaveChangesAsync();
+            _smsService.ReservationStatusUpdate(reservation.ContactName, reservation.ContactNumber, reservation.ReservationStatus);
+        }
+
+        public async Task CreateReservation(CreateReservationRequest req)
+        {
+            Restaurant res = await _context.Restoraunts.Include(x => x.Reservations).FirstOrDefaultAsync();
+            Reservation reservation = new Reservation()
+            {
+                ContactName = req.ContactName,
+                ContactNumber = req.ContactNumber,
+                ReservationPlace = req.ReservationPlace,
+                ReservationType = req.ReservationType,
+                StartDate = req.StartDate,
+                Persons = req.Persons,
+                ReservationStatus = ReservationStatus.New
+            };
+            res.Reservations.Add(reservation);
+            _context.Restoraunts.Update(res);
+            await _context.SaveChangesAsync();
+        }
+    }
+}
Index: resTools_backend/backend/Services/RestaurantService.cs
===================================================================
--- resTools_backend/backend/Services/RestaurantService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Services/RestaurantService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,54 @@
+﻿using backend.Data;
+using backend.DTOs;
+using backend.Entities;
+using Microsoft.EntityFrameworkCore;
+
+namespace backend.Services
+{
+    public interface IRestaurantService
+    {
+        public Task CreateRestaurant(string name, int userId);
+        public Task<RestaurantResponse> GetRestaurant();
+    }
+    public class RestaurantService : IRestaurantService
+    {
+        private readonly DataContext _context = null;
+
+        public RestaurantService(DataContext context)
+        {
+            _context = context;
+        }
+        public async Task CreateRestaurant(string name, int userId)
+        {
+            User user = await _context.Users.FindAsync(userId);
+            Restaurant restaurant = new Restaurant() { Name = name, Owner = user};
+            await _context.Restoraunts.AddAsync(restaurant);
+            await _context.SaveChangesAsync();
+        }
+
+        public async Task<RestaurantResponse> GetRestaurant()
+        {
+            RestaurantResponse res = await _context.Restoraunts
+                .Include(x => x.Reservations)
+                .Select(x => new RestaurantResponse()
+                {
+                    Id = x.Id,
+                    Name = x.Name,
+                    OwnerId = x.OwnerFk,
+                    Reservations = x.Reservations.Select(t => new ReservationResponse()
+                    {
+                        ContactName = t.ContactName,
+                        ContactNumber = t.ContactNumber,
+                        Persons = t.Persons,
+                        StartDate = t.StartDate,
+                        ReservationStatus = t.ReservationStatus,
+                        Id = t.Id,
+                        ReservationPlace = t.ReservationPlace,
+                        ReservationType = t.ReservationType
+                    }).ToList()
+                })
+                .FirstOrDefaultAsync();
+            return res;
+        }
+    }
+}
Index: resTools_backend/backend/Services/SmsService.cs
===================================================================
--- resTools_backend/backend/Services/SmsService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Services/SmsService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,20 @@
+﻿using backend.Entities;
+
+namespace backend.Services
+{
+    public interface ISmsService
+    {
+        public Task ReservationStatusUpdate(string name, string number, ReservationStatus newStatus);
+    }
+    public class SmsService : ISmsService
+    {
+        public async Task ReservationStatusUpdate(string name, string number, ReservationStatus newStatus)
+        {
+            string message = $"Hello {name}, the status of your reservation was changed to: { Enum.GetName(typeof(ReservationStatus), newStatus)}";
+
+            // simulate sending sms
+            await Task.Delay(100);
+            Console.WriteLine(message);
+        }
+    }
+}
Index: resTools_backend/backend/Services/UserService.cs
===================================================================
--- resTools_backend/backend/Services/UserService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/Services/UserService.cs	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,73 @@
+namespace backend.Services;
+
+using backend.Data;
+using backend.DTOs;
+using backend.Entities;
+using backend.Helpers;
+using backend.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Options;
+using Microsoft.IdentityModel.Tokens;
+using System.IdentityModel.Tokens.Jwt;
+using System.Security.Claims;
+
+public interface IUserService
+{
+    Task<AuthenticateResponse> Authenticate(AuthenticateRequest model);
+    Task<AuthenticateResponse> Register(CreateUserRequest req);
+    Task<User> GetById(int id);
+}
+
+public class UserService : IUserService
+{
+    private readonly AppSettings _appSettings;
+    private readonly DataContext _context = null;
+
+    public UserService(IOptions<AppSettings> appSettings, DataContext context)
+    {
+        _appSettings = appSettings.Value;
+        _context = context;
+    }
+
+    public async Task<AuthenticateResponse> Authenticate(AuthenticateRequest model)
+    {
+        User user = await _context.Users.FirstOrDefaultAsync(x => x.Email == model.Email && x.Password == model.Password);
+
+        // return null if user not found
+        if (user == null) return null;
+
+        // authentication successful so generate jwt token
+        var token = generateJwtToken(user);
+
+        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token};
+    }
+
+    public async Task<User> GetById(int id)
+    {
+        return await _context.Users.FindAsync(id);
+    }
+
+    public async Task<AuthenticateResponse> Register(CreateUserRequest req)
+    {
+        User user = new User() { Email = req.Email, Password = req.Password };
+        await _context.Users.AddAsync(user);
+        await _context.SaveChangesAsync();
+        var token = generateJwtToken(user);
+        return new AuthenticateResponse { Email = user.Email, Id = user.Id, Token = token };
+    }
+
+    private string generateJwtToken(User user)
+    {
+        // generate token that is valid for 7 days
+        var tokenHandler = new JwtSecurityTokenHandler();
+        var key = System.Text.Encoding.ASCII.GetBytes(_appSettings.Secret);
+        var tokenDescriptor = new SecurityTokenDescriptor
+        {
+            Subject = new ClaimsIdentity(new[] { new Claim("id", user.Id.ToString()) }),
+            Expires = DateTime.UtcNow.AddDays(7),
+            SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature)
+        };
+        var token = tokenHandler.CreateToken(tokenDescriptor);
+        return tokenHandler.WriteToken(token);
+    }
+}
Index: resTools_backend/backend/appsettings.Development.json
===================================================================
--- resTools_backend/backend/appsettings.Development.json	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/appsettings.Development.json	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,8 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning"
+    }
+  }
+}
Index: resTools_backend/backend/appsettings.json
===================================================================
--- resTools_backend/backend/appsettings.json	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/appsettings.json	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,15 @@
+{
+  "AppSettings": {
+    "Secret": "chWS2ewNYT2tpLWIm1L5ty12c8FINao7p65LxPPM7GjkytlI5X1iZYWuh5KQhZgxkQqf8FVZuklWTfp0fDd4pvFy8ND6ecgircfxG2IckDzte1I2ZrTMS7xhpsux8vLxLGkGUi9ZXOAO9oaOYP5IelwJdiHiryEj9BdfMGT1QgRfsHHazqz6gtrJIcdW2pb3yrXPGtQ20UvXgXxw7dyAwd3byZexM0t781qgp7rT71YgkVyc8YBx74U6DcWtSka7"
+  },
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning"
+    }
+  },
+  "ConnectionStrings": {
+    "DefaultConnection": "Server=localhost; port=5432; user id = postgres; database=resToolsDB; password=121212; pooling = true; includeerrordetail = true"
+  },
+  "AllowedHosts": "*"
+}
Index: resTools_backend/backend/backend.csproj
===================================================================
--- resTools_backend/backend/backend.csproj	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/backend/backend.csproj	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,29 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+  <PropertyGroup>
+    <TargetFramework>net6.0</TargetFramework>
+    <Nullable>enable</Nullable>
+    <ImplicitUsings>enable</ImplicitUsings>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <None Include="..\.editorconfig" Link=".editorconfig" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.3" />
+    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.3" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.3" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.3">
+      <PrivateAssets>all</PrivateAssets>
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+    </PackageReference>
+    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
+    <PackageReference Include="Npgsql" Version="6.0.3" />
+    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.3" />
+    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
+    <PackageReference Include="Swashbuckle.Core" Version="5.6.0" />
+    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.17.0" />
+  </ItemGroup>
+
+</Project>
Index: resTools_backend/resTools_backend.sln
===================================================================
--- resTools_backend/resTools_backend.sln	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
+++ resTools_backend/resTools_backend.sln	(revision 7a983b0054a13b5462a3e4a09e6fe5bf350d0949)
@@ -0,0 +1,30 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31912.275
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "backend", "backend\backend.csproj", "{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1369BF0A-CBA9-4788-8EB8-4E0AC8EA65B0}"
+	ProjectSection(SolutionItems) = preProject
+		.editorconfig = .editorconfig
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{69386AEC-421E-4DB5-8A83-E9DBD9AACD49}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {8BA7AC3F-E83E-4A90-B836-D0F3F25872A7}
+	EndGlobalSection
+EndGlobal
