Ajout des syncshell perma & temporaire
This commit is contained in:
@@ -128,4 +128,4 @@ public class MareDbContext : DbContext
|
||||
mb.Entity<CharaDataAllowance>().HasOne(u => u.AllowedGroup).WithMany().HasForeignKey(u => u.AllowedGroupGID).OnDelete(DeleteBehavior.Cascade);
|
||||
mb.Entity<CharaDataAllowance>().HasOne(u => u.AllowedUser).WithMany().HasForeignKey(u => u.AllowedUserUID).OnDelete(DeleteBehavior.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MareSynchronosServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class GroupTemporary : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "expires_at",
|
||||
table: "groups",
|
||||
type: "timestamp with time zone",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "is_temporary",
|
||||
table: "groups",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "expires_at",
|
||||
table: "groups");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "is_temporary",
|
||||
table: "groups");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -341,6 +341,10 @@ namespace MareSynchronosServer.Migrations
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("disable_vfx");
|
||||
|
||||
b.Property<DateTime?>("ExpiresAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("expires_at");
|
||||
|
||||
b.Property<bool>("IsPaused")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_paused");
|
||||
@@ -454,6 +458,10 @@ namespace MareSynchronosServer.Migrations
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("hashed_password");
|
||||
|
||||
b.Property<bool>("IsTemporary")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("is_temporary");
|
||||
|
||||
b.Property<bool>("InvitesEnabled")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("invites_enabled");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
@@ -16,4 +17,6 @@ public class Group
|
||||
public bool DisableSounds { get; set; }
|
||||
public bool DisableAnimations { get; set; }
|
||||
public bool DisableVFX { get; set; }
|
||||
public bool IsTemporary { get; set; }
|
||||
public DateTime? ExpiresAt { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user