在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
ardanweb rapid development framework DepsCLIardan cli tools InstallGo getgo get github.com/teamlint/ardan OR Gitgit clone [email protected]:teamlint/ardan.gitcd ardango install # OR: task install UsagesInit Projectinitial application project layout & infrastructure codes
mkdir myprojectcd myprojectgo mod init <name>ardan -s -dc <db-conn> init all Project layoutRuntask run OR cd cmd/servergo run main.go Model SyncCreate model file.Write model file in package modelimport ( "time")//ardan:sync//ardan:gen // Tom test modeltype Tom struct{ ID string `xorm:"not null pk unique CHAR(20) 'id'" json:"id"` Username string `xorm:"not null index VARCHAR(100)" json:"username"` CreatedAt time.Time `xorm:"not null created TIMESTAMPZ" json:"created_at"`} ardan -dc <db-conn> sync view databasehave fun!. Generate Toolsgenrate model query/repository/service/controller codes.
ardan gen all TODO |
请发表评论