CDM/schemaDocuments/Sustainability/Unit.1.0.cdm.json

1119 строки
40 KiB
JSON

{
"jsonSchemaSemanticVersion": "1.1.0",
"imports": [
{
"corpusPath": "cdm:/core/cdsConcepts.1.0.1.cdm.json"
},
{
"corpusPath": "UnitGroup.1.0.cdm.json"
}
],
"definitions": [
{
"entityName": "Unit",
"extendsEntity": "CdmEntity",
"displayName": "Unit",
"description": "Unit of measure.",
"sourceName": "msdyn_unit",
"exhibitsTraits": [
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Unit of measure."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Unit"
]
]
}
}
]
},
{
"traitReference": "is.CDM.entityVersion",
"arguments": [
{
"name": "versionNumber",
"value": "1.0"
}
]
}
],
"hasAttributes": [
{
"attributeGroupReference": {
"attributeGroupName": "attributesAddedAtThisScope",
"members": [
{
"name": "unitId",
"sourceName": "msdyn_unitid",
"sourceOrdering": 1,
"description": "Unique identifier for entity instances",
"displayName": "Unit",
"isNullable": false,
"purpose": "identifiedBy",
"dataType": "entityId",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "systemrequired"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Unique identifier for entity instances"
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Unit"
]
]
}
}
]
},
{
"traitReference": "is.CDS.sourceNamed",
"arguments": [
"msdyn_unitid"
]
}
]
},
{
"name": "createdOn",
"sourceName": "createdon",
"sourceOrdering": 2,
"description": "Date and time when the record was created.",
"displayName": "Created on",
"isNullable": true,
"purpose": "hasA",
"dataType": "dateTime",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Date and time when the record was created."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Created on"
]
]
}
}
]
}
]
},
{
"name": "modifiedOn",
"sourceName": "modifiedon",
"sourceOrdering": 4,
"description": "Date and time when the record was modified.",
"displayName": "Modified on",
"isNullable": true,
"purpose": "hasA",
"dataType": "dateTime",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Date and time when the record was modified."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Modified on"
]
]
}
}
]
}
]
},
{
"name": "statecode",
"sourceName": "statecode",
"sourceOrdering": 25,
"description": "Status of the Unit",
"displayName": "Status",
"isNullable": false,
"purpose": "representsStateWith",
"dataType": {
"dataTypeReference": "listLookup",
"appliedTraits": [
{
"traitReference": "does.haveDefault",
"arguments": [
{
"entityReference": {
"explanation": "The constantValues below correspond to the attributes of the 'listLookupValues' entityShape which are: {languageTag, displayText, attributeValue, displayOrder}",
"entityShape": "listLookupValues",
"constantValues": [
[
"en",
"Active",
"0",
"1"
],
[
"en",
"Inactive",
"1",
"2"
]
]
}
}
]
}
]
},
"projections": {
"operations": [
{
"$type": "addSupportingAttribute",
"condition": "virtual",
"supportingAttribute": {
"explanation": "This attribute 'statecode_display' is added to the 'Unit' entity to provide the localized display text for the value of the listLookup attribute 'statecode'",
"name": "statecode_display",
"purpose": "hasA",
"dataType": "localizedDisplayText",
"isReadOnly": true
}
}
]
},
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "systemrequired"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Status of the Unit"
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Status"
]
]
}
}
]
},
{
"traitReference": "is.CDS.sourceNamed",
"arguments": [
"statecode"
]
}
]
},
{
"name": "statuscode",
"sourceName": "statuscode",
"sourceOrdering": 27,
"description": "Reason for the status of the Unit",
"displayName": "Status reason",
"isNullable": true,
"purpose": {
"purposeReference": "representsCorrelatedStatusWith",
"appliedTraits": [
{
"traitReference": "is.correlatedWith",
"arguments": [
"statecode"
]
}
]
},
"dataType": {
"dataTypeReference": "listLookup",
"appliedTraits": [
{
"traitReference": "does.haveDefault",
"arguments": [
{
"entityReference": {
"explanation": "The constantValues below correspond to the attributes of the 'listLookupCorrelatedValues' entityShape which are: {languageTag, displayText, attributeValue, displayOrder, correlatedValue}",
"entityShape": "listLookupCorrelatedValues",
"constantValues": [
[
"en",
"Active",
"1",
"1",
"1"
],
[
"en",
"Inactive",
"2",
"2",
"2"
]
]
}
}
]
}
]
},
"projections": {
"operations": [
{
"$type": "addSupportingAttribute",
"condition": "virtual",
"supportingAttribute": {
"explanation": "This attribute 'statuscode_display' is added to the 'Unit' entity to provide the localized display text for the value of the listLookup attribute 'statuscode'",
"name": "statuscode_display",
"purpose": "hasA",
"dataType": "localizedDisplayText",
"isReadOnly": true
}
}
]
},
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Reason for the status of the Unit"
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Status reason"
]
]
}
}
]
},
{
"traitReference": "is.CDS.sourceNamed",
"arguments": [
"statuscode"
]
}
]
},
{
"name": "importSequenceNumber",
"sourceName": "importsequencenumber",
"sourceOrdering": 30,
"description": "Sequence number of the import that created this record.",
"displayName": "Import sequence number",
"isNullable": true,
"purpose": "hasA",
"dataType": "integer",
"maximumValue": "2147483647",
"minimumValue": "-2147483648",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Sequence number of the import that created this record."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Import sequence number"
]
]
}
}
]
},
{
"traitReference": "is.constrained",
"arguments": [
{
"name": "maximumValue",
"value": "2147483647"
},
{
"name": "minimumValue",
"value": "-2147483648"
}
]
}
]
},
{
"name": "overriddenCreatedOn",
"sourceName": "overriddencreatedon",
"sourceOrdering": 31,
"description": "Date and time that the record was migrated.",
"displayName": "Record created on",
"isNullable": true,
"purpose": "hasA",
"dataType": "dateTime",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Date and time that the record was migrated."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Record created on"
]
]
}
}
]
}
]
},
{
"name": "timeZoneRuleVersionNumber",
"sourceName": "timezoneruleversionnumber",
"sourceOrdering": 32,
"description": "For internal use only.",
"displayName": "Time zone rule version number",
"isNullable": true,
"purpose": "hasA",
"dataType": "integer",
"maximumValue": "2147483647",
"minimumValue": "-1",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"For internal use only."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Time zone rule version number"
]
]
}
}
]
},
{
"traitReference": "is.constrained",
"arguments": [
{
"name": "maximumValue",
"value": "2147483647"
},
{
"name": "minimumValue",
"value": "-1"
}
]
}
]
},
{
"name": "UTCConversionTimeZoneCode",
"sourceName": "utcconversiontimezonecode",
"sourceOrdering": 33,
"description": "Time zone code that was in use when the record was created.",
"displayName": "UTC conversion time zone code",
"isNullable": true,
"purpose": "hasA",
"dataType": "integer",
"maximumValue": "2147483647",
"minimumValue": "-1",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Time zone code that was in use when the record was created."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"UTC conversion time zone code"
]
]
}
}
]
},
{
"traitReference": "is.constrained",
"arguments": [
{
"name": "maximumValue",
"value": "2147483647"
},
{
"name": "minimumValue",
"value": "-1"
}
]
}
]
},
{
"name": "name",
"sourceName": "msdyn_name",
"sourceOrdering": 34,
"description": "The name of the custom entity.",
"displayName": "Name",
"isNullable": true,
"purpose": "hasA",
"dataType": "string",
"maximumLength": "100",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "applicationrequired"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"The name of the custom entity."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Name"
]
]
}
}
]
},
{
"traitReference": "is.constrained",
"arguments": [
{
"name": "maximumLength",
"value": "100"
}
]
}
]
},
{
"name": "baseunit",
"sourceName": "msdyn_baseunit",
"sourceOrdering": 35,
"description": "The base or primary unit of the unit group that the entity belongs to.",
"displayName": "Base unit",
"isNullable": true,
"purpose": "hasA",
"dataType": "entityId",
"entity": {
"source": "Unit",
"operations": [
{
"$type": "replaceAsForeignKey",
"condition": "referenceOnly",
"reference": "unitId",
"replaceWith": {
"name": "baseunit",
"dataType": "entityId",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "applicationrequired"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"The base or primary unit of the unit group that the entity belongs to."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Base unit"
]
]
}
}
]
},
{
"traitReference": "is.CDS.lookup",
"arguments": [
{
"name": "style",
"value": "single"
}
]
}
]
}
}
]
}
},
{
"name": "conversionfactor",
"sourceName": "msdyn_conversionfactor",
"sourceOrdering": 36,
"description": "Conversion factor to convert to the base unit.",
"displayName": "Conversion factor",
"isNullable": true,
"purpose": "hasA",
"dataType": "decimal",
"maximumValue": "100000000000",
"minimumValue": "0",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "applicationrequired"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Conversion factor to convert to the base unit."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Conversion factor"
]
]
}
}
]
},
{
"traitReference": "is.constrained",
"arguments": [
{
"name": "maximumValue",
"value": "100000000000"
},
{
"name": "minimumValue",
"value": "0"
}
]
}
]
},
{
"name": "isbaseunit",
"sourceName": "msdyn_isbaseunit",
"sourceOrdering": 37,
"description": "Indicates whether the unit is the base unit for the associated unit group.",
"displayName": "Is base unit",
"isNullable": true,
"purpose": "hasA",
"dataType": "boolean",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "applicationrequired"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Indicates whether the unit is the base unit for the associated unit group."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Is base unit"
]
]
}
}
]
}
]
},
{
"name": "shouldValidateCreate",
"sourceName": "msdyn_shouldvalidatecreate",
"sourceOrdering": 39,
"description": "Describes whether the plugin should run validations on create of a unit record. For internal use only.",
"displayName": "Should Validate Create",
"isNullable": true,
"purpose": "hasA",
"dataType": "boolean",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "none"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Describes whether the plugin should run validations on create of a unit record. For internal use only."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Should Validate Create"
]
]
}
}
]
}
]
},
{
"name": "unitgroup",
"sourceName": "msdyn_unitgroup",
"sourceOrdering": 41,
"description": "The ID of the unit group that the unit is associated with.",
"displayName": "Unit group",
"isNullable": true,
"purpose": "hasA",
"dataType": "entityId",
"entity": {
"source": "UnitGroup",
"operations": [
{
"$type": "replaceAsForeignKey",
"condition": "referenceOnly",
"reference": "unitgroupId",
"replaceWith": {
"name": "unitgroup",
"dataType": "entityId",
"appliedTraits": [
{
"traitReference": "is.requiredAtLevel",
"arguments": [
{
"name": "level",
"value": "applicationrequired"
}
]
},
{
"traitReference": "is.localized.describedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"The ID of the unit group that the unit is associated with."
]
]
}
}
]
},
{
"traitReference": "is.localized.displayedAs",
"arguments": [
{
"entityReference": {
"entityShape": "localizedTable",
"constantValues": [
[
"en",
"Unit group"
]
]
}
}
]
},
{
"traitReference": "is.CDS.lookup",
"arguments": [
{
"name": "style",
"value": "single"
}
]
}
]
}
}
]
}
}
],
"exhibitsTraits": [
{
"traitReference": "is.CDM.attributeGroup",
"arguments": [
{
"entityReference": {
"entityShape": "attributeGroupSet",
"constantValues": [
[
"/Sustainability/Unit.1.0.cdm.json/Unit/hasAttributes/attributesAddedAtThisScope"
]
]
}
}
]
}
]
}
}
]
}
],
"documentVersion": "1.0"
}