Compare commits
3 Commits
release/1.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 18fc3fb3f2 | |||
| fafbc55732 | |||
| 555273aed1 |
@ -40,6 +40,6 @@ namespace gehGassi.Dto.Walks
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Zahlungsart für den Walk
|
/// Zahlungsart für den Walk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WalkPaymentTypeDto PaymentType { get; set; }
|
public WalkPaymentTypeDto? PaymentType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,6 +105,6 @@ namespace gehGassi.Dto.Walks
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Zahlungsart für den Walk
|
/// Zahlungsart für den Walk
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WalkPaymentTypeDto PaymentType { get; set; }
|
public WalkPaymentTypeDto? PaymentType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9480
gehGassi.Persistence/Migrations/20250915133307_Walk_PaymentType_DefaultSet.Designer.cs
generated
Normal file
9480
gehGassi.Persistence/Migrations/20250915133307_Walk_PaymentType_DefaultSet.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace gehGassi.Persistence.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Walk_PaymentType_DefaultSet : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "PaymentType",
|
||||||
|
table: "Walks",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 1,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "int");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "PaymentType",
|
||||||
|
table: "Walks",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "int",
|
||||||
|
oldDefaultValue: 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7819,7 +7819,9 @@ namespace gehGassi.Persistence.Migrations
|
|||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("PaymentType")
|
b.Property<int>("PaymentType")
|
||||||
.HasColumnType("int");
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasDefaultValue(1);
|
||||||
|
|
||||||
b.Property<Point>("PickupLocation")
|
b.Property<Point>("PickupLocation")
|
||||||
.HasColumnType("geography");
|
.HasColumnType("geography");
|
||||||
|
|||||||
@ -383,6 +383,7 @@ namespace gehGassi.Persistence
|
|||||||
builder.Entity<Walk>().OwnsOne(p => p.ReturnAddress);
|
builder.Entity<Walk>().OwnsOne(p => p.ReturnAddress);
|
||||||
builder.Entity<Walk>().Property(c => c.Price).HasColumnType("decimal(18,2)");
|
builder.Entity<Walk>().Property(c => c.Price).HasColumnType("decimal(18,2)");
|
||||||
builder.Entity<Walk>().Property(c => c.VoucherAmmount).HasColumnType("decimal(18,2)");
|
builder.Entity<Walk>().Property(c => c.VoucherAmmount).HasColumnType("decimal(18,2)");
|
||||||
|
builder.Entity<Walk>().Property(c => c.PaymentType).HasDefaultValue(WalkPaymentType.MangoPay);
|
||||||
|
|
||||||
builder.Entity<WalkComplaint>().HasIndex(c => c.Index);
|
builder.Entity<WalkComplaint>().HasIndex(c => c.Index);
|
||||||
builder.Entity<WalkComplaint>().HasOne<Walk>().WithMany().HasForeignKey(c => c.WalkId).OnDelete(DeleteBehavior.Cascade);
|
builder.Entity<WalkComplaint>().HasOne<Walk>().WithMany().HasForeignKey(c => c.WalkId).OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|||||||
@ -776,7 +776,7 @@ namespace gehGassi.Web.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="model">Model</param>
|
/// <param name="model">Model</param>
|
||||||
/// <returns>Json</returns>
|
/// <returns>Json</returns>
|
||||||
[Authorize(Policy = Policies.PowerUserOnly)]
|
[Authorize(Policy = Policies.CustomerOnly)]
|
||||||
[HasPermission(Permission.AdvertisementsManage, Permission.AdvertisementsEdit)]
|
[HasPermission(Permission.AdvertisementsManage, Permission.AdvertisementsEdit)]
|
||||||
[CustomerAuthorize("CustomerId")]
|
[CustomerAuthorize("CustomerId")]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
|
|||||||
@ -1039,7 +1039,7 @@ namespace gehGassi.Web.Controllers.Api
|
|||||||
walk.CompletedInfo = string.Empty;
|
walk.CompletedInfo = string.Empty;
|
||||||
walk.Defactation = false;
|
walk.Defactation = false;
|
||||||
walk.PaymentStatus = PaymentStatus.Pending;
|
walk.PaymentStatus = PaymentStatus.Pending;
|
||||||
walk.PaymentType = (WalkPaymentType)model.PaymentType;
|
walk.PaymentType = model.PaymentType != null ? (WalkPaymentType)model.PaymentType : WalkPaymentType.MangoPay;
|
||||||
walk.UpdatedAt = DateTimeOffset.UtcNow;
|
walk.UpdatedAt = DateTimeOffset.UtcNow;
|
||||||
walk.Created = DateTimeOffset.UtcNow;
|
walk.Created = DateTimeOffset.UtcNow;
|
||||||
|
|
||||||
@ -3630,7 +3630,7 @@ namespace gehGassi.Web.Controllers.Api
|
|||||||
walk.CompletedInfo = string.Empty;
|
walk.CompletedInfo = string.Empty;
|
||||||
walk.Defactation = false;
|
walk.Defactation = false;
|
||||||
walk.PaymentStatus = PaymentStatus.Pending;
|
walk.PaymentStatus = PaymentStatus.Pending;
|
||||||
walk.PaymentType = (WalkPaymentType)model.PaymentType;
|
walk.PaymentType = model.PaymentType != null ? (WalkPaymentType)model.PaymentType : WalkPaymentType.MangoPay;
|
||||||
walk.UpdatedAt = DateTimeOffset.UtcNow;
|
walk.UpdatedAt = DateTimeOffset.UtcNow;
|
||||||
walk.Created = DateTimeOffset.UtcNow;
|
walk.Created = DateTimeOffset.UtcNow;
|
||||||
|
|
||||||
@ -3810,7 +3810,7 @@ namespace gehGassi.Web.Controllers.Api
|
|||||||
walk.CompletedInfo = string.Empty;
|
walk.CompletedInfo = string.Empty;
|
||||||
walk.Defactation = false;
|
walk.Defactation = false;
|
||||||
walk.PaymentStatus = PaymentStatus.None;
|
walk.PaymentStatus = PaymentStatus.None;
|
||||||
walk.PaymentType = (WalkPaymentType)model.PaymentType;
|
walk.PaymentType = model.PaymentType != null ? (WalkPaymentType)model.PaymentType : WalkPaymentType.MangoPay;
|
||||||
walk.UpdatedAt = DateTimeOffset.UtcNow;
|
walk.UpdatedAt = DateTimeOffset.UtcNow;
|
||||||
walk.Created = DateTimeOffset.UtcNow;
|
walk.Created = DateTimeOffset.UtcNow;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user