Skip to content

Commit fb8a13d

Browse files
conlwilwi
andauthored
Add cdb_object_id to documents and ECs(#9)
* add object id to document and ec * add schema --------- Co-authored-by: lwi <lars.wimmel@contact-software.com>
1 parent 19984b0 commit fb8a13d

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

csfunctions/objects/document.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class Document(BaseObject):
6969
cdb_m2date: datetime | None = Field(None, description="File Last Saved on")
7070
z_art: str | None = Field(None, description="Document Type")
7171
mapped_materialnr_erp: str | None = Field(None, description="Materialnumber ERP")
72+
cdb_object_id: str | None = Field(None, description="Object ID")
7273

7374
files: list[File] = Field([], description="Files attached to the document")
7475

csfunctions/objects/engineering_change.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class EngineeringChange(BaseObject):
2121
status: int = Field(..., description="Status")
2222
title: str | None = Field("", description="Title")
2323
template_ec_id: str | None = Field("", description="Template ID")
24+
cdb_object_id: str | None = Field(None, description="Object ID")
2425

2526
c_department: str | None = Field("", description="Department")
2627
c_description: str | None = Field("", description="Description")

json_schemas/request.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,19 @@
677677
"description": "Materialnumber ERP",
678678
"title": "Mapped Materialnr Erp"
679679
},
680+
"cdb_object_id": {
681+
"anyOf": [
682+
{
683+
"type": "string"
684+
},
685+
{
686+
"type": "null"
687+
}
688+
],
689+
"default": null,
690+
"description": "Object ID",
691+
"title": "Cdb Object Id"
692+
},
680693
"files": {
681694
"default": [],
682695
"description": "Files attached to the document",
@@ -942,6 +955,19 @@
942955
"description": "Template ID",
943956
"title": "Template Ec Id"
944957
},
958+
"cdb_object_id": {
959+
"anyOf": [
960+
{
961+
"type": "string"
962+
},
963+
{
964+
"type": "null"
965+
}
966+
],
967+
"default": null,
968+
"description": "Object ID",
969+
"title": "Cdb Object Id"
970+
},
945971
"c_department": {
946972
"anyOf": [
947973
{

0 commit comments

Comments
 (0)