WIP: Adds several core models needed for functionality #24
137
.gitignore
vendored
Normal file
137
.gitignore
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Visual Studio cache files
|
||||
*.vs
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
*.azurePubxml
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
packages/
|
||||
## TODO: If the tool you use requires repositories.config, also uncomment the next line
|
||||
!packages/repositories.config
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
![Ss]tyle[Cc]op.targets
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
|
||||
*.publishsettings
|
||||
|
||||
# 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
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
# =========================
|
||||
# Windows detritus
|
||||
# =========================
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac desktop service store files
|
||||
.DS_Store
|
||||
|
||||
_NCrunch*
|
||||
|
||||
25
OpheliasOasis.sln
Normal file
25
OpheliasOasis.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32328.378
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpheliasOasis", "OpheliasOasis\OpheliasOasis.csproj", "{69288F69-68F7-4A9E-A740-507AE1CBF6CF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{69288F69-68F7-4A9E-A740-507AE1CBF6CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{69288F69-68F7-4A9E-A740-507AE1CBF6CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{69288F69-68F7-4A9E-A740-507AE1CBF6CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{69288F69-68F7-4A9E-A740-507AE1CBF6CF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A72041BE-1FE9-4C15-AED6-91C0217466EA}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
34
OpheliasOasis/Models/Guest.cs
Normal file
34
OpheliasOasis/Models/Guest.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ophelias.Guest.Models
|
||||
{
|
||||
internal class Guest
|
||||
{
|
||||
internal int Id;
|
||||
internal string FirstName;
|
||||
internal string LastName;
|
||||
internal string Email;
|
||||
internal string? CreditCard;
|
||||
|
||||
internal Guest(int id, string fname, string lname, string email)
|
||||
{
|
||||
Id = id;
|
||||
FirstName = fname;
|
||||
LastName = lname;
|
||||
Email = email;
|
||||
}
|
||||
internal Guest(int id, string fname, string lname, string email, string cc)
|
||||
{
|
||||
Id = id;
|
||||
FirstName = fname;
|
||||
LastName = lname;
|
||||
Email = email;
|
||||
CreditCard = cc;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
65
OpheliasOasis/Models/Reservation.cs
Normal file
65
OpheliasOasis/Models/Reservation.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oasis.Reservation.Models
|
||||
{
|
||||
internal class Reservation
|
||||
{
|
||||
internal int Id;
|
||||
internal int RoomId;
|
||||
internal int GuestId;
|
||||
internal int TransactionId;
|
||||
|
||||
internal bool IsNoShow;
|
||||
|
||||
internal ReservationType Type;
|
||||
internal ReservationStatus Status;
|
||||
|
||||
internal DateTime CreationDate;
|
||||
internal DateTime StartDate;
|
||||
internal DateTime EndDate;
|
||||
|
||||
internal DateTime? CheckIn;
|
||||
internal DateTime? CheckOut;
|
||||
internal DateTime? DateChanged;
|
||||
|
||||
internal Reservation(int id, int gid, int tid, int room, ReservationType type, ReservationStatus status,
|
||||
DateTime startdate, DateTime enddate)
|
||||
{
|
||||
Id = id;
|
||||
RoomId = room;
|
||||
GuestId = gid;
|
||||
TransactionId = tid;
|
||||
|
||||
IsNoShow = false;
|
||||
|
||||
Type = type;
|
||||
Status = status;
|
||||
|
||||
CreationDate = DateTime.Now;
|
||||
StartDate = startdate;
|
||||
EndDate = enddate;
|
||||
|
||||
CheckIn = null;
|
||||
CheckOut = null;
|
||||
DateChanged = null;
|
||||
}
|
||||
}
|
||||
|
||||
internal enum ReservationStatus
|
||||
{
|
||||
Active,
|
||||
Changed,
|
||||
Cancelled,
|
||||
}
|
||||
internal enum ReservationType
|
||||
{
|
||||
Conventional,
|
||||
Prepaid,
|
||||
Incentive,
|
||||
SixtyDayAdvance,
|
||||
}
|
||||
}
|
||||
12
OpheliasOasis/Models/Room.cs
Normal file
12
OpheliasOasis/Models/Room.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpheliasOasis.Models
|
||||
{
|
||||
internal class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
12
OpheliasOasis/Models/Transaction.cs
Normal file
12
OpheliasOasis/Models/Transaction.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpheliasOasis
|
||||
{
|
||||
internal class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
14
OpheliasOasis/OpheliasOasis.csproj
Normal file
14
OpheliasOasis/OpheliasOasis.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Data.SQLite" Version="1.0.115.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
18
OpheliasOasis/Program.cs
Normal file
18
OpheliasOasis/Program.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Reservations
|
||||
class Program
|
||||
{
|
||||
Reservation CreateReservation()
|
||||
{
|
||||
GuestInformation guestInformation = new GuestInformation();
|
||||
Console.WriteLine
|
||||
Console.ReadLine()
|
||||
}
|
||||
static void Main()
|
||||
{
|
||||
Console.WriteLine(
|
||||
"1. Employee\n" +
|
||||
"2. Customer\n" +
|
||||
"Are you an employee or customer?: "
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user