123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- package main
- import (
- "encoding/xml"
- )
- type XmlApplication struct {
- XMLName xml.Name `xml:"application"`
- ApplicationName string `xml:"name,attr"`
- PackageName string `xml:"packagename,attr"`
- Desc string `xml:"desc,attr"`
- Controllers XmlControllers `xml:"controllers"`
- Tables XmlTables `xml:"tables"`
- Beans XmlBeans `xml:"beans"`
- }
- type XmlControllers struct {
- ControllerList []XmlController `xml:"controller"`
- }
- type XmlController struct {
- Name string `xml:"name,attr"`
- Desc string `xml:"desc,attr"`
- Dir string `xml:"dir,attr"`
- SkipLogin bool `xml:"skip_login,attr"`
- Apis []XmlApi `xml:"api"`
- ApplicationName string `xml:"-"`
- PackageName string `xml:"-"`
- }
- type XmlApi struct {
- Name string `xml:"name,attr"`
- Desc string `xml:"desc,attr"`
- Method string `xml:"method,attr"`
- Function string `xml:"function,attr"` //page,tree
- Table string `xml:"table,attr"`
- ParamList []XmlApiParam `xml:"param"`
- Return XmlReturn `xml:"return"`
- }
- type XmlApiParam struct {
- Name string `xml:"name,attr"`
- TransType string `xml:"trans-type,attr"`
- Type string `xml:"type,attr"`
- Desc string `xml:"desc,attr"`
- Ref string `xml:"ref,attr"`
- Must bool `xml:"must,attr"`
- DefaultValue string `xml:"default-value,attr"`
- }
- type XmlReturn struct {
- Success XmlSuccess `xml:"success"`
- Failure XmlFailure `xml:"failure"`
- }
- type XmlSuccess struct {
- Ref string `xml:"ref,attr"`
- Desc string `xml:"desc,attr"`
- }
- type XmlFailure struct {
- Ref string `xml:"ref,attr"`
- Desc string `xml:"desc,attr"`
- }
- //
- type XmlTables struct {
- TableList []XmlTable `xml:"table"`
- }
- type XmlTable struct {
- XMLName xml.Name `xml:"table"`
- Name string `xml:"name,attr"`
- Desc string `xml:"desc,attr"`
- ImportDateTime bool `xml:"-"`
- ColumnList []XmlColumn `xml:"column"`
- }
- type XmlColumn struct {
- Name string `xml:"name,attr"`
- Caption string `xml:"caption,attr"`
- IsNull bool `xml:"isNull,attr"`
- IsPK bool `xml:"isPK,attr"`
- IsIndex bool `xml:"isIndex,attr"`
- AutoIncrement bool `xml:"autoIncrement,attr"`
- IsUnique bool `xml:"isUnique,attr"`
- Size int `xml:"size,attr"`
- Type string `xml:"type,attr"`
- DbType string `xml:"dbtype,attr"`
- DefaultValue string `xml:"default-value,attr"`
- }
- type XmlBeans struct {
- BeanList []XmlBean `xml:"bean"`
- }
- type XmlBean struct {
- XMLName xml.Name `xml:"bean"`
- Name string `xml:"name,attr"`
- Desc string `xml:"desc,attr"`
- Inher string `xml:"inher,attr"`
- ImportDateTime bool `xml:"-"`
- PropList []XmlProp `xml:"prop"`
- }
- type XmlProp struct {
- Name string `xml:"name,attr"`
- Caption string `xml:"caption,attr"`
- Type string `xml:"type,attr"`
- DefaultValue string `xml:"default-value,attr"`
- }
|