<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================================
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the repository root for full copyright notice.
========================================================================================== -->
<ECSchema schemaName="ECDbSchemaPolicies" alias="ecdbpol" version="01.00.01" description="Schema policies which impose schema authoring rules." displayLabel="ECDb Schema Policies" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">

    <ECCustomAttributeClass typeName="NoAdditionalForeignKeyConstraints" modifier="Sealed" appliesTo="Schema" 
                            description="If opted-in by a schema, other schemas may not define additional ECDbMap:ForeignKeyConstraint custom attributes.">
        <ECArrayProperty propertyName="Exceptions" typeName="string" minOccurs="0" maxOccurs="unbounded" 
                            description="Navigation properties that are allowed violate against the policy. Format: {schema name}:{class name}.{property name}"/>
    </ECCustomAttributeClass>
    
    <ECCustomAttributeClass typeName="NoAdditionalLinkTables" modifier="Sealed" appliesTo="Schema"
                            description="If opted-in by a schema, other schemas may not define ECRelationshipClasses that cause new link tables to be created.">
        <ECArrayProperty propertyName="Exceptions" typeName="string" minOccurs="0" maxOccurs="unbounded" description="Relationship classes that that are allowed to violate against the policy. Format: {schema name}:{relationship class name}"/>
    </ECCustomAttributeClass>
    
    <ECCustomAttributeClass typeName="NoAdditionalRootEntityClasses" modifier="Sealed" appliesTo="Schema"
                            description="If opted-in by a schema, other schemas may not define entity classes that do not subclass from existing classes (mixins are excluded from this policy).">
        <ECArrayProperty propertyName="Exceptions" typeName="string" minOccurs="0" maxOccurs="unbounded" 
                         description="Entity classes that that are allowed to violate against the policy.  Format: {schema name}:{class name}"/>
    </ECCustomAttributeClass>
</ECSchema>
