diff --git a/.vs/FIT5032-Assignment/v17/.suo b/.vs/FIT5032-Assignment/v17/.suo deleted file mode 100644 index 8ed3024..0000000 Binary files a/.vs/FIT5032-Assignment/v17/.suo and /dev/null differ diff --git a/FIT5032-Assignment/App_Data/FIT5032_Assignment.mdf b/FIT5032-Assignment/App_Data/FIT5032_Assignment.mdf index d937406..d9156e2 100644 Binary files a/FIT5032-Assignment/App_Data/FIT5032_Assignment.mdf and b/FIT5032-Assignment/App_Data/FIT5032_Assignment.mdf differ diff --git a/FIT5032-Assignment/App_Data/FIT5032_Assignment_log.ldf b/FIT5032-Assignment/App_Data/FIT5032_Assignment_log.ldf index 7116185..91b6b32 100644 Binary files a/FIT5032-Assignment/App_Data/FIT5032_Assignment_log.ldf and b/FIT5032-Assignment/App_Data/FIT5032_Assignment_log.ldf differ diff --git a/FIT5032-Assignment/Models/FIT5032-Assignment.edmx b/FIT5032-Assignment/Models/FIT5032-Assignment.edmx index aa4935c..1fefeae 100644 --- a/FIT5032-Assignment/Models/FIT5032-Assignment.edmx +++ b/FIT5032-Assignment/Models/FIT5032-Assignment.edmx @@ -158,6 +158,7 @@ + @@ -435,6 +436,7 @@ + @@ -758,6 +760,7 @@ + diff --git a/FIT5032-Assignment/Models/FIT5032-Assignment.edmx.sql b/FIT5032-Assignment/Models/FIT5032-Assignment.edmx.sql index a887dfe..b6f012f 100644 --- a/FIT5032-Assignment/Models/FIT5032-Assignment.edmx.sql +++ b/FIT5032-Assignment/Models/FIT5032-Assignment.edmx.sql @@ -2,13 +2,13 @@ -- -------------------------------------------------- -- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure -- -------------------------------------------------- --- Date Created: 09/14/2023 16:21:56 +-- Date Created: 09/15/2023 08:16:24 -- Generated from EDMX file: C:\Users\astri\source\repos\FIT5032-Assignment\FIT5032-Assignment\Models\FIT5032-Assignment.edmx -- -------------------------------------------------- SET QUOTED_IDENTIFIER OFF; GO -USE [Database1]; +USE [FIT5032_Assignment]; GO IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]'); GO @@ -23,39 +23,39 @@ GO IF OBJECT_ID(N'[dbo].[FK__Appointme__respo__5BE2A6F2]', 'F') IS NOT NULL ALTER TABLE [dbo].[Appointments] DROP CONSTRAINT [FK__Appointme__respo__5BE2A6F2]; GO +IF OBJECT_ID(N'[dbo].[FK__Images__appointm__60A75C0F]', 'F') IS NOT NULL + ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__appointm__60A75C0F]; +GO +IF OBJECT_ID(N'[dbo].[FK__Reviews__appoint__6383C8BA]', 'F') IS NOT NULL + ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__appoint__6383C8BA]; +GO IF OBJECT_ID(N'[dbo].[FK__Credential__user__4BAC3F29]', 'F') IS NOT NULL ALTER TABLE [dbo].[Credentials] DROP CONSTRAINT [FK__Credential__user__4BAC3F29]; GO IF OBJECT_ID(N'[dbo].[FK__Doctors__user__5441852A]', 'F') IS NOT NULL ALTER TABLE [dbo].[Doctors] DROP CONSTRAINT [FK__Doctors__user__5441852A]; GO -IF OBJECT_ID(N'[dbo].[FK__Images__appointm__60A75C0F]', 'F') IS NOT NULL - ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__appointm__60A75C0F]; +IF OBJECT_ID(N'[dbo].[FK__Images__responsi__5FB337D6]', 'F') IS NOT NULL + ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__responsi__5FB337D6]; +GO +IF OBJECT_ID(N'[dbo].[FK__Reviews__doctor__656C112C]', 'F') IS NOT NULL + ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__doctor__656C112C]; GO IF OBJECT_ID(N'[dbo].[FK__Images__patient__5EBF139D]', 'F') IS NOT NULL ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__patient__5EBF139D]; GO -IF OBJECT_ID(N'[dbo].[FK__Images__responsi__5FB337D6]', 'F') IS NOT NULL - ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__responsi__5FB337D6]; +IF OBJECT_ID(N'[dbo].[FK__ShareURLs__image__68487DD7]', 'F') IS NOT NULL + ALTER TABLE [dbo].[ShareURLs] DROP CONSTRAINT [FK__ShareURLs__image__68487DD7]; GO IF OBJECT_ID(N'[dbo].[FK__Patients__user__5165187F]', 'F') IS NOT NULL ALTER TABLE [dbo].[Patients] DROP CONSTRAINT [FK__Patients__user__5165187F]; GO -IF OBJECT_ID(N'[dbo].[FK__Reviews__appoint__6383C8BA]', 'F') IS NOT NULL - ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__appoint__6383C8BA]; -GO -IF OBJECT_ID(N'[dbo].[FK__Reviews__doctor__656C112C]', 'F') IS NOT NULL - ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__doctor__656C112C]; -GO IF OBJECT_ID(N'[dbo].[FK__Reviews__patient__6477ECF3]', 'F') IS NOT NULL ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__patient__6477ECF3]; GO IF OBJECT_ID(N'[dbo].[FK__Sessions__user__4E88ABD4]', 'F') IS NOT NULL ALTER TABLE [dbo].[Sessions] DROP CONSTRAINT [FK__Sessions__user__4E88ABD4]; GO -IF OBJECT_ID(N'[dbo].[FK__ShareURLs__image__68487DD7]', 'F') IS NOT NULL - ALTER TABLE [dbo].[ShareURLs] DROP CONSTRAINT [FK__ShareURLs__image__68487DD7]; -GO -- -------------------------------------------------- -- Dropping existing tables @@ -180,7 +180,8 @@ CREATE TABLE [dbo].[Users] ( [uuid] varchar(36) NOT NULL, [displayName] varchar(max) NULL, [avatar] varchar(max) NULL, - [role] int NULL + [role] int NULL, + [status] smallint NOT NULL ); GO diff --git a/FIT5032-Assignment/Models/Users.cs b/FIT5032-Assignment/Models/Users.cs index 1cba9d3..cfef41e 100644 --- a/FIT5032-Assignment/Models/Users.cs +++ b/FIT5032-Assignment/Models/Users.cs @@ -25,6 +25,7 @@ namespace FIT5032_Assignment.Models public string displayName { get; set; } public string avatar { get; set; } public Nullable role { get; set; } + public short status { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection Credentials { get; set; } diff --git a/FIT5032-Assignment/Web.config b/FIT5032-Assignment/Web.config index 6075986..4903de7 100644 --- a/FIT5032-Assignment/Web.config +++ b/FIT5032-Assignment/Web.config @@ -61,7 +61,7 @@ - +