Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion csfunctions/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .document import CADDocument, Document
from .engineering_change import EngineeringChange
from .file import File
from .part import BOMItem, Material, Part
from .part import BOMItem, Material, MaturityLevel, Part
from .person import Person
Comment thread
jens-kuerten marked this conversation as resolved.
from .workflow import Workflow

Expand Down Expand Up @@ -41,4 +41,5 @@
"Workflow",
"BaseObject",
"Person",
"MaturityLevel",
]
2 changes: 2 additions & 0 deletions csfunctions/objects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class ObjectType(str, Enum):
WORKFLOW = "workflow"
BRIEFCASE = "briefcase"
PERSON = "person"
MATURITY_LEVEL = "maturity_level"
MATURITY_MODEL = "maturity_model"
Comment thread
Copilot marked this conversation as resolved.
Outdated


class BaseObject(BaseModel):
Expand Down
13 changes: 13 additions & 0 deletions csfunctions/objects/part.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class Part(BaseObject):
gebrauchsstand: str | None = Field(None, description="Usability")
st_breite: float | None = Field(None, description="Width")

cssaas_maturity_level: str | None = Field(None, description="Maturity Level cdb_object_id")

# Custom Char Fields
cca_char_1: str | None = Field(None, description="Custom Char Field")
cca_char_2: str | None = Field(None, description="Custom Char Field")
Expand Down Expand Up @@ -237,6 +239,17 @@ class Material(BaseObject):
status: int = Field(..., description="Status Number")


class MaturityLevel(BaseObject):
object_type: Literal[ObjectType.MATURITY_LEVEL] = ObjectType.MATURITY_LEVEL

cdb_object_id: str | None = Field(None, description="Object ID")
id: int | None = Field(None, description="Maturity Level")
name_de: str | None = Field(None, description="Name DE")
name_en: str | None = Field(None, description="Name EN")
obsolete: bool | None = Field(None, description="Obsolete Flag")
template_workflow_object_id: str | None = Field(None, description="Template Workflow Object ID")


class BOMItem(BaseObject):
object_type: Literal[ObjectType.BOM_ITEM] = ObjectType.BOM_ITEM

Expand Down
19 changes: 19 additions & 0 deletions docs/reference/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

|Attribute|Type|Description|
|-|-|-|
|cdb_object_id|str \| None|Object ID|
|baugruppe|str \| None|Assembly|
|b_index|str \| None|Assembly Index|
|component_materialnr_erp|str \| None|Material Number ERP Component|
Expand Down Expand Up @@ -518,6 +519,23 @@ Normal Document that doesn't contain a CAD-Model.
|short_name|str \| None|Short Name|
|application|str \| None|Applications|
|remark|str \| None|Remarks|
|cdb_cpersno|str \| None|Created by|
|cdb_cdate|datetime \| None|Created on|
|cdb_mpersno|str \| None|Last Modified by|
|cdb_mdate|datetime \| None|Last Modified on|
|status|int|Status Number|

## MaturityLevel
`csfunctions.objects.MaturityLevel`

|Attribute|Type|Description|
|-|-|-|
|cdb_object_id|str \| None|Object ID|
|id|int \| None|Maturity Level|
|name_de|str \| None|Name DE|
|name_en|str \| None|Name EN|
|obsolete|bool \| None|Obsolete Flag|
|template_workflow_object_id|str \| None|Template Workflow Object ID|

## ObjectPropertyValue
`csfunctions.objects.ObjectPropertyValue`
Expand Down Expand Up @@ -603,6 +621,7 @@ An objects property, used by classification.
|mengeneinheit|str \| None|Unit of Measure|
|gebrauchsstand|str \| None|Usability|
|st_breite|float \| None|Width|
|cssaas_maturity_level|str \| None|Maturity Level cdb_object_id|
|cca_char_1|str \| None|Custom Char Field|
|cca_char_2|str \| None|Custom Char Field|
|cca_char_3|str \| None|Custom Char Field|
Expand Down
13 changes: 13 additions & 0 deletions json_schemas/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -7806,6 +7806,19 @@
"description": "Width",
"title": "St Breite"
},
"cssaas_maturity_level": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Maturity Level cdb_object_id",
"title": "Cssaas Maturity Level"
},
"cca_char_1": {
"anyOf": [
{
Expand Down
Loading