commit 60c0727093a7a92de123fefe0f85c4b287a9a38a Author: LinskRuis.32 Date: Thu Nov 7 17:09:38 2019 +0800 init- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2bac947 --- /dev/null +++ b/.gitignore @@ -0,0 +1,134 @@ +# https://github.com/github/gitignore/blob/master/Java.gitignore + +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +#*.jar +*.war +*.ear +*.log +*.log.* + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +/.project + + +# https://github.com/github/gitignore/blob/master/Maven.gitignore +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties + + +# https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore + +.metadata +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# Eclipse Core +.project + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + + +# https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + + +# zeroturnaround +rebel.xml + + +# log +log/ +logs/ +~$*.* + + +# IntelliJ IDEA +*.iml +.idea/ +.gradle/ +tests/ +cmake-build-*/ + +# Visual Studio +.vs/ +bin/ +obj/ +CMakeFiles/ +resource/*.o \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..7feaa2a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# GoClouds + +GoClouds 微服务 \ No newline at end of file diff --git a/bdxorm.bat b/bdxorm.bat new file mode 100644 index 0000000..bc75653 --- /dev/null +++ b/bdxorm.bat @@ -0,0 +1,2 @@ +xorm reverse mysql "root:123@tcp(localhost:3306)/test?charset=utf8" goxorm +xorm reverse mysql "root:123@tcp(localhost:3306)/test?charset=utf8" goxorm \ No newline at end of file diff --git a/goxorm/config b/goxorm/config new file mode 100644 index 0000000..5115936 --- /dev/null +++ b/goxorm/config @@ -0,0 +1,7 @@ +lang=go +genJson=0 +prefix=cos_ +ignoreColumnsJSON= +created= +updated= +deleted= \ No newline at end of file diff --git a/goxorm/struct.go.tpl b/goxorm/struct.go.tpl new file mode 100644 index 0000000..ad7038e --- /dev/null +++ b/goxorm/struct.go.tpl @@ -0,0 +1,17 @@ +package {{.Models}} + +{{$ilen := len .Imports}} +{{if gt $ilen 0}} +import ( + {{range .Imports}}"{{.}}"{{end}} +) +{{end}} + +{{range .Tables}} +type {{Mapper .Name}} struct { +{{$table := .}} +{{range .ColumnsSeq}}{{$col := $table.GetColumn .}} {{Mapper $col.Name}} {{Type $col}} {{Tag $table $col}} +{{end}} +} +{{end}} +