Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain.Entities;

public class DeviceFlowCodes : FullAggregateRoot<Guid, Guid>
public class DeviceFlowCodes
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class no longer inherits from FullAggregateRoot<Guid, Guid>. Existing EF Core entity configurations for DeviceFlowCodes configure properties like CreationTime (and use soft-delete filters), which are typically provided by the base type; removing the inheritance will break compilation (x => x.CreationTime) and/or the schema mapping. Either keep the FullAggregateRoot base class or update the entity (and all related EntityTypeConfiguration classes) to include/remove those properties consistently.

Suggested change
public class DeviceFlowCodes
public class DeviceFlowCodes : FullAggregateRoot<Guid, Guid>

Copilot uses AI. Check for mistakes.
{
/// <summary>
/// Gets or sets the device code.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain.Entities;

public class PersistedGrant : FullAggregateRoot<Guid, Guid>
public class PersistedGrant
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class no longer inherits from FullAggregateRoot<Guid, Guid>. This drops base properties (e.g., CreationTime) that are referenced by existing EF Core entity configurations (PersistedGrantEntityTypeConfiguration configures x.CreationTime), which will break compilation and/or mapping. Restore the original base type, or add the required properties and update all related EntityTypeConfiguration classes to match the new model.

Suggested change
public class PersistedGrant
using Masa.BuildingBlocks.Ddd.Domain.Entities;
public class PersistedGrant : FullAggregateRoot<Guid, Guid>

Copilot uses AI. Check for mistakes.
{
public string Key { get; private set; } = null!;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle.EntityConfigurations;
Expand All @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder<DeviceFlowCodes> builder)
builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false);
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false);
builder.Property(x => x.CreationTime).IsRequired();
builder.Property(x => x.Expiration).IsRequired();
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.Oracle.EntityConfigurations;
Expand All @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder<PersistedGrant> builder)
builder.Property(x => x.SessionId).HasMaxLength(100).IsRequired(false);
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
builder.Property(x => x.Description).HasMaxLength(200).IsRequired(false);
builder.Property(x => x.CreationTime).IsRequired();
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
builder.Property(x => x.Data).HasMaxLength(50000).IsRequired();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder<DeviceFlowCodes> builder)
builder.Property(x => x.SessionId).HasMaxLength(100);
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
builder.Property(x => x.Description).HasMaxLength(200);
builder.Property(x => x.CreationTime).IsRequired();
builder.Property(x => x.Expiration).IsRequired();
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder<PersistedGrant> builder)
builder.Property(x => x.SessionId).HasMaxLength(100);
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
builder.Property(x => x.Description).HasMaxLength(200);
builder.Property(x => x.CreationTime).IsRequired();
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
builder.Property(x => x.Data).HasMaxLength(50000).IsRequired();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.EntityConfigurations;
Expand All @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder<DeviceFlowCodes> builder)
builder.Property(x => x.SessionId).HasMaxLength(100);
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
builder.Property(x => x.Description).HasMaxLength(200);
builder.Property(x => x.CreationTime).IsRequired();
builder.Property(x => x.Expiration).IsRequired();
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.EntityConfigurations;
Expand All @@ -13,7 +13,6 @@ public void Configure(EntityTypeBuilder<PersistedGrant> builder)
builder.Property(x => x.SessionId).HasMaxLength(100);
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
builder.Property(x => x.Description).HasMaxLength(200);
builder.Property(x => x.CreationTime).IsRequired();
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
builder.Property(x => x.Data).HasMaxLength(50000).IsRequired();
Expand Down
Loading