diff --git a/Source/Starfish.Client/README.md b/Source/Starfish.Client/README.md index 5e40d79..2b92135 100644 --- a/Source/Starfish.Client/README.md +++ b/Source/Starfish.Client/README.md @@ -35,9 +35,8 @@ in `appsettings.json` { "Starfish": { "Host": "http://localhost:5000", - "App": "Starfish.Sample.Blazor", - "Secret": "123456", - "Env": "Development" + "Id": "5lNc9zQGdG7", + "Secret": "123456" } } ``` diff --git a/Source/Starfish.Service/Repository/Contexts/AbstractDatabaseModelBuilder.cs b/Source/Starfish.Service/Repository/Contexts/AbstractDatabaseModelBuilder.cs index 4f1b827..1e98c53 100644 --- a/Source/Starfish.Service/Repository/Contexts/AbstractDatabaseModelBuilder.cs +++ b/Source/Starfish.Service/Repository/Contexts/AbstractDatabaseModelBuilder.cs @@ -9,30 +9,15 @@ public virtual void Configure(ModelBuilder modelBuilder) { ConfigureUser(modelBuilder); ConfigureTeam(modelBuilder); - ConfigureTeamMember(modelBuilder); ConfigureConfiguration(modelBuilder); - ConfigureConfigurationItem(modelBuilder); - ConfigureConfigurationArchive(modelBuilder); - ConfigureConfigurationRevision(modelBuilder); - ConfigureToken(modelBuilder); - ConfigureOperationLog(modelBuilder); + ConfigureSupported(modelBuilder); } protected abstract ModelBuilder ConfigureUser(ModelBuilder modelBuilder); protected abstract ModelBuilder ConfigureTeam(ModelBuilder modelBuilder); - protected abstract ModelBuilder ConfigureTeamMember(ModelBuilder modelBuilder); - protected abstract ModelBuilder ConfigureConfiguration(ModelBuilder modelBuilder); - protected abstract ModelBuilder ConfigureConfigurationItem(ModelBuilder modelBuilder); - - protected abstract ModelBuilder ConfigureConfigurationArchive(ModelBuilder modelBuilder); - - protected abstract ModelBuilder ConfigureConfigurationRevision(ModelBuilder modelBuilder); - - protected abstract ModelBuilder ConfigureToken(ModelBuilder modelBuilder); - - protected abstract ModelBuilder ConfigureOperationLog(ModelBuilder modelBuilder); + protected abstract ModelBuilder ConfigureSupported(ModelBuilder modelBuilder); } \ No newline at end of file diff --git a/Source/Starfish.Service/Repository/Contexts/RelationalDatabaseModelBuilder.cs b/Source/Starfish.Service/Repository/Contexts/RelationalDatabaseModelBuilder.cs index 7b7a124..3d0e0bb 100644 --- a/Source/Starfish.Service/Repository/Contexts/RelationalDatabaseModelBuilder.cs +++ b/Source/Starfish.Service/Repository/Contexts/RelationalDatabaseModelBuilder.cs @@ -34,7 +34,7 @@ protected override ModelBuilder ConfigureUser(ModelBuilder modelBuilder) protected override ModelBuilder ConfigureTeam(ModelBuilder modelBuilder) { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("team"); entity.HasKey(t => t.Id); @@ -50,11 +50,8 @@ protected override ModelBuilder ConfigureTeam(ModelBuilder modelBuilder) .WithOne(t => t.Team) .HasForeignKey(t => t.TeamId); }); - } - protected override ModelBuilder ConfigureTeamMember(ModelBuilder modelBuilder) - { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("team_member"); entity.HasKey(t => t.Id); @@ -74,11 +71,13 @@ protected override ModelBuilder ConfigureTeamMember(ModelBuilder modelBuilder) .WithMany() .HasForeignKey(t => t.UserId); }); + + return modelBuilder; } protected override ModelBuilder ConfigureConfiguration(ModelBuilder modelBuilder) { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("configuration"); @@ -110,11 +109,8 @@ protected override ModelBuilder ConfigureConfiguration(ModelBuilder modelBuilder .HasForeignKey() .OnDelete(DeleteBehavior.Cascade); }); - } - protected override ModelBuilder ConfigureConfigurationItem(ModelBuilder modelBuilder) - { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("configuration_item"); @@ -133,11 +129,8 @@ protected override ModelBuilder ConfigureConfigurationItem(ModelBuilder modelBui .HasForeignKey(t => t.ConfigurationId) .OnDelete(DeleteBehavior.Cascade); }); - } - protected override ModelBuilder ConfigureConfigurationArchive(ModelBuilder modelBuilder) - { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("configuration_archive"); @@ -150,11 +143,8 @@ protected override ModelBuilder ConfigureConfigurationArchive(ModelBuilder model .WithOne(t => t.Archive) .OnDelete(DeleteBehavior.Cascade); }); - } - protected override ModelBuilder ConfigureConfigurationRevision(ModelBuilder modelBuilder) - { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("configuration_revision"); @@ -171,11 +161,13 @@ protected override ModelBuilder ConfigureConfigurationRevision(ModelBuilder mode .HasForeignKey(t => t.ConfigurationId) .OnDelete(DeleteBehavior.Cascade); }); + + return modelBuilder; } - protected override ModelBuilder ConfigureToken(ModelBuilder modelBuilder) + protected override ModelBuilder ConfigureSupported(ModelBuilder modelBuilder) { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("token"); @@ -188,11 +180,8 @@ protected override ModelBuilder ConfigureToken(ModelBuilder modelBuilder) .IsRequired() .HasValueGenerator(); }); - } - protected override ModelBuilder ConfigureOperationLog(ModelBuilder modelBuilder) - { - return modelBuilder.Entity(entity => + modelBuilder.Entity(entity => { entity.ToTable("operate_log"); @@ -206,5 +195,7 @@ protected override ModelBuilder ConfigureOperationLog(ModelBuilder modelBuilder) .IsRequired() .HasValueGenerator(); }); + + return modelBuilder; } } \ No newline at end of file diff --git a/Source/Starfish.Service/UseCases/Identity/UserInitializeUseCase.cs b/Source/Starfish.Service/UseCases/Identity/UserInitializeUseCase.cs index bf41a8f..8194899 100644 --- a/Source/Starfish.Service/UseCases/Identity/UserInitializeUseCase.cs +++ b/Source/Starfish.Service/UseCases/Identity/UserInitializeUseCase.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync(CancellationToken cancellationToken = default) IsAdmin = true, Reserved = true }; - await _bus.SendAsync(command, cancellationToken).ContinueWith(task => task.WaitAndUnwrapException()); + await _bus.SendAsync(command, cancellationToken) + .ContinueWith(task => task.WaitAndUnwrapException(), cancellationToken); } } \ No newline at end of file diff --git a/global.props b/global.props index a74110a..a0a653a 100644 --- a/global.props +++ b/global.props @@ -1,6 +1,6 @@ - 1.0.3 + 1.0.4 damon Nerosoft Ltd. Starfish