-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into permissions
- Loading branch information
Showing
16 changed files
with
329 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Nodes; | ||
|
||
namespace ChurchTools.Model; | ||
|
||
public record DomainObject( | ||
string Title, | ||
string DomainType, | ||
string DomainIdentifier, | ||
Dictionary<string, JsonValue> DomainAttributes); |
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,13 @@ | ||
namespace ChurchTools.Model; | ||
using System; | ||
|
||
public class GroupMember : IIdentifiable<long> | ||
{ | ||
public GroupMember(int personId, int groupId, int groupTypeRoleId, string groupMemberStatus) | ||
{ | ||
PersonId = personId; | ||
GroupId = groupId; | ||
GroupTypeRoleId = groupTypeRoleId; | ||
GroupMemberStatus = groupMemberStatus; | ||
} | ||
namespace ChurchTools.Model; | ||
|
||
public int PersonId { get; set; } | ||
public int GroupId { get; set; } | ||
public int GroupTypeRoleId { get; set; } | ||
public string GroupMemberStatus { get; set; } | ||
|
||
long IIdentifiable<long>.Id => (long)PersonId << 32 | (long)GroupId; | ||
} | ||
public record GroupMember( | ||
int PersonId, | ||
DomainObject Person, | ||
DomainObject Group, | ||
int GroupTypeRoleId, | ||
GroupMemberStatus GroupMemberStatus, | ||
DateOnly MemberStartDate, | ||
DateOnly? MemberEndDate, | ||
string? Comment); |
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,8 +1,12 @@ | ||
namespace ChurchTools.Model; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace ChurchTools.Model; | ||
|
||
[JsonConverter(typeof(JsonStringEnumConverter))] | ||
public enum GroupMemberStatus | ||
{ | ||
Active, | ||
Requested, | ||
ToDelete | ||
Waiting, | ||
To_Delete // Custom JSON values are not supported by System.Text.Json: https://stackoverflow.com/a/59061296 | ||
} |
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,19 @@ | ||
namespace ChurchTools.Model; | ||
|
||
public class GroupsMember : IIdentifiable<long> | ||
{ | ||
public GroupsMember(int personId, int groupId, int groupTypeRoleId, string groupMemberStatus) | ||
{ | ||
PersonId = personId; | ||
GroupId = groupId; | ||
GroupTypeRoleId = groupTypeRoleId; | ||
GroupMemberStatus = groupMemberStatus; | ||
} | ||
|
||
public int PersonId { get; set; } | ||
public int GroupId { get; set; } | ||
public int GroupTypeRoleId { get; set; } | ||
public string GroupMemberStatus { get; set; } | ||
|
||
long IIdentifiable<long>.Id => (long)PersonId << 32 | (long)GroupId; | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.