Add isweb to instance
This commit is contained in:
parent
b3b6a5d6fc
commit
5aabf35f9d
@ -12,6 +12,7 @@ namespace ManagerService.DTOs
|
||||
public bool isStatistic { get; set; }
|
||||
public bool isMobile { get; set; }
|
||||
public bool isTablet { get; set; }
|
||||
public bool isWeb { get; set; }
|
||||
public bool isVR { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,8 @@ namespace ManagerService.Data
|
||||
|
||||
public bool IsTablet { get; set; }
|
||||
|
||||
public bool IsWeb { get; set; }
|
||||
|
||||
public bool IsVR { get; set; }
|
||||
|
||||
|
||||
@ -43,6 +45,7 @@ namespace ManagerService.Data
|
||||
isStatistic = IsStatistic,
|
||||
isMobile = IsMobile,
|
||||
isTablet = IsTablet,
|
||||
isWeb = IsWeb,
|
||||
isVR = IsVR,
|
||||
};
|
||||
}
|
||||
@ -56,6 +59,7 @@ namespace ManagerService.Data
|
||||
IsStatistic = instanceDTO.isStatistic;
|
||||
IsMobile = instanceDTO.isMobile;
|
||||
IsTablet = instanceDTO.isTablet;
|
||||
IsWeb = instanceDTO.isWeb;
|
||||
IsVR = instanceDTO.isVR;
|
||||
return this;
|
||||
}
|
||||
|
||||
1205
ManagerService/Migrations/20250801132952_AddedIsWebtoInstance.Designer.cs
generated
Normal file
1205
ManagerService/Migrations/20250801132952_AddedIsWebtoInstance.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
119
ManagerService/Migrations/20250801132952_AddedIsWebtoInstance.cs
Normal file
119
ManagerService/Migrations/20250801132952_AddedIsWebtoInstance.cs
Normal file
@ -0,0 +1,119 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ManagerService.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedIsWebtoInstance : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MapAnnotation_ProgrammeBlocks_ProgrammeBlockId",
|
||||
table: "MapAnnotation");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MapAnnotation_Resources_IconResourceId",
|
||||
table: "MapAnnotation");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_MapAnnotation",
|
||||
table: "MapAnnotation");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "MapAnnotation",
|
||||
newName: "MapAnnotations");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_MapAnnotation_ProgrammeBlockId",
|
||||
table: "MapAnnotations",
|
||||
newName: "IX_MapAnnotations_ProgrammeBlockId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_MapAnnotation_IconResourceId",
|
||||
table: "MapAnnotations",
|
||||
newName: "IX_MapAnnotations_IconResourceId");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsWeb",
|
||||
table: "Instances",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MapAnnotations",
|
||||
table: "MapAnnotations",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MapAnnotations_ProgrammeBlocks_ProgrammeBlockId",
|
||||
table: "MapAnnotations",
|
||||
column: "ProgrammeBlockId",
|
||||
principalTable: "ProgrammeBlocks",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MapAnnotations_Resources_IconResourceId",
|
||||
table: "MapAnnotations",
|
||||
column: "IconResourceId",
|
||||
principalTable: "Resources",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MapAnnotations_ProgrammeBlocks_ProgrammeBlockId",
|
||||
table: "MapAnnotations");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MapAnnotations_Resources_IconResourceId",
|
||||
table: "MapAnnotations");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_MapAnnotations",
|
||||
table: "MapAnnotations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsWeb",
|
||||
table: "Instances");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "MapAnnotations",
|
||||
newName: "MapAnnotation");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_MapAnnotations_ProgrammeBlockId",
|
||||
table: "MapAnnotation",
|
||||
newName: "IX_MapAnnotation_ProgrammeBlockId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_MapAnnotations_IconResourceId",
|
||||
table: "MapAnnotation",
|
||||
newName: "IX_MapAnnotation_IconResourceId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MapAnnotation",
|
||||
table: "MapAnnotation",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MapAnnotation_ProgrammeBlocks_ProgrammeBlockId",
|
||||
table: "MapAnnotation",
|
||||
column: "ProgrammeBlockId",
|
||||
principalTable: "ProgrammeBlocks",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MapAnnotation_Resources_IconResourceId",
|
||||
table: "MapAnnotation",
|
||||
column: "IconResourceId",
|
||||
principalTable: "Resources",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -253,6 +253,9 @@ namespace ManagerService.Migrations
|
||||
b.Property<bool>("IsVR")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsWeb")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
@ -693,7 +696,7 @@ namespace ManagerService.Migrations
|
||||
|
||||
b.HasIndex("ProgrammeBlockId");
|
||||
|
||||
b.ToTable("MapAnnotation");
|
||||
b.ToTable("MapAnnotations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ManagerService.Data.SubSection.SectionEvent+ProgrammeBlock", b =>
|
||||
|
||||
@ -188,7 +188,7 @@ namespace ManagerService
|
||||
app.UseCors(
|
||||
#if DEBUG
|
||||
options => options
|
||||
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "http://localhost:52444")
|
||||
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "http://localhost:53264")
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user