codegen-dev.xsd 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xs:schema id="codegen" elementFormDefault="qualified"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema">
  4. <xs:element name="config">
  5. <xs:complexType>
  6. <xs:sequence>
  7. <!--变量 -->
  8. <xs:element name="variables" maxOccurs="1">
  9. <xs:complexType>
  10. <xs:sequence>
  11. <xs:element name="variable" maxOccurs="unbounded">
  12. <xs:complexType>
  13. <xs:attributeGroup ref="variableAttr"></xs:attributeGroup>
  14. </xs:complexType>
  15. </xs:element>
  16. </xs:sequence>
  17. </xs:complexType>
  18. </xs:element>
  19. <xs:element name="bizDirs" maxOccurs="1">
  20. <xs:complexType>
  21. <xs:sequence>
  22. <xs:element name="dir" maxOccurs="unbounded"
  23. minOccurs="0">
  24. <xs:complexType>
  25. <xs:attributeGroup ref="dirAttr"></xs:attributeGroup>
  26. </xs:complexType>
  27. </xs:element>
  28. </xs:sequence>
  29. </xs:complexType>
  30. </xs:element>
  31. <xs:element name="appDirs" maxOccurs="1">
  32. <xs:complexType>
  33. <xs:sequence>
  34. <xs:element name="dir" maxOccurs="unbounded"
  35. minOccurs="0">
  36. <xs:complexType>
  37. <xs:attributeGroup ref="dirAttr"></xs:attributeGroup>
  38. </xs:complexType>
  39. </xs:element>
  40. </xs:sequence>
  41. </xs:complexType>
  42. </xs:element>
  43. <!--表变量 -->
  44. <xs:element name="table" minOccurs="0" maxOccurs="unbounded">
  45. <xs:complexType>
  46. <xs:sequence maxOccurs="unbounded" minOccurs="1">
  47. <!--表级别变量 -->
  48. <xs:element name="variable" minOccurs="0" maxOccurs="unbounded">
  49. <xs:complexType>
  50. <xs:attributeGroup ref="variableAttr"></xs:attributeGroup>
  51. </xs:complexType>
  52. </xs:element>
  53. <xs:element name="subtable" minOccurs="0" maxOccurs="unbounded">
  54. <xs:complexType>
  55. <xs:sequence maxOccurs="unbounded" minOccurs="1">
  56. <xs:element name="variable" minOccurs="0"
  57. maxOccurs="unbounded">
  58. <xs:complexType>
  59. <xs:attributeGroup ref="variableAttr"></xs:attributeGroup>
  60. </xs:complexType>
  61. </xs:element>
  62. </xs:sequence>
  63. <xs:attributeGroup ref="tableAttr"></xs:attributeGroup>
  64. </xs:complexType>
  65. </xs:element>
  66. </xs:sequence>
  67. <xs:attribute name="tableName" type="xs:string" use="required">
  68. <xs:annotation>
  69. <xs:documentation>数据库表名.</xs:documentation>
  70. </xs:annotation>
  71. </xs:attribute>
  72. </xs:complexType>
  73. </xs:element>
  74. </xs:sequence>
  75. </xs:complexType>
  76. </xs:element>
  77. <!--变量属性 -->
  78. <xs:attributeGroup name="variableAttr">
  79. <xs:attribute name="name" use="required" type="xs:string">
  80. </xs:attribute>
  81. <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
  82. <xs:attribute name="comment" type="xs:string"></xs:attribute>
  83. </xs:attributeGroup>
  84. <xs:attributeGroup name="dirAttr">
  85. <xs:attribute name="sys" type="xs:string">
  86. </xs:attribute>
  87. <xs:attribute name="modules" use="required" type="xs:string">
  88. </xs:attribute>
  89. <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
  90. </xs:attributeGroup>
  91. <xs:attributeGroup name="tableAttr">
  92. <xs:attribute name="tableName" type="xs:string" use="required">
  93. <xs:annotation>
  94. <xs:documentation>
  95. 表名
  96. </xs:documentation>
  97. </xs:annotation>
  98. </xs:attribute>
  99. <xs:attribute name="foreignKey" type="xs:string" use="required">
  100. <xs:annotation>
  101. <xs:documentation>
  102. 外键
  103. </xs:documentation>
  104. </xs:annotation>
  105. </xs:attribute>
  106. </xs:attributeGroup>
  107. </xs:schema>