-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New - Ajout d'une mutation GraphQL pour activer/désactiver les delive…
…rymode
- Loading branch information
1 parent
f86a70a
commit e839124
Showing
9 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
Sheaft.Application.Commands/DeliveryMode/SetDeliveryModeAvailabilityCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Sheaft.Core; | ||
using Newtonsoft.Json; | ||
|
||
namespace Sheaft.Application.Commands | ||
{ | ||
public class SetDeliveryModeAvailabilityCommand : Command<bool> | ||
{ | ||
[JsonConstructor] | ||
public SetDeliveryModeAvailabilityCommand(RequestUser requestUser) : base(requestUser) | ||
{ | ||
} | ||
|
||
public Guid Id { get; set; } | ||
public bool Available { get; set; } | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Sheaft.Application.Commands/DeliveryMode/SetDeliveryModesAvailabilityCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Sheaft.Core; | ||
using Newtonsoft.Json; | ||
|
||
namespace Sheaft.Application.Commands | ||
{ | ||
public class SetDeliveryModesAvailabilityCommand : Command<bool> | ||
{ | ||
[JsonConstructor] | ||
public SetDeliveryModesAvailabilityCommand(RequestUser requestUser) : base(requestUser) | ||
{ | ||
} | ||
|
||
public IEnumerable<Guid> Ids { get; set; } | ||
public bool Available { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Sheaft.Application.Models/Inputs/SetDeliveryModesAvailabilityInput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Sheaft.Application.Models | ||
{ | ||
public class SetDeliveryModesAvailabilityInput | ||
{ | ||
public IEnumerable<Guid> Ids { get; set; } | ||
public bool Available { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Sheaft.GraphQL.Types/Inputs/SetDeliveryModesAvailabilityInputType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using HotChocolate.Types; | ||
using Sheaft.Application.Models; | ||
|
||
namespace Sheaft.GraphQL.Types | ||
{ | ||
public class SetDeliveryModesAvailabilityInputType : SheaftInputType<SetDeliveryModesAvailabilityInput> | ||
{ | ||
protected override void Configure(IInputObjectTypeDescriptor<SetDeliveryModesAvailabilityInput> descriptor) | ||
{ | ||
descriptor.Field(c => c.Available); | ||
|
||
descriptor.Field(c => c.Ids) | ||
.Type<NonNullType<ListType<IdType>>>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters