Commit 820175d5 authored by dhc's avatar dhc

添加文件

parents
# Logwire 的xml schema 文件。
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:attributeGroup name="abstractQuery">
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="model" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>引用的主表,model或query的名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<!--
<xs:attribute name="type" type="xs:string" default="dynamic">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="saveable" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
-->
<xs:attribute name="ignoreDeleted" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation>主model的includeDeletedField=true时该属性有效,ignoreDeleted=true,将标记为逻辑删除的记录过滤掉,默认为true</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="joinAsScalarSubquery" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>是否使用scalarSubquery的方式生成查询语句</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeFields" type="xs:string">
<xs:annotation>
<xs:documentation>配置查询主Model的字段,默认所有字段;多个字段,分隔</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="excludeFields" type="xs:string">
<xs:annotation>
<xs:documentation>配置不查询的主Model字段;如果已经设置了includeFields,excludeFields的设置无效;</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sql" type="xs:string">
<xs:annotation>
<xs:documentation>静态sql,在where子句中使用</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sqlFilter" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="title" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<!--
<xs:attribute name="isModelQuery" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>是否是一个由model转换的query</xs:documentation>
</xs:annotation>
</xs:attribute>
-->
<xs:attribute name="orderBy" type="xs:string">
<xs:annotation>
<xs:documentation>
多个order by字段使用逗号分隔
每个order by字段如果使用双下划线分隔,第一部分为join的表的别名,第二部分为字段名
多个order by-开头表示排序方式desc,否则asc
当只有一个order by字段时没有-则排序使用配置的asc字段值
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="asc" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation>排序是否为asc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="customFields" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
</xs:schema>
\ No newline at end of file
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:complexType name="field">
<xs:sequence>
<xs:element name="helpText" maxOccurs="1" minOccurs="0" type="xs:string"></xs:element>
</xs:sequence>
<xs:attribute name="builtin" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>是否自动创建</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="isExp" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>是否是表达式</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>名称,不能为空</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="verboseName" type="xs:string">
<xs:annotation>
<xs:documentation>显示名称,如果为空默认为name</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbColumn" type="xs:string">
<xs:annotation>
<xs:documentation>数据库表字段名,如果为空默认为name</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="length" type="xs:int">
<xs:annotation>
<xs:documentation>长度</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="precision" type="xs:int">
<xs:annotation>
<xs:documentation>精度</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="helpText" type="xs:string">
<xs:annotation>
<xs:documentation>帮助文本</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="nameField" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>是否为Model对象的显示字段,多个显示字段将被用<code>-</code>拼接</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="baseField">
<xs:complexContent>
<xs:extension base="field">
<xs:attribute name="primaryKey" type="xs:boolean">
<xs:annotation>
<xs:documentation>是否主键</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="nullable" type="xs:boolean">
<xs:annotation>
<xs:documentation>是否可以为空</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="defaultValue" type="xs:string">
<xs:annotation>
<xs:documentation>默认值</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="autoField">
<xs:complexContent>
<xs:extension base="field">
<xs:attribute name="dbSequenceName" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="generator" type="xs:string">
<xs:annotation>
<xs:documentation>ID生成器</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="primaryKey" type="xs:boolean">
<xs:annotation>
<xs:documentation>是否主键</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="nullable" type="xs:boolean">
<xs:annotation>
<xs:documentation>是否可以为空</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="choiceField">
<xs:complexContent>
<xs:extension base="baseField">
<xs:attribute name="choicesCategory" type="xs:string">
<xs:annotation>
<xs:documentation>可选值所属类别</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="decimalField">
<xs:complexContent>
<xs:extension base="baseField">
<xs:attribute name="maxDigits" type="xs:integer">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="decimalPlaces" type="xs:integer">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="foreignKeyField">
<xs:complexContent>
<xs:extension base="baseField">
<xs:attribute name="otherModel" type="xs:string">
<xs:annotation>
<xs:documentation>引用的model名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="fetch" type="xs:string">
<xs:annotation>
<xs:documentation>生成查询时需要查询的列名称,多列逗号分隔,每列可以使用=指定别名</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onDelete" type="onDeleteEnum">
<xs:annotation>
<xs:documentation>删除 parent 表时的处理方式</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="onDeleteEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="NONE"></xs:enumeration>
<xs:enumeration value="CASCADE"></xs:enumeration>
<xs:enumeration value="RESTRICT"></xs:enumeration>
<xs:enumeration value="UPDATE"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fieldType">
<xs:restriction base="xs:string">
<xs:enumeration value="integer"></xs:enumeration>
<xs:enumeration value="long"></xs:enumeration>
<xs:enumeration value="decimal"></xs:enumeration>
<xs:enumeration value="string"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="formulaField">
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="formula" type="xs:string">
<xs:annotation>
<xs:documentation>自定义表达式</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type" type="xs:string" default="js">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="groupField">
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="verboseName" type="xs:string">
<xs:annotation>
<xs:documentation>显示名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="refer" type="xs:string">
<xs:annotation>
<xs:documentation>引用的field的name,如果field来自于join,格式为joinName__fieldName</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="customSql" type="xs:string">
<xs:annotation>
<xs:documentation>自定义sql,如果定义了customSql,refer和referFrom的定义失效</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type" type="fieldType">
<xs:annotation>
<xs:documentation>自定义sql的SQLType,如果定义了customSql,type不能为空</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="countField">
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="verboseName" type="xs:string">
<xs:annotation>
<xs:documentation>显示名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="customSql" type="xs:string">
<xs:annotation>
<xs:documentation>自定义sql</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="customAggrField">
<xs:complexContent>
<xs:extension base="groupField">
<xs:attribute name="func" type="xs:string">
<xs:annotation>
<xs:documentation>UNFINISHED</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
<xs:include schemaLocation="simple-fields.xsd"></xs:include>
<xs:include schemaLocation="item.xsd"></xs:include>
<xs:element name="groupQuery" type="groupQuery"/>
<xs:complexType name="groupQuery">
<xs:complexContent>
<xs:extension base="simple-fields"><!-- query标签 下可以有string,integer等标签 -->
<xs:choice maxOccurs="unbounded" minOccurs="1">
<xs:element name="join" type="join" maxOccurs="unbounded" minOccurs="0"></xs:element>
<xs:element name="max" type="groupField">
<xs:annotation>
<xs:documentation>聚合函数max</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="min" type="groupField">
<xs:annotation>
<xs:documentation>聚合函数min</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="sum" type="groupField">
<xs:annotation>
<xs:documentation>聚合函数sum</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="avg" type="groupField">
<xs:annotation>
<xs:documentation>聚合函数avg</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="count" type="countField">
<xs:annotation>
<xs:documentation>聚合函数count</xs:documentation>
</xs:annotation>
</xs:element>
<!--
<xs:element name="custom" type="customAggrField">
<xs:annotation>
<xs:documentation>自定义聚合函数表达式</xs:documentation>
</xs:annotation>
</xs:element>
-->
<xs:element name="group" type="groupField" maxOccurs="unbounded" minOccurs="0">
<xs:annotation>
<xs:documentation>group by的字段</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<!-- 定义query标签的属性 -->
<xs:attributeGroup ref="abstractQuery"></xs:attributeGroup>
<!--
<xs:attribute name="id" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
-->
<xs:attribute name="actionProvider" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="eventProvider" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="verboseName" type="xs:string">
<xs:annotation>
<xs:documentation>显示名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="valueField" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="template" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="matchFields" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:include schemaLocation="abstract-query.xsd"></xs:include>
<xs:include schemaLocation="relation.xsd"></xs:include>
<xs:complexType name="item">
<!-- item下可以有join子标签 -->
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="moreRelationKey" type="relationKey" maxOccurs="unbounded" minOccurs="0"></xs:element>
<xs:element name="join" type="join"></xs:element>
</xs:choice>
<!-- 定义item标签的属性 -->
<xs:attributeGroup ref="abstractQuery">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attributeGroup>
<xs:attribute name="relation" type="xs:string">
<xs:annotation>
<xs:documentation>引用其他relation的name</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="localKey" type="xs:string">
<xs:annotation>
<xs:documentation>relation为空时,为当前表的字段名称,否则为relation所引用的表的字段名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="referKey" type="xs:string">
<xs:annotation>
<xs:documentation>引用的表的字段名称</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
\ No newline at end of file
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
<xs:include schemaLocation="simple-fields.xsd"></xs:include>
<xs:element name="model" type="model"/>
<xs:complexType name="model">
<xs:sequence>
<xs:element name="helpText" maxOccurs="1" minOccurs="0" type="xs:string"></xs:element>
<xs:element name="fields" maxOccurs="1" minOccurs="1" type="simple-fields"></xs:element>
<xs:element name="indices" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="index">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="field" type="xs:string"></xs:element>
</xs:choice>
<xs:attribute name="unique" type="xs:boolean"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:string">
<xs:annotation>
<xs:documentation>ID</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="verboseName" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>如果不设置,默认和name相同</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="masterModel" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbTable" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>如果不设置,默认和name相同</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dbSchema" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>数据库 Schema,可能用于不自动创建数据库表,且数据库表所属 Schema 与数据库连接用户不同的情况</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="managed" type="xs:boolean" use="optional" default="true">
<xs:annotation>
<xs:documentation>是否为平台管理的表,如非平台管理的表,将不做任何附加功能的处理</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="builtinAudit" type="xs:boolean" use="optional" default="true">
<xs:annotation>
<xs:documentation>是否开启Audit字段的自动赋值</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="builtinDomain" type="xs:boolean" use="optional" default="true">
<xs:annotation>
<xs:documentation>是否开启Domain字段的自动赋值</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeDomainField" type="xs:boolean" use="optional" default="false">
<xs:annotation>
<xs:documentation>是否包含 domain 字段</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeDeletedField" type="xs:boolean" use="optional" default="false">
<xs:annotation>
<xs:documentation>是否包含控制字段 deleted</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeVersionField" type="xs:boolean" use="optional" default="false">
<xs:annotation>
<xs:documentation>是否包含控制字段 version</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="includeAuditFields" type="xs:boolean" use="optional" default="true">
<xs:annotation>
<xs:documentation>是否包含审核字段 insertUser insertTime updateUser updateTime</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="recordOperationLog" type="xs:boolean" use="optional" default="true">
<xs:annotation>
<xs:documentation>是否记录用户操作日志</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="helpText" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>帮助文本</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="archiveType" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>归档类型</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dataSourceKey" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>数据源</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="actionProvider" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="eventProvider" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="valueField" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>生成auto时的显示字段</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="template" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>生成auto时的显示内容</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="matchFields" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>auto时查询的匹配字段</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
<xs:include schemaLocation="simple-fields.xsd"></xs:include>
<xs:include schemaLocation="item.xsd"></xs:include>
<xs:element name="query" type="query"/>
<xs:complexType name="query">
<xs:complexContent>
<xs:extension base="simple-fields"><!-- query标签 下可以有string,integer等标签 -->
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="join" type="join"></xs:element>
<xs:element name="item" type="item"></xs:element>
<xs:element name="extend" type="extend"></xs:element>
<xs:element name="formulaField" type="formulaField"></xs:element>
</xs:choice>
<!-- 定义query标签的属性 -->
<xs:attributeGroup ref="abstractQuery"></xs:attributeGroup>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="actionProvider" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="eventProvider" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="verboseName" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="valueField" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="template" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="matchFields" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
\ No newline at end of file
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:attributeGroup name="abstractRelation">
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="model" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>引用的表名(model或query的name)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="title" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="relationType" type="xs:string" default="left">
<xs:annotation>
<xs:documentation>关联方式</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="relation" type="xs:string">
<xs:annotation>
<xs:documentation>引用其他的relation的name</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="localKey" type="xs:string">
<xs:annotation>
<xs:documentation>relation为空时,为当前表的字段名称,否则为relation所引用的表的字段名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="referKey" type="xs:string">
<xs:annotation>
<xs:documentation>引用的表的字段名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ignoreDeleted" type="xs:boolean">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="defValue" type="xs:string">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="join">
<xs:choice >
<xs:element name="moreRelationKey" type="relationKey" maxOccurs="unbounded" minOccurs="0"></xs:element>
</xs:choice>
<!-- 定义join标签的属性-->
<xs:attributeGroup ref="abstractRelation">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attributeGroup>
<xs:attribute name="fetch" type="xs:string">
<xs:annotation>
<xs:documentation>
查询的字段,
多个字段使用,分隔,
每个字段可以使用=命名别名,
来自于join或extend的字段前使用前缀:join的name加双下划线
同一个字段不允许多次出现
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="sql" type="xs:string">
<xs:annotation>
<xs:documentation>
已废弃,不建议使用,如果要实现join一个group by的子查询结果,请使用groupQuery的定义
使用该定义时请确保model的定义是一个model的名称而不是query的名称,否则将发生不可预见的错误
被join的是一个group by的子查询结果,sql为定义该子查询的where条件
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="groups" type="xs:string">
<xs:annotation>
<xs:documentation>
已废弃,不建议使用,如果要实现join一个group by的子查询结果,请使用groupQuery的定义
使用该定义时请确保model的定义是一个model的名称而不是query的名称,否则将发生不可预见的错误
被join的是一个group by的子查询结果,groups为定义该子查询的group by字段,多个条件使用,分隔
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="nullable" type="xs:boolean">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="extend">
<xs:choice >
<xs:element name="moreRelationKey" type="relationKey" maxOccurs="unbounded" minOccurs="0"></xs:element>
</xs:choice>
<!-- 定义extend标签的属性-->
<xs:attributeGroup ref="abstractRelation"></xs:attributeGroup>
</xs:complexType>
<xs:complexType name="relationKey">
<xs:attribute name="relation" type="xs:string">
<xs:annotation>
<xs:documentation>引用其他的relation的name</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="localKey" type="xs:string">
<xs:annotation>
<xs:documentation>relation为空时,为当前表的字段名称,否则为relation所引用的表的字段名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="referKey" type="xs:string">
<xs:annotation>
<xs:documentation>引用的表的字段名称</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="referValue" type="xs:string">
<xs:annotation>
<xs:documentation>指定referValue后,join on的条件不再去表中关联比较</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
\ No newline at end of file
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:include schemaLocation="field-type.xsd"></xs:include>
<xs:complexType name="simple-fields">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="auto" type="autoField"></xs:element>
<xs:element name="bigInteger" type="baseField"></xs:element>
<xs:element name="binary" type="baseField"></xs:element>
<xs:element name="boolean" type="baseField"></xs:element>
<xs:element name="choice" type="choiceField"></xs:element>
<xs:element name="date" type="baseField"></xs:element>
<xs:element name="dateTime" type="baseField"></xs:element>
<xs:element name="decimal" type="decimalField"></xs:element>
<xs:element name="file" type="baseField"></xs:element>
<xs:element name="foreignKey" type="foreignKeyField"></xs:element>
<xs:element name="gid" type="field"></xs:element>
<xs:element name="image" type="baseField"></xs:element>
<xs:element name="integer" type="baseField"></xs:element>
<xs:element name="json" type="baseField"></xs:element>
<xs:element name="oneToOne" type="foreignKeyField"></xs:element>
<xs:element name="smallInteger" type="baseField"></xs:element>
<xs:element name="string" type="baseField"></xs:element>
<xs:element name="text" type="baseField"></xs:element>
<xs:element name="xid" type="field"></xs:element>
</xs:choice>
</xs:complexType>
</xs:schema>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment