Rename owner by approver
Document owner does not make sense it's more an document approver. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
891d607602
commit
3d8c7c4dd6
@@ -32,7 +32,7 @@ type (
|
||||
Document struct {
|
||||
ID gid.GID `db:"id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
OwnerID gid.GID `db:"owner_profile_id"`
|
||||
ApproverID gid.GID `db:"approver_profile_id"`
|
||||
Title string `db:"title"`
|
||||
DocumentType DocumentType `db:"document_type"`
|
||||
Classification DocumentClassification `db:"classification"`
|
||||
@@ -83,7 +83,7 @@ func (p *Document) LoadByID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_profile_id,
|
||||
approver_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -135,7 +135,7 @@ func (p *Document) LoadByIDWithFilter(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_profile_id,
|
||||
approver_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -188,7 +188,7 @@ func (p *Documents) LoadByIDs(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_profile_id,
|
||||
approver_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -270,7 +270,7 @@ func (p *Documents) LoadByOrganizationID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_profile_id,
|
||||
approver_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -321,7 +321,7 @@ func (p *Documents) LoadAllByOrganizationID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_profile_id,
|
||||
approver_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -371,7 +371,7 @@ INSERT INTO
|
||||
tenant_id,
|
||||
id,
|
||||
organization_id,
|
||||
owner_profile_id,
|
||||
approver_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -384,7 +384,7 @@ VALUES (
|
||||
@tenant_id,
|
||||
@document_id,
|
||||
@organization_id,
|
||||
@owner_profile_id,
|
||||
@approver_profile_id,
|
||||
@title,
|
||||
@document_type,
|
||||
@classification,
|
||||
@@ -399,7 +399,7 @@ VALUES (
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"document_id": p.ID,
|
||||
"organization_id": p.OrganizationID,
|
||||
"owner_profile_id": p.OwnerID,
|
||||
"approver_profile_id": p.ApproverID,
|
||||
"title": p.Title,
|
||||
"document_type": p.DocumentType,
|
||||
"classification": p.Classification,
|
||||
@@ -460,7 +460,7 @@ UPDATE
|
||||
SET
|
||||
title = @title,
|
||||
current_published_version = @current_published_version,
|
||||
owner_profile_id = @owner_profile_id,
|
||||
approver_profile_id = @approver_profile_id,
|
||||
document_type = @document_type,
|
||||
classification = @classification,
|
||||
trust_center_visibility = @trust_center_visibility,
|
||||
@@ -477,7 +477,7 @@ WHERE
|
||||
"updated_at": time.Now(),
|
||||
"title": p.Title,
|
||||
"current_published_version": p.CurrentPublishedVersion,
|
||||
"owner_profile_id": p.OwnerID,
|
||||
"approver_profile_id": p.ApproverID,
|
||||
"document_type": p.DocumentType,
|
||||
"classification": p.Classification,
|
||||
"trust_center_visibility": p.TrustCenterVisibility,
|
||||
@@ -548,7 +548,7 @@ WITH scoped_documents AS (
|
||||
SELECT
|
||||
scoped_documents.id,
|
||||
scoped_documents.organization_id,
|
||||
scoped_documents.owner_profile_id,
|
||||
scoped_documents.approver_profile_id,
|
||||
scoped_documents.title,
|
||||
scoped_documents.document_type,
|
||||
scoped_documents.classification,
|
||||
@@ -638,7 +638,7 @@ WITH scoped_documents AS (
|
||||
SELECT
|
||||
scoped_documents.id,
|
||||
scoped_documents.organization_id,
|
||||
scoped_documents.owner_profile_id,
|
||||
scoped_documents.approver_profile_id,
|
||||
scoped_documents.title,
|
||||
scoped_documents.document_type,
|
||||
scoped_documents.classification,
|
||||
|
||||
Reference in New Issue
Block a user