mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-08 04:48:44 +00:00
Add expiry date to cases
This commit is contained in:
parent
2238f771b3
commit
65bcf3ae8e
3 changed files with 35 additions and 0 deletions
|
@ -17,6 +17,8 @@ public class ModerationCase
|
|||
|
||||
public DateTime CaseCreated { get; set; }
|
||||
|
||||
public DateTime? CaseExpires { get; set; }
|
||||
|
||||
public int CaseCreatorId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(CaseCreatorId))]
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using LBPUnion.ProjectLighthouse;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ProjectLighthouse.Migrations
|
||||
{
|
||||
[DbContext(typeof(Database))]
|
||||
[Migration("20220610230647_AddExpirationDateToCases")]
|
||||
public class AddExpirationDateToCases : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "CaseExpires",
|
||||
table: "Cases",
|
||||
type: "datetime(6)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CaseExpires",
|
||||
table: "Cases");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,6 +48,9 @@ namespace ProjectLighthouse.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("CaseExpires")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("CaseType")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue