Add procedure document type
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
1
pkg/coredata/migrations/20251013T202745Z.sql
Normal file
1
pkg/coredata/migrations/20251013T202745Z.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TYPE document_type ADD VALUE 'PROCEDURE';
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user