mirror of https://github.com/ErsatzTV/ErsatzTV.git
16 changed files with 9931 additions and 7 deletions
@ -1,3 +1,5 @@ |
|||||||
|
using ErsatzTV.Core.Domain.Scheduling; |
||||||
|
|
||||||
namespace ErsatzTV.Application.Scheduling; |
namespace ErsatzTV.Application.Scheduling; |
||||||
|
|
||||||
public record BlockViewModel(int Id, string Name, int Minutes); |
public record BlockViewModel(int Id, string Name, int Minutes, BlockStopScheduling StopScheduling); |
||||||
|
@ -1,6 +1,12 @@ |
|||||||
using ErsatzTV.Core; |
using ErsatzTV.Core; |
||||||
|
using ErsatzTV.Core.Domain.Scheduling; |
||||||
|
|
||||||
namespace ErsatzTV.Application.Scheduling; |
namespace ErsatzTV.Application.Scheduling; |
||||||
|
|
||||||
public record ReplaceBlockItems(int BlockId, string Name, int Minutes, List<ReplaceBlockItem> Items) |
public record ReplaceBlockItems( |
||||||
|
int BlockId, |
||||||
|
string Name, |
||||||
|
int Minutes, |
||||||
|
BlockStopScheduling StopScheduling, |
||||||
|
List<ReplaceBlockItem> Items) |
||||||
: IRequest<Either<BaseError, List<BlockItemViewModel>>>; |
: IRequest<Either<BaseError, List<BlockItemViewModel>>>; |
||||||
|
@ -0,0 +1,7 @@ |
|||||||
|
namespace ErsatzTV.Core.Domain.Scheduling; |
||||||
|
|
||||||
|
public enum BlockStopScheduling |
||||||
|
{ |
||||||
|
AfterDurationEnd = 0, |
||||||
|
BeforeDurationEnd = 1 |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_BlockStopScheduling : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<int>( |
||||||
|
name: "StopScheduling", |
||||||
|
table: "Block", |
||||||
|
type: "int", |
||||||
|
nullable: false, |
||||||
|
defaultValue: 0); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "StopScheduling", |
||||||
|
table: "Block"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_BlockStopScheduling : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<int>( |
||||||
|
name: "StopScheduling", |
||||||
|
table: "Block", |
||||||
|
type: "INTEGER", |
||||||
|
nullable: false, |
||||||
|
defaultValue: 0); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "StopScheduling", |
||||||
|
table: "Block"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -1,8 +1,11 @@ |
|||||||
namespace ErsatzTV.ViewModels; |
using ErsatzTV.Core.Domain.Scheduling; |
||||||
|
|
||||||
|
namespace ErsatzTV.ViewModels; |
||||||
|
|
||||||
public class BlockItemsEditViewModel |
public class BlockItemsEditViewModel |
||||||
{ |
{ |
||||||
public string Name { get; set; } |
public string Name { get; set; } |
||||||
public int Minutes { get; set; } |
public int Minutes { get; set; } |
||||||
|
public BlockStopScheduling StopScheduling { get; set; } |
||||||
public List<BlockItemEditViewModel> Items { get; set; } |
public List<BlockItemEditViewModel> Items { get; set; } |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue