-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
223 changed files
with
7,394 additions
and
7,632 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
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
25 changes: 12 additions & 13 deletions
25
back-end/Database.Common/BacklogItem/BacklogItemHistoryRecord.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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
using Raven.Yabt.Database.Common.References; | ||
|
||
namespace Raven.Yabt.Database.Common.BacklogItem | ||
namespace Raven.Yabt.Database.Common.BacklogItem; | ||
|
||
public record BacklogItemHistoryRecord : ChangedByUserReference | ||
{ | ||
public record BacklogItemHistoryRecord : ChangedByUserReference | ||
{ | ||
/// <summary> | ||
/// Brief summary of the change | ||
/// </summary> | ||
public string? Summary { get; init; } | ||
/// <summary> | ||
/// Brief summary of the change | ||
/// </summary> | ||
public string? Summary { get; init; } | ||
|
||
public BacklogItemHistoryRecord() {} | ||
public BacklogItemHistoryRecord() {} | ||
|
||
public BacklogItemHistoryRecord(UserReference actionedBy, string? summary = null) : base(actionedBy) | ||
{ | ||
Summary = summary; | ||
} | ||
public BacklogItemHistoryRecord(UserReference actionedBy, string? summary = null) : base(actionedBy) | ||
{ | ||
Summary = summary; | ||
} | ||
} | ||
} |
13 changes: 6 additions & 7 deletions
13
back-end/Database.Common/BacklogItem/BacklogItemRelatedItem.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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
using Raven.Yabt.Database.Common.References; | ||
|
||
namespace Raven.Yabt.Database.Common.BacklogItem | ||
namespace Raven.Yabt.Database.Common.BacklogItem; | ||
|
||
public record BacklogItemRelatedItem | ||
{ | ||
public record BacklogItemRelatedItem | ||
{ | ||
public BacklogItemReference RelatedTo { get; set; } = null!; | ||
public BacklogItemReference RelatedTo { get; set; } = null!; | ||
|
||
public BacklogRelationshipType LinkType { get; set; } | ||
} | ||
} | ||
public BacklogRelationshipType LinkType { get; set; } | ||
} |
49 changes: 24 additions & 25 deletions
49
back-end/Database.Common/BacklogItem/BacklogItemRelationshipType.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 |
---|---|---|
@@ -1,29 +1,28 @@ | ||
using System; | ||
|
||
namespace Raven.Yabt.Database.Common.BacklogItem | ||
{ | ||
public enum BacklogRelationshipType | ||
{ | ||
Duplicate, | ||
Related, | ||
BlockedBy, | ||
Blocks, | ||
CausedBy, | ||
Causes | ||
} | ||
namespace Raven.Yabt.Database.Common.BacklogItem; | ||
|
||
public static class BacklogRelationshipTypeExtension | ||
{ | ||
public static BacklogRelationshipType GetMirroredType(this BacklogRelationshipType type) | ||
=> type switch | ||
{ | ||
BacklogRelationshipType.Duplicate => BacklogRelationshipType.Duplicate, | ||
BacklogRelationshipType.Related => BacklogRelationshipType.Related, | ||
BacklogRelationshipType.BlockedBy => BacklogRelationshipType.Blocks, | ||
BacklogRelationshipType.Blocks => BacklogRelationshipType.BlockedBy, | ||
BacklogRelationshipType.Causes => BacklogRelationshipType.CausedBy, | ||
BacklogRelationshipType.CausedBy => BacklogRelationshipType.Causes, | ||
_ => throw new NotImplementedException($"Type {type} not supported"), | ||
}; | ||
} | ||
public enum BacklogRelationshipType | ||
{ | ||
Duplicate, | ||
Related, | ||
BlockedBy, | ||
Blocks, | ||
CausedBy, | ||
Causes | ||
} | ||
|
||
public static class BacklogRelationshipTypeExtension | ||
{ | ||
public static BacklogRelationshipType GetMirroredType(this BacklogRelationshipType type) | ||
=> type switch | ||
{ | ||
BacklogRelationshipType.Duplicate => BacklogRelationshipType.Duplicate, | ||
BacklogRelationshipType.Related => BacklogRelationshipType.Related, | ||
BacklogRelationshipType.BlockedBy => BacklogRelationshipType.Blocks, | ||
BacklogRelationshipType.Blocks => BacklogRelationshipType.BlockedBy, | ||
BacklogRelationshipType.Causes => BacklogRelationshipType.CausedBy, | ||
BacklogRelationshipType.CausedBy => BacklogRelationshipType.Causes, | ||
_ => throw new NotImplementedException($"Type {type} not supported"), | ||
}; | ||
} |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
namespace Raven.Yabt.Database.Common.BacklogItem | ||
namespace Raven.Yabt.Database.Common.BacklogItem; | ||
|
||
public enum BacklogItemState | ||
{ | ||
public enum BacklogItemState | ||
{ | ||
New, | ||
InProgress, | ||
Testing, | ||
Closed | ||
} | ||
} | ||
New, | ||
InProgress, | ||
Testing, | ||
Closed | ||
} |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
namespace Raven.Yabt.Database.Common.BacklogItem | ||
namespace Raven.Yabt.Database.Common.BacklogItem; | ||
|
||
public enum BacklogItemType | ||
{ | ||
public enum BacklogItemType | ||
{ | ||
Feature = 2^1, | ||
Bug = 2^2, | ||
UserStory = 2^3, | ||
Task = 2^4 | ||
} | ||
} | ||
Feature = 2^1, | ||
Bug = 2^2, | ||
UserStory = 2^3, | ||
Task = 2^4 | ||
} |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
namespace Raven.Yabt.Database.Common.BacklogItem | ||
namespace Raven.Yabt.Database.Common.BacklogItem; | ||
|
||
public enum BugPriority | ||
{ | ||
public enum BugPriority | ||
{ | ||
P1, P2, P3, P4 | ||
} | ||
} | ||
P1, P2, P3, P4 | ||
} |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
namespace Raven.Yabt.Database.Common.BacklogItem | ||
namespace Raven.Yabt.Database.Common.BacklogItem; | ||
|
||
public enum BugSeverity | ||
{ | ||
public enum BugSeverity | ||
{ | ||
Critical, | ||
High, | ||
Medium, | ||
Low | ||
} | ||
} | ||
Critical, | ||
High, | ||
Medium, | ||
Low | ||
} |
19 changes: 9 additions & 10 deletions
19
back-end/Database.Common/Configuration/AppSettingsConstraints.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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
namespace Raven.Yabt.Database.Common.Configuration | ||
namespace Raven.Yabt.Database.Common.Configuration; | ||
|
||
/// <summary> | ||
/// Constraint on naming RavenDB connection parameters | ||
/// </summary> | ||
public interface IAppSettingsWithDatabase | ||
{ | ||
/// <summary> | ||
/// Constraint on naming RavenDB connection parameters | ||
/// RavenDB connection parameters | ||
/// </summary> | ||
public interface IAppSettingsWithDatabase | ||
{ | ||
/// <summary> | ||
/// RavenDB connection parameters | ||
/// </summary> | ||
DatabaseSettings Database { get; } | ||
} | ||
} | ||
DatabaseSettings Database { get; } | ||
} |
49 changes: 24 additions & 25 deletions
49
back-end/Database.Common/Configuration/DatabaseSessionSettings.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 |
---|---|---|
@@ -1,31 +1,30 @@ | ||
// ReSharper disable ClassNeverInstantiated.Global | ||
namespace Raven.Yabt.Database.Common.Configuration | ||
namespace Raven.Yabt.Database.Common.Configuration; | ||
|
||
/// <summary> | ||
/// Raven database session settings | ||
/// </summary> | ||
public class DatabaseSessionSettings | ||
{ | ||
/// <summary> | ||
/// Raven database session settings | ||
/// The default time interval in seconds for waiting for the indexes to catch up with the saved changes | ||
/// after calling session.SaveChanges(). | ||
/// If `null` then doesn't wait. | ||
/// The value must be ≥ <see cref="LogErrorIfSavingTakesMoreThan"/> | ||
/// </summary> | ||
public class DatabaseSessionSettings | ||
{ | ||
/// <summary> | ||
/// The default time interval in seconds for waiting for the indexes to catch up with the saved changes | ||
/// after calling session.SaveChanges(). | ||
/// If `null` then doesn't wait. | ||
/// The value must be ≥ <see cref="LogErrorIfSavingTakesMoreThan"/> | ||
/// </summary> | ||
public int? WaitForIndexesAfterSaveChanges { get; private set; } = null; | ||
public int? WaitForIndexesAfterSaveChanges { get; private set; } = null; | ||
|
||
/// <summary> | ||
/// Log a trace warning if session.Save() takes more than specified in seconds, | ||
/// but less than in <see cref="LogErrorIfSavingTakesMoreThan"/>. | ||
/// It makes sense only if <see cref="WaitForIndexesAfterSaveChanges"/> is configured | ||
/// </summary> | ||
public int LogWarningIfSavingTakesMoreThan { get; private set; } = 15; | ||
/// <summary> | ||
/// Log a trace warning if session.Save() takes more than specified in seconds, | ||
/// but less than in <see cref="LogErrorIfSavingTakesMoreThan"/>. | ||
/// It makes sense only if <see cref="WaitForIndexesAfterSaveChanges"/> is configured | ||
/// </summary> | ||
public int LogWarningIfSavingTakesMoreThan { get; private set; } = 15; | ||
|
||
/// <summary> | ||
/// Log an error if session.Save() takes more than specified in seconds. | ||
/// It makes sense only if <see cref="WaitForIndexesAfterSaveChanges"/> is configured. | ||
/// The value must be ≥ <see cref="LogWarningIfSavingTakesMoreThan"/>. | ||
/// </summary> | ||
public int LogErrorIfSavingTakesMoreThan { get; private set; } = 30; | ||
} | ||
} | ||
/// <summary> | ||
/// Log an error if session.Save() takes more than specified in seconds. | ||
/// It makes sense only if <see cref="WaitForIndexesAfterSaveChanges"/> is configured. | ||
/// The value must be ≥ <see cref="LogWarningIfSavingTakesMoreThan"/>. | ||
/// </summary> | ||
public int LogErrorIfSavingTakesMoreThan { get; private set; } = 30; | ||
} |
51 changes: 25 additions & 26 deletions
51
back-end/Database.Common/Configuration/DatabaseSettings.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 |
---|---|---|
@@ -1,34 +1,33 @@ | ||
// ReSharper disable UnusedAutoPropertyAccessor.Local | ||
// ReSharper disable ClassNeverInstantiated.Global | ||
namespace Raven.Yabt.Database.Common.Configuration | ||
{ | ||
namespace Raven.Yabt.Database.Common.Configuration; | ||
|
||
#nullable disable | ||
/// <summary> | ||
/// Connection to the Raven database | ||
/// </summary> | ||
public class DatabaseSettings | ||
{ | ||
/// <summary> | ||
/// Connection to the Raven database | ||
/// URL of the RavenDB API | ||
/// </summary> | ||
public class DatabaseSettings | ||
{ | ||
/// <summary> | ||
/// URL of the RavenDB API | ||
/// </summary> | ||
public string[] RavenDbUrls { get; private set; } | ||
public string[] RavenDbUrls { get; private set; } | ||
|
||
/// <summary> | ||
/// The path for Base64-encoded RavenDB certificate. | ||
/// Certificate is NOT required for non-secure connections (e.g. a local instance) | ||
/// </summary> | ||
public string Certificate { get; private set; } | ||
/// <summary> | ||
/// The path for Base64-encoded RavenDB certificate. | ||
/// Certificate is NOT required for non-secure connections (e.g. a local instance) | ||
/// </summary> | ||
public string Certificate { get; private set; } | ||
|
||
/// <summary> | ||
/// The Database name | ||
/// </summary> | ||
public string DbName { get; private set; } | ||
/// <summary> | ||
/// The Database name | ||
/// </summary> | ||
public string DbName { get; private set; } | ||
|
||
/// <summary> | ||
/// Flag triggering updating the indexes if 'true'. | ||
/// Ideally, it shouldn't be set in PROD as updating indexes is a migration concern, | ||
/// but setting it in dev environment makes live a bit easier by applying index updates on a start-up | ||
/// </summary> | ||
public bool UpdateIndexes { get; private set; } | ||
} | ||
} | ||
/// <summary> | ||
/// Flag triggering updating the indexes if 'true'. | ||
/// Ideally, it shouldn't be set in PROD as updating indexes is a migration concern, | ||
/// but setting it in dev environment makes live a bit easier by applying index updates on a start-up | ||
/// </summary> | ||
public bool UpdateIndexes { get; private 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace Raven.Yabt.Database.Common | ||
namespace Raven.Yabt.Database.Common; | ||
|
||
public enum CustomFieldType | ||
{ | ||
public enum CustomFieldType | ||
{ | ||
Text, | ||
Date, | ||
Checkbox, | ||
Numeric, | ||
Url | ||
} | ||
} | ||
Text, | ||
Date, | ||
Checkbox, | ||
Numeric, | ||
Url | ||
} |
Oops, something went wrong.