From 440ef5fe658fadc9d585db3e556580cb053524cd Mon Sep 17 00:00:00 2001 From: Emanuele Filardo Date: Sat, 12 Oct 2019 12:04:09 +0200 Subject: [PATCH] Add IDeletable to PageModule --- Oqtane.Server/Scripts/00.00.00.sql | 9 ++++++--- Oqtane.Shared/Models/PageModule.cs | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Oqtane.Server/Scripts/00.00.00.sql b/Oqtane.Server/Scripts/00.00.00.sql index db6befc2..34013954 100644 --- a/Oqtane.Server/Scripts/00.00.00.sql +++ b/Oqtane.Server/Scripts/00.00.00.sql @@ -18,7 +18,7 @@ CREATE TABLE [dbo].[Site]( [ModifiedOn] [datetime] NOT NULL, [DeletedBy] [nvarchar](256) NULL, [DeletedOn] [datetime] NULL, - [IsDeleted][bit] NOT NULL + [IsDeleted][bit] NOT NULL, CONSTRAINT [PK_Site] PRIMARY KEY CLUSTERED ( [SiteId] ASC @@ -44,7 +44,7 @@ CREATE TABLE [dbo].[Page]( [ModifiedOn] [datetime] NOT NULL, [DeletedBy] [nvarchar](256) NULL, [DeletedOn] [datetime] NULL, - [IsDeleted][bit] NOT NULL + [IsDeleted][bit] NOT NULL, CONSTRAINT [PK_Page] PRIMARY KEY CLUSTERED ( [PageId] ASC @@ -79,6 +79,9 @@ CREATE TABLE [dbo].[PageModule]( [CreatedOn] [datetime] NOT NULL, [ModifiedBy] [nvarchar](256) NOT NULL, [ModifiedOn] [datetime] NOT NULL, + [DeletedBy] [nvarchar](256) NULL, + [DeletedOn] [datetime] NULL, + [IsDeleted][bit] NOT NULL, CONSTRAINT [PK_PageModule] PRIMARY KEY CLUSTERED ( [PageModuleId] ASC @@ -97,7 +100,7 @@ CREATE TABLE [dbo].[User]( [ModifiedOn] [datetime] NOT NULL, [DeletedBy] [nvarchar](256) NULL, [DeletedOn] [datetime] NULL, - [IsDeleted][bit] NOT NULL + [IsDeleted][bit] NOT NULL, CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED ( [UserId] ASC diff --git a/Oqtane.Shared/Models/PageModule.cs b/Oqtane.Shared/Models/PageModule.cs index ffeb1872..7812861a 100644 --- a/Oqtane.Shared/Models/PageModule.cs +++ b/Oqtane.Shared/Models/PageModule.cs @@ -2,7 +2,7 @@ namespace Oqtane.Models { - public class PageModule : IAuditable + public class PageModule : IAuditable, IDeletable { public int PageModuleId { get; set; } public int PageId { get; set; } @@ -16,6 +16,9 @@ namespace Oqtane.Models public DateTime CreatedOn { get; set; } public string ModifiedBy { get; set; } public DateTime ModifiedOn { get; set; } + public string DeletedBy { get; set; } + public DateTime? DeletedOn { get; set; } + public bool IsDeleted { get; set; } public Module Module { get; set; }