@@ -62,7 +62,15 @@ ALTER TABLE
|
|||||||
ALTER COLUMN
|
ALTER COLUMN
|
||||||
identity_id
|
identity_id
|
||||||
SET
|
SET
|
||||||
NOT NULL;
|
NOT NULL,
|
||||||
|
ALTER COLUMN
|
||||||
|
email DROP NOT NULL,
|
||||||
|
ALTER COLUMN
|
||||||
|
name DROP NOT NULL,
|
||||||
|
ALTER COLUMN
|
||||||
|
state DROP NOT NULL,
|
||||||
|
ALTER COLUMN
|
||||||
|
has_accepted_non_disclosure_agreement DROP NOT NULL;
|
||||||
|
|
||||||
CREATE UNIQUE INDEX idx_trust_center_accesses_identity_id_organization_id ON trust_center_accesses(identity_id, organization_id);
|
CREATE UNIQUE INDEX idx_trust_center_accesses_identity_id_organization_id ON trust_center_accesses(identity_id, organization_id);
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ SELECT
|
|||||||
id,
|
id,
|
||||||
organization_id,
|
organization_id,
|
||||||
tenant_id,
|
tenant_id,
|
||||||
|
identity_id,
|
||||||
trust_center_id,
|
trust_center_id,
|
||||||
nda_file_id,
|
nda_file_id,
|
||||||
electronic_signature_id,
|
electronic_signature_id,
|
||||||
@@ -127,6 +128,7 @@ SELECT
|
|||||||
id,
|
id,
|
||||||
organization_id,
|
organization_id,
|
||||||
tenant_id,
|
tenant_id,
|
||||||
|
identity_id,
|
||||||
trust_center_id,
|
trust_center_id,
|
||||||
nda_file_id,
|
nda_file_id,
|
||||||
electronic_signature_id,
|
electronic_signature_id,
|
||||||
@@ -178,6 +180,7 @@ INSERT INTO trust_center_accesses (
|
|||||||
id,
|
id,
|
||||||
tenant_id,
|
tenant_id,
|
||||||
organization_id,
|
organization_id,
|
||||||
|
identity_id,
|
||||||
trust_center_id,
|
trust_center_id,
|
||||||
electronic_signature_id,
|
electronic_signature_id,
|
||||||
created_at,
|
created_at,
|
||||||
@@ -186,6 +189,7 @@ INSERT INTO trust_center_accesses (
|
|||||||
@id,
|
@id,
|
||||||
@tenant_id,
|
@tenant_id,
|
||||||
@organization_id,
|
@organization_id,
|
||||||
|
@identity_id,
|
||||||
@trust_center_id,
|
@trust_center_id,
|
||||||
@electronic_signature_id,
|
@electronic_signature_id,
|
||||||
@created_at,
|
@created_at,
|
||||||
@@ -197,6 +201,7 @@ INSERT INTO trust_center_accesses (
|
|||||||
"id": tca.ID,
|
"id": tca.ID,
|
||||||
"tenant_id": tca.TenantID,
|
"tenant_id": tca.TenantID,
|
||||||
"organization_id": tca.OrganizationID,
|
"organization_id": tca.OrganizationID,
|
||||||
|
"identity_id": tca.IdentityID,
|
||||||
"trust_center_id": tca.TrustCenterID,
|
"trust_center_id": tca.TrustCenterID,
|
||||||
"electronic_signature_id": tca.ElectronicSignatureID,
|
"electronic_signature_id": tca.ElectronicSignatureID,
|
||||||
"created_at": tca.CreatedAt,
|
"created_at": tca.CreatedAt,
|
||||||
@@ -289,6 +294,7 @@ SELECT
|
|||||||
id,
|
id,
|
||||||
organization_id,
|
organization_id,
|
||||||
tenant_id,
|
tenant_id,
|
||||||
|
identity_id,
|
||||||
trust_center_id,
|
trust_center_id,
|
||||||
nda_file_id,
|
nda_file_id,
|
||||||
electronic_signature_id,
|
electronic_signature_id,
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ func (s TrustCenterAccessService) Create(
|
|||||||
ID: gid.New(s.svc.scope.GetTenantID(), coredata.TrustCenterAccessEntityType),
|
ID: gid.New(s.svc.scope.GetTenantID(), coredata.TrustCenterAccessEntityType),
|
||||||
OrganizationID: trustCenter.OrganizationID,
|
OrganizationID: trustCenter.OrganizationID,
|
||||||
TenantID: s.svc.scope.GetTenantID(),
|
TenantID: s.svc.scope.GetTenantID(),
|
||||||
|
IdentityID: profile.IdentityID,
|
||||||
TrustCenterID: req.TrustCenterID,
|
TrustCenterID: req.TrustCenterID,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ func (s TrustCenterAccessService) ensureAccessInTx(
|
|||||||
ID: gid.New(s.svc.scope.GetTenantID(), coredata.TrustCenterAccessEntityType),
|
ID: gid.New(s.svc.scope.GetTenantID(), coredata.TrustCenterAccessEntityType),
|
||||||
OrganizationID: trustCenter.OrganizationID,
|
OrganizationID: trustCenter.OrganizationID,
|
||||||
TenantID: s.svc.scope.GetTenantID(),
|
TenantID: s.svc.scope.GetTenantID(),
|
||||||
|
IdentityID: identityID,
|
||||||
TrustCenterID: trustCenterID,
|
TrustCenterID: trustCenterID,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
|
|||||||
Reference in New Issue
Block a user