-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add responsibility users for app (#437)
- Loading branch information
1 parent
316a84a
commit 2b51637
Showing
31 changed files
with
1,494 additions
and
137 deletions.
There are no files selected for viewing
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
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
src/Infrastructures/MASA.PM.Infrastructure.Domain.Shared/Entities/AppResponsibilityUser.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 @@ | ||
// Copyright (c) MASA Stack All rights reserved. | ||
// Licensed under the Apache License. See LICENSE.txt in the project root for license information. | ||
|
||
namespace MASA.PM.Infrastructure.Domain.Shared.Entities; | ||
|
||
[Table("AppResponsibilityUsers")] | ||
public class AppResponsibilityUser : Entity<int> | ||
{ | ||
public int AppId { get; set; } | ||
|
||
public Guid UserId { get; set; } | ||
|
||
public DateTime CreateTime { get; set; } | ||
|
||
public App App { get; set; } = default!; | ||
} |
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
13 changes: 13 additions & 0 deletions
13
...ore.PostgreSql/EntityConfigurations/AppResponsibilityUserConfigEntityTypeConfiguration.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,13 @@ | ||
// Copyright (c) MASA Stack All rights reserved. | ||
// Licensed under the Apache License. See LICENSE.txt in the project root for license information. | ||
|
||
namespace MASA.PM.Infrastructure.EFCore.PostgreSql.EntityConfigurations; | ||
|
||
internal class AppResponsibilityUserConfigEntityTypeConfiguration : IEntityTypeConfiguration<AppResponsibilityUser> | ||
{ | ||
public void Configure(EntityTypeBuilder<AppResponsibilityUser> builder) | ||
{ | ||
builder.Property(m => m.CreateTime).HasDefaultValueSql("now()"); | ||
builder.HasOne(m => m.App).WithMany(m => m.ResponsibilityUsers); | ||
} | ||
} |
Oops, something went wrong.