-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ssi): adjust identityId to string
adjust the identityId to string to be able to save the clientId of a technical user
- Loading branch information
Showing
47 changed files
with
2,779 additions
and
162 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
58 changes: 58 additions & 0 deletions
58
src/database/SsiCredentialIssuer.Entities/AuditEntities/AuditCompanySsiDetail20240419.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,58 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
using Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing; | ||
using Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing.Enums; | ||
using Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Enums; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.AuditEntities; | ||
|
||
public class AuditCompanySsiDetail20240419 : IAuditEntityV2 | ||
{ | ||
/// <inheritdoc /> | ||
[Key] | ||
public Guid AuditV2Id { get; set; } | ||
|
||
public Guid Id { get; set; } | ||
public string Bpnl { get; set; } = null!; | ||
public string IssuerBpn { get; set; } = null!; | ||
public VerifiedCredentialTypeId VerifiedCredentialTypeId { get; set; } | ||
public CompanySsiDetailStatusId CompanySsiDetailStatusId { get; set; } | ||
public DateTimeOffset DateCreated { get; private set; } | ||
public string CreatorUserId { get; set; } | ||
Check warning on line 39 in src/database/SsiCredentialIssuer.Entities/AuditEntities/AuditCompanySsiDetail20240419.cs GitHub Actions / build (7.0)
Check warning on line 39 in src/database/SsiCredentialIssuer.Entities/AuditEntities/AuditCompanySsiDetail20240419.cs GitHub Actions / build (7.0)
|
||
public DateTimeOffset? ExpiryDate { get; set; } | ||
public Guid? VerifiedCredentialExternalTypeDetailVersionId { get; set; } | ||
|
||
public ExpiryCheckTypeId? ExpiryCheckTypeId { get; set; } | ||
public Guid? ProcessId { get; set; } | ||
public Guid? ExternalCredentialId { get; set; } | ||
public string? Credential { get; set; } | ||
public DateTimeOffset? DateLastChanged { get; set; } | ||
public string? LastEditorId { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public string? AuditV2LastEditorId { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public AuditOperationId AuditV2OperationId { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public DateTimeOffset AuditV2DateLastChanged { get; set; } | ||
} |
61 changes: 61 additions & 0 deletions
61
src/database/SsiCredentialIssuer.Entities/AuditEntities/AuditDocument20240419.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,61 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
using Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing; | ||
using Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing.Enums; | ||
using Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Enums; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.AuditEntities; | ||
|
||
public class AuditDocument20240419 : IAuditEntityV2 | ||
{ | ||
/// <inheritdoc /> | ||
[Key] | ||
public Guid AuditV2Id { get; set; } | ||
|
||
public Guid Id { get; private set; } | ||
|
||
public DateTimeOffset? DateCreated { get; private set; } | ||
|
||
public byte[]? DocumentHash { get; set; } | ||
|
||
public byte[]? DocumentContent { get; set; } | ||
|
||
public string? DocumentName { get; set; } | ||
|
||
public MediaTypeId? MediaTypeId { get; set; } | ||
|
||
public DocumentTypeId? DocumentTypeId { get; set; } | ||
|
||
public DocumentStatusId? DocumentStatusId { get; set; } | ||
|
||
public string? CompanyUserId { get; set; } | ||
public DateTimeOffset? DateLastChanged { get; set; } | ||
public string? LastEditorId { get; private set; } | ||
|
||
/// <inheritdoc /> | ||
public DateTimeOffset AuditV2DateLastChanged { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public string? AuditV2LastEditorId { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public AuditOperationId AuditV2OperationId { get; set; } | ||
} |
43 changes: 43 additions & 0 deletions
43
src/database/SsiCredentialIssuer.Entities/Auditing/Attributes/AuditEntityV2Attribute.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,43 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
namespace Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing.Attributes; | ||
|
||
/// <summary> | ||
/// Attribute to Provide the needed methods to setup an audit trigger | ||
/// </summary> | ||
/// <remarks> | ||
/// The implementation of this Attribute must not be changed. | ||
/// When changes are needed create a V3 of it. | ||
/// </remarks> | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public class AuditEntityV2Attribute : Attribute | ||
{ | ||
public AuditEntityV2Attribute(Type auditEntityType) | ||
{ | ||
if (!typeof(IAuditEntityV2).IsAssignableFrom(auditEntityType)) | ||
{ | ||
throw new ArgumentException($"Entity must derive from {nameof(IAuditEntityV2)}", nameof(auditEntityType)); | ||
} | ||
|
||
AuditEntityType = auditEntityType; | ||
Check warning Code scanning / CodeQL Virtual call in constructor or destructor Warning
Avoid virtual calls in a constructor or destructor.
|
||
} | ||
|
||
public virtual Type AuditEntityType { get; } | ||
} |
34 changes: 34 additions & 0 deletions
34
...database/SsiCredentialIssuer.Entities/Auditing/Attributes/AuditInsertEditorV2Attribute.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,34 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
namespace Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing.Attributes; | ||
|
||
/// <summary> | ||
/// Attribute to mark the creators id in the base class. | ||
/// The usage is optional. If not set <see cref="LastEditorV2Attribute"/> | ||
/// is being used to determine the creators id. | ||
/// </summary> | ||
/// <remarks> | ||
/// The implementation of this Attribute must not be changed. | ||
/// When changes are needed create a V3 of it. | ||
/// </remarks> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public class AuditInsertEditorV2Attribute : Attribute | ||
{ | ||
} |
32 changes: 32 additions & 0 deletions
32
src/database/SsiCredentialIssuer.Entities/Auditing/Attributes/LastChangedV2Attribute.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,32 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
namespace Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing.Attributes; | ||
|
||
/// <summary> | ||
/// Attribute to mark the last editor id in the base class | ||
/// </summary> | ||
/// <remarks> | ||
/// The implementation of this Attribute must not be changed. | ||
/// When changes are needed create a V3 of it. | ||
/// </remarks> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public class LastChangedV2Attribute : Attribute | ||
{ | ||
} |
32 changes: 32 additions & 0 deletions
32
src/database/SsiCredentialIssuer.Entities/Auditing/Attributes/LastEditorV2Attribute.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,32 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
namespace Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Auditing.Attributes; | ||
|
||
/// <summary> | ||
/// Attribute to mark the last editor id in the base class | ||
/// </summary> | ||
/// <remarks> | ||
/// The implementation of this Attribute must not be changed. | ||
/// When changes are needed create a V3 of it. | ||
/// </remarks> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public class LastEditorV2Attribute : Attribute | ||
{ | ||
} |
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.