Add procedure document type

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-13 22:36:37 +02:00
parent b2392f51c4
commit 0c4a7169df
23 changed files with 73 additions and 53 deletions

View File

@@ -24,9 +24,10 @@ type (
)
const (
DocumentTypeOther DocumentType = "OTHER"
DocumentTypeISMS DocumentType = "ISMS"
DocumentTypePolicy DocumentType = "POLICY"
DocumentTypeOther DocumentType = "OTHER"
DocumentTypeISMS DocumentType = "ISMS"
DocumentTypePolicy DocumentType = "POLICY"
DocumentTypeProcedure DocumentType = "PROCEDURE"
)
func (dt DocumentType) MarshalText() ([]byte, error) {
@@ -43,6 +44,8 @@ func (dt *DocumentType) UnmarshalText(data []byte) error {
*dt = DocumentTypeISMS
case DocumentTypePolicy.String():
*dt = DocumentTypePolicy
case DocumentTypeProcedure.String():
*dt = DocumentTypeProcedure
default:
return fmt.Errorf("invalid DocumentType value: %q", val)
}

View File

@@ -0,0 +1 @@
ALTER TYPE document_type ADD VALUE 'PROCEDURE';

View File

@@ -942,6 +942,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
enum AssetType

View File

@@ -9642,6 +9642,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
enum AssetType
@@ -92138,14 +92140,16 @@ func (ec *executionContext) marshalNDocumentType2githubᚗcomᚋgetproboᚋprobo
var (
unmarshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[string]coredata.DocumentType{
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"PROCEDURE": coredata.DocumentTypeProcedure,
}
marshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[coredata.DocumentType]string{
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeProcedure: "PROCEDURE",
}
)
@@ -97396,14 +97400,16 @@ func (ec *executionContext) marshalODocumentType2ᚖgithubᚗcomᚋgetproboᚋpr
var (
unmarshalODocumentType2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[string]coredata.DocumentType{
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"PROCEDURE": coredata.DocumentTypeProcedure,
}
marshalODocumentType2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[coredata.DocumentType]string{
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeProcedure: "PROCEDURE",
}
)

View File

@@ -51,6 +51,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
type Document implements Node {

View File

@@ -1073,6 +1073,8 @@ enum DocumentType
ISMS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeISMS")
POLICY
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypePolicy")
PROCEDURE
@goEnum(value: "github.com/getprobo/probo/pkg/coredata.DocumentTypeProcedure")
}
type Document implements Node {
@@ -12243,14 +12245,16 @@ func (ec *executionContext) marshalNDocumentType2githubᚗcomᚋgetproboᚋprobo
var (
unmarshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[string]coredata.DocumentType{
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"OTHER": coredata.DocumentTypeOther,
"ISMS": coredata.DocumentTypeISMS,
"POLICY": coredata.DocumentTypePolicy,
"PROCEDURE": coredata.DocumentTypeProcedure,
}
marshalNDocumentType2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDocumentType = map[coredata.DocumentType]string{
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeOther: "OTHER",
coredata.DocumentTypeISMS: "ISMS",
coredata.DocumentTypePolicy: "POLICY",
coredata.DocumentTypeProcedure: "PROCEDURE",
}
)