Index: resTools_backend/backend/Controllers/MenuController.cs
===================================================================
--- resTools_backend/backend/Controllers/MenuController.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Controllers/MenuController.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,37 @@
+﻿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 MenuController : ControllerBase
+{
+    private readonly IMenuService _menuService = null;
+
+    public MenuController(IMenuService menuService)
+    {
+        _menuService = menuService;
+    }
+
+    [Authorize]
+    [HttpPost()]
+    public async Task<IActionResult> CreateMenuItem([FromBody] CreateMenuItemRequest req)
+    {
+        await _menuService.AddMenu(req);
+        return Ok();
+    }
+
+    [Authorize]
+    [HttpDelete("{id}")]
+    public async Task<IActionResult> DeleteMenuItem(int id)
+    {
+        await _menuService.RemoveMenu(id);
+        return Ok();
+    }
+}
Index: resTools_backend/backend/Controllers/ReservationsController.cs
===================================================================
--- resTools_backend/backend/Controllers/ReservationsController.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Controllers/ReservationsController.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -27,4 +27,11 @@
     }
 
+    [Authorize]
+    [HttpGet("new")]
+    public async Task<List<ReservationResponse>> GetReservationsNew()
+    {
+        return await _reservationService.GetNewReservations();
+    }
+
     [HttpPost()]
     public async Task<IActionResult> CreateReservation([FromBody] CreateReservationRequest req)
@@ -35,5 +42,5 @@
 
     [Authorize]
-    [HttpPut("{rid}")]
+    [HttpPut("{rid}/status")]
     public async Task<IActionResult> ChangeStatus(int rid, [FromQuery] ReservationStatus status)
     {
@@ -41,3 +48,11 @@
         return Ok();
     }
+
+    [Authorize]
+    [HttpPut("{rid}/table")]
+    public async Task<IActionResult> ChangeTable(int rid, [FromQuery] int tableId)
+    {
+        await _reservationService.AssignTable(tableId, rid);
+        return Ok();
+    }
 }
Index: resTools_backend/backend/Controllers/RestaurantsController.cs
===================================================================
--- resTools_backend/backend/Controllers/RestaurantsController.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Controllers/RestaurantsController.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -37,3 +37,18 @@
         return response;
     }
+
+    [HttpPost("upload")]
+    public async Task<IActionResult> UploadImage([FromForm] IFormFile file)
+    {
+        await _restaurantService.UploadImage(file);
+        return Ok();
+    }
+
+    [Authorize]
+    [HttpPut()]
+    public async Task<IActionResult> UpdateRestaurant([FromBody] UpdateRestaurantRequest req)
+    {
+        await _restaurantService.UpdateRestaurant(req);
+        return Ok();
+    }
 }
Index: resTools_backend/backend/DTOs/CreateMenuItemRequest.cs
===================================================================
--- resTools_backend/backend/DTOs/CreateMenuItemRequest.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/DTOs/CreateMenuItemRequest.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,14 @@
+﻿using Newtonsoft.Json;
+
+namespace backend.DTOs
+{
+    public class CreateMenuItemRequest
+    {
+        [JsonProperty]
+        public string Title { get; set; }
+        [JsonProperty]
+        public string Description { get; set; }
+        [JsonProperty]
+        public int Price { get; set; }
+    }
+}
Index: resTools_backend/backend/DTOs/MenuItemResponse.cs
===================================================================
--- resTools_backend/backend/DTOs/MenuItemResponse.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/DTOs/MenuItemResponse.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,16 @@
+﻿using Newtonsoft.Json;
+
+namespace backend.DTOs
+{
+    public class MenuItemResponse
+    {
+        [JsonProperty]
+        public int Id { get; set; }
+        [JsonProperty]
+        public string Title { get; set; }
+        [JsonProperty]
+        public string Description { get; set; }
+        [JsonProperty]
+        public int Price { get; set; }
+    }
+}
Index: resTools_backend/backend/DTOs/ReservationResponse.cs
===================================================================
--- resTools_backend/backend/DTOs/ReservationResponse.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/DTOs/ReservationResponse.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -22,4 +22,6 @@
         [JsonProperty]
         public string ContactNumber { get; set; }
+        [JsonProperty]
+        public int Table { get; set; }
     }
 }
Index: resTools_backend/backend/DTOs/RestaurantResponse.cs
===================================================================
--- resTools_backend/backend/DTOs/RestaurantResponse.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/DTOs/RestaurantResponse.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -6,9 +6,13 @@
     {
         [JsonProperty]
-        public int Id { get; set; }
+        public string Name { get; set; }
         [JsonProperty]
-        public int? OwnerId { get; set; }
+        public string Address { get; set; }
         [JsonProperty]
-        public string Name { get; set; }
+        public string Phone { get; set; }
+        [JsonProperty]
+        public List<MenuItemResponse> Menu { get; set; }
+        [JsonProperty]
+        public string Base64Image { get; set; }
     }
 }
Index: resTools_backend/backend/DTOs/UpdateRestaurantRequest.cs
===================================================================
--- resTools_backend/backend/DTOs/UpdateRestaurantRequest.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/DTOs/UpdateRestaurantRequest.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,14 @@
+﻿using Newtonsoft.Json;
+
+namespace backend.DTOs
+{
+    public class UpdateRestaurantRequest
+    {
+        [JsonProperty]
+        public string Name { get; set; }
+        [JsonProperty]
+        public string Address { get; set; }
+        [JsonProperty]
+        public string Phone { get; set; }
+    }
+}
Index: resTools_backend/backend/Data/DataContext.cs
===================================================================
--- resTools_backend/backend/Data/DataContext.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Data/DataContext.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -52,4 +52,18 @@
         }
 
+        private DbSet<MenuItem> menuItems;
+        public DbSet<MenuItem> MenuItems
+        {
+            get
+            {
+                if (menuItems == null)
+                {
+                    menuItems = Set<MenuItem>();
+                }
+
+                return menuItems;
+            }
+        }
+
 
         protected override void OnModelCreating(ModelBuilder modelBuilder)
@@ -74,4 +88,8 @@
             .HasMany(p => p.Reservations)
             .WithOne(b => b.Restaurant);
+            modelBuilder.Entity<Restaurant>()
+            .HasMany(p => p.Menu)
+            .WithOne(b => b.Restaurant);
+
 
             //
@@ -82,4 +100,12 @@
             .HasOne(p => p.Restaurant)
             .WithMany(b => b.Reservations);
+
+            //
+            // MenuItem
+            // 
+            modelBuilder.Entity<MenuItem>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd();
+            modelBuilder.Entity<MenuItem>()
+            .HasOne(p => p.Restaurant)
+            .WithMany(b => b.Menu);
         }
     }
Index: resTools_backend/backend/Entities/MenuItem.cs
===================================================================
--- resTools_backend/backend/Entities/MenuItem.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Entities/MenuItem.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,11 @@
+﻿namespace backend.Entities
+{
+    public class MenuItem
+    {
+        public int Id { get; set; }
+        public string Title { get; set; }
+        public string Description { get; set; }
+        public int Price { get; set; }
+        public virtual Restaurant Restaurant { get; set; }
+    }
+}
Index: resTools_backend/backend/Entities/Reservation.cs
===================================================================
--- resTools_backend/backend/Entities/Reservation.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Entities/Reservation.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -14,4 +14,5 @@
         public string ContactName { get; set; }
         public string ContactNumber { get; set; }
+        public int Table { get; set; }
     }
 
Index: resTools_backend/backend/Entities/Restaurant.cs
===================================================================
--- resTools_backend/backend/Entities/Restaurant.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Entities/Restaurant.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -9,5 +9,9 @@
         public virtual User Owner { get; set; }
         public virtual ICollection<Reservation> Reservations { get; set; }
+        public virtual ICollection<MenuItem> Menu { get; set; }
         public string Name { get; set; }
+        public string Address { get; set; }
+        public string Phone { get; set; }
+        public byte[] Image { get; set; }
     }
 }
Index: resTools_backend/backend/Migrations/20220705160351_Reservation-Tables.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220705160351_Reservation-Tables.Designer.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Migrations/20220705160351_Reservation-Tables.Designer.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,148 @@
+﻿// <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("20220705160351_Reservation-Tables")]
+    partial class ReservationTables
+    {
+        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.Property<int>("Table")
+                        .HasColumnType("integer");
+
+                    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/20220705160351_Reservation-Tables.cs
===================================================================
--- resTools_backend/backend/Migrations/20220705160351_Reservation-Tables.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Migrations/20220705160351_Reservation-Tables.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,26 @@
+﻿using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class ReservationTables : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<int>(
+                name: "Table",
+                table: "Reservations",
+                type: "integer",
+                nullable: false,
+                defaultValue: 0);
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "Table",
+                table: "Reservations");
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220705164500_Restaurant-Fields.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220705164500_Restaurant-Fields.Designer.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Migrations/20220705164500_Restaurant-Fields.Designer.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,160 @@
+﻿// <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("20220705164500_Restaurant-Fields")]
+    partial class RestaurantFields
+    {
+        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.Property<int>("Table")
+                        .HasColumnType("integer");
+
+                    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>("Address")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<byte[]>("Image")
+                        .IsRequired()
+                        .HasColumnType("bytea");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Phone")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    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/20220705164500_Restaurant-Fields.cs
===================================================================
--- resTools_backend/backend/Migrations/20220705164500_Restaurant-Fields.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Migrations/20220705164500_Restaurant-Fields.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,49 @@
+﻿using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class RestaurantFields : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<string>(
+                name: "Address",
+                table: "Restoraunts",
+                type: "text",
+                nullable: false,
+                defaultValue: "");
+
+            migrationBuilder.AddColumn<byte[]>(
+                name: "Image",
+                table: "Restoraunts",
+                type: "bytea",
+                nullable: false,
+                defaultValue: new byte[0]);
+
+            migrationBuilder.AddColumn<string>(
+                name: "Phone",
+                table: "Restoraunts",
+                type: "text",
+                nullable: false,
+                defaultValue: "");
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "Address",
+                table: "Restoraunts");
+
+            migrationBuilder.DropColumn(
+                name: "Image",
+                table: "Restoraunts");
+
+            migrationBuilder.DropColumn(
+                name: "Phone",
+                table: "Restoraunts");
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220706103351_Add-Menu.Designer.cs
===================================================================
--- resTools_backend/backend/Migrations/20220706103351_Add-Menu.Designer.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Migrations/20220706103351_Add-Menu.Designer.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,202 @@
+﻿// <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("20220706103351_Add-Menu")]
+    partial class AddMenu
+    {
+        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.MenuItem", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Description")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Price")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Title")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("MenuItems");
+                });
+
+            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.Property<int>("Table")
+                        .HasColumnType("integer");
+
+                    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>("Address")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<byte[]>("Image")
+                        .IsRequired()
+                        .HasColumnType("bytea");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int?>("OwnerFk")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Phone")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    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.MenuItem", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Menu")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
+                });
+
+            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("Menu");
+
+                    b.Navigation("Reservations");
+                });
+
+            modelBuilder.Entity("backend.Entities.User", b =>
+                {
+                    b.Navigation("Restaurant")
+                        .IsRequired();
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/20220706103351_Add-Menu.cs
===================================================================
--- resTools_backend/backend/Migrations/20220706103351_Add-Menu.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Migrations/20220706103351_Add-Menu.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,46 @@
+﻿using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace backend.Migrations
+{
+    public partial class AddMenu : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.CreateTable(
+                name: "MenuItems",
+                columns: table => new
+                {
+                    Id = table.Column<int>(type: "integer", nullable: false)
+                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+                    Title = table.Column<string>(type: "text", nullable: false),
+                    Description = table.Column<string>(type: "text", nullable: false),
+                    Price = table.Column<int>(type: "integer", nullable: false),
+                    RestaurantId = table.Column<int>(type: "integer", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_MenuItems", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_MenuItems_Restoraunts_RestaurantId",
+                        column: x => x.RestaurantId,
+                        principalTable: "Restoraunts",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                });
+
+            migrationBuilder.CreateIndex(
+                name: "IX_MenuItems_RestaurantId",
+                table: "MenuItems",
+                column: "RestaurantId");
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropTable(
+                name: "MenuItems");
+        }
+    }
+}
Index: resTools_backend/backend/Migrations/DataContextModelSnapshot.cs
===================================================================
--- resTools_backend/backend/Migrations/DataContextModelSnapshot.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Migrations/DataContextModelSnapshot.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -23,4 +23,33 @@
             NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 
+            modelBuilder.Entity("backend.Entities.MenuItem", b =>
+                {
+                    b.Property<int>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("integer");
+
+                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
+
+                    b.Property<string>("Description")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<int>("Price")
+                        .HasColumnType("integer");
+
+                    b.Property<int>("RestaurantId")
+                        .HasColumnType("integer");
+
+                    b.Property<string>("Title")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RestaurantId");
+
+                    b.ToTable("MenuItems");
+                });
+
             modelBuilder.Entity("backend.Entities.Reservation", b =>
                 {
@@ -57,4 +86,7 @@
                         .HasColumnType("timestamp with time zone");
 
+                    b.Property<int>("Table")
+                        .HasColumnType("integer");
+
                     b.HasKey("Id");
 
@@ -72,4 +104,12 @@
                     NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 
+                    b.Property<string>("Address")
+                        .IsRequired()
+                        .HasColumnType("text");
+
+                    b.Property<byte[]>("Image")
+                        .IsRequired()
+                        .HasColumnType("bytea");
+
                     b.Property<string>("Name")
                         .IsRequired()
@@ -78,4 +118,8 @@
                     b.Property<int?>("OwnerFk")
                         .HasColumnType("integer");
+
+                    b.Property<string>("Phone")
+                        .IsRequired()
+                        .HasColumnType("text");
 
                     b.HasKey("Id");
@@ -106,4 +150,15 @@
 
                     b.ToTable("Users");
+                });
+
+            modelBuilder.Entity("backend.Entities.MenuItem", b =>
+                {
+                    b.HasOne("backend.Entities.Restaurant", "Restaurant")
+                        .WithMany("Menu")
+                        .HasForeignKey("RestaurantId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Restaurant");
                 });
 
@@ -130,4 +185,6 @@
             modelBuilder.Entity("backend.Entities.Restaurant", b =>
                 {
+                    b.Navigation("Menu");
+
                     b.Navigation("Reservations");
                 });
Index: resTools_backend/backend/Program.cs
===================================================================
--- resTools_backend/backend/Program.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Program.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -46,4 +46,5 @@
 builder.Services.AddScoped<IRestaurantService, RestaurantService>();
 builder.Services.AddScoped<IReservationService, ReservationService>();
+builder.Services.AddScoped<IMenuService, MenuService>();
 builder.Services.AddScoped<ISmsService, SmsService>();
 
Index: resTools_backend/backend/Services/MenuService.cs
===================================================================
--- resTools_backend/backend/Services/MenuService.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
+++ resTools_backend/backend/Services/MenuService.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -0,0 +1,45 @@
+﻿using backend.Data;
+using backend.DTOs;
+using backend.Entities;
+using Microsoft.EntityFrameworkCore;
+
+namespace backend.Services
+{
+    public interface IMenuService
+    {
+        public Task AddMenu(CreateMenuItemRequest menu);
+        public Task RemoveMenu(int id);
+    }
+    public class MenuService : IMenuService
+    {
+        private readonly DataContext _context = null;
+        public MenuService(DataContext context)
+        {
+            _context = context;
+        }
+        public async Task AddMenu(CreateMenuItemRequest menu)
+        {
+            var res = await _context.Restoraunts.FirstOrDefaultAsync();
+            if(res.Menu == null)
+            {
+                res.Menu = new List<MenuItem>();
+            }
+            res.Menu.Add(new MenuItem()
+            {
+                Title = menu.Title,
+                Description = menu.Description,
+                Price = menu.Price
+            });
+            _context.Restoraunts.Update(res);
+            await _context.SaveChangesAsync();
+        }
+
+        public async Task RemoveMenu(int id)
+        {
+            var res = await _context.Restoraunts.Include(x => x.Menu).FirstOrDefaultAsync();
+            res.Menu = res.Menu.Where(x => x.Id != id).ToList();
+            _context.Restoraunts.Update(res);
+            await _context.SaveChangesAsync();
+        }
+    }
+}
Index: resTools_backend/backend/Services/ReservationService.cs
===================================================================
--- resTools_backend/backend/Services/ReservationService.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Services/ReservationService.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -11,4 +11,6 @@
         public Task ChangeReservationStatus(int resId, ReservationStatus status);
         public Task<List<ReservationResponse>> GetReservatins(DateTime from, DateTime to);
+        public Task<List<ReservationResponse>> GetNewReservations();
+        public Task AssignTable(int tableId, int reservationId);
     }
     public class ReservationService : IReservationService
@@ -21,4 +23,12 @@
             _context = context;
             _smsService = smsService;
+        }
+
+        public async Task AssignTable(int tableId, int reservationId)
+        {
+            var reservation = await _context.Reservations.FindAsync(reservationId);
+            reservation.Table = tableId;
+            _context.Update(reservation);
+            await _context.SaveChangesAsync();
         }
 
@@ -50,4 +60,25 @@
         }
 
+        public async Task<List<ReservationResponse>> GetNewReservations()
+        {
+            Restaurant res = await _context.Restoraunts
+               .Include(x => x.Reservations
+                   .Where(x => x.ReservationStatus == ReservationStatus.New))
+               .FirstOrDefaultAsync();
+            var reservations = res.Reservations.Select(t => new ReservationResponse()
+            {
+                ContactName = t.ContactName,
+                ContactNumber = t.ContactNumber,
+                Persons = t.Persons,
+                StartDate = t.StartDate,
+                ReservationStatus = t.ReservationStatus,
+                Table = t.Table,
+                Id = t.Id,
+                ReservationPlace = t.ReservationPlace,
+                ReservationType = t.ReservationType
+            }).OrderByDescending(x => x.ReservationStatus == ReservationStatus.New).ToList();
+            return reservations;
+        }
+
         public async Task<List<ReservationResponse>> GetReservatins(DateTime from, DateTime to)
         {
@@ -63,4 +94,5 @@
                 StartDate = t.StartDate,
                 ReservationStatus = t.ReservationStatus,
+                Table = t.Table,
                 Id = t.Id,
                 ReservationPlace = t.ReservationPlace,
Index: resTools_backend/backend/Services/RestaurantService.cs
===================================================================
--- resTools_backend/backend/Services/RestaurantService.cs	(revision d76b7ee9036d8c2315eb8ce0de42c77ae3e87822)
+++ resTools_backend/backend/Services/RestaurantService.cs	(revision cc4db18b6d338be00c6c1e9b88f8e93ef763f7b6)
@@ -10,4 +10,6 @@
         public Task CreateRestaurant(string name, int userId);
         public Task<RestaurantResponse> GetRestaurant();
+        public Task UploadImage(IFormFile file);
+        public Task UpdateRestaurant(UpdateRestaurantRequest req);
     }
     public class RestaurantService : IRestaurantService
@@ -32,11 +34,41 @@
                 .Select(x => new RestaurantResponse()
                 {
-                    Id = x.Id,
                     Name = x.Name,
-                    OwnerId = x.OwnerFk,
+                    Address = x.Address,
+                    Phone = x.Phone,
+                    Base64Image = String.Format("data:image/png;base64,{0}", Convert.ToBase64String(x.Image)),
+                    Menu = x.Menu.Select(x => new MenuItemResponse()
+                    {
+                        Id = x.Id,
+                        Title = x.Title,
+                        Description = x.Description,
+                        Price = x.Price
+                    }).ToList()
                 })
                 .FirstOrDefaultAsync();
             return res;
         }
+
+        public async Task UpdateRestaurant(UpdateRestaurantRequest req)
+        {
+            var restaurant = await _context.Restoraunts.FirstOrDefaultAsync();
+            restaurant.Name = req.Name;
+            restaurant.Address = req.Address;
+            restaurant.Phone = req.Phone;
+            _context.Restoraunts.Update(restaurant);
+            await _context.SaveChangesAsync();
+        }
+
+        public async Task UploadImage(IFormFile file)
+        {
+            using (var memoryStream = new MemoryStream())
+            {
+                await file.CopyToAsync(memoryStream);
+                var restaurant = await _context.Restoraunts.FirstOrDefaultAsync();
+                restaurant.Image = memoryStream.ToArray();
+                _context.Restoraunts.Update(restaurant);
+                _context.SaveChanges();
+            }
+        }
     }
 }
