makefile 395 B

123456789101112131415
  1. #!/bin/bash
  2. # generate model with cache from ddl
  3. fromDDL:
  4. goctl model mysql ddl -src="./sql/*.sql" -dir="./sql/model/user" -c
  5. # generate model with cache from data source
  6. user=root
  7. password=password
  8. datasource=127.0.0.1:3306
  9. database=gozero
  10. fromDataSource:
  11. goctl model mysql datasource -url="$(user):$(password)@tcp($(datasource))/$(database)" -table="*" -dir ./model/cache -c -style camel