<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Models
{
    [Serializable]
    public class Review
    {
        public int ID { get; set; }
        public string ReviewBody { get; set; }
        public string ReviewByUser { get; set; }
        public int Rating { get; set; }

        public IList<RouteReview> RouteReviews { get; set; }

    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Models
{
    public class RouteReview
    {
        public int ID { get; set; }

        public int RouteID { get; set; }
        public Route Route { get; set; }

        public int ReviewID { get; set; }
        public Review Review { get; set; }

    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Models
{
    [Serializable]
    public class Route
    {
        public int ID { get; set; }
        public string RouteName { get; set; }
        public string Origin { get; set; }
        public string Waypoints { get; set; }
        public string Destination { get; set; }
        public string CreatedByUser { get; set; }
        public string BriefDescription { get; set; }

        public IList<UserRoute> UserRoutes { get; set; }

        public IList<RouteReview> RouteReviews { get; set; }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Models
{
    public class FriendRequest
    {
        public int ID { get; set; }
        public int RequestingUserID { get; set; }
        public string RequestingUserScreenName { get; set; }
        public int RequestedUserID { get; set; }
        public string RequestedUserScreenName { get; set; }
        public DateTime CreationTime { get; set; }

    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Models
{
    public class Message
    {
        public int ID { get; set; }
        public DateTime CreationTime { get; set; }
        public string Body { get; set; }
        public int ReceiverID { get; set; }
        public string ReceiverScreenName { get; set; }
        public int SendersID { get; set; }
        public string SenderScreenName { get; set; }
        public bool Viewed { get; set; }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Models
{
    public class Friendships
    {
        public int ID { get; set; }

        public string ScreenNameA { get; set; }
        public string ScreenNameB { get; set; }

    }
}
<file_sep>﻿using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;

namespace WebApplication1.Migrations
{
    public partial class fs217 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "UserIDA",
                table: "Friendships");

            migrationBuilder.DropColumn(
                name: "UserIDB",
                table: "Friendships");

            migrationBuilder.AddColumn<string>(
                name: "ScreenNameA",
                table: "Friendships",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ScreenNameB",
                table: "Friendships",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ScreenNameA",
                table: "Friendships");

            migrationBuilder.DropColumn(
                name: "ScreenNameB",
                table: "Friendships");

            migrationBuilder.AddColumn<int>(
                name: "UserIDA",
                table: "Friendships",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "UserIDB",
                table: "Friendships",
                nullable: false,
                defaultValue: 0);
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Models
{
    public class User
    {
        public int ID { get; set; }
        public string ScreenName { get; set; }
        public string Email { get; set; }
        public string PhoneNumber { get; set; }

        public string PasswordHash { get; set; }
        public string HashCode { get; set; }
        public DateTime CreationTime { get; set; }
        public DateTime ModificationTime { get; set; }

        public int TrailsBlazed { get; set; }
        public int ReviewsMade { get; set; }

        public IList<UserRoute> UserRoutes { get; set; }
    }
}
