安照beego orm文档定义模型与设计数据库都未成功,求解……
运行结果:
![QQ图片20171111090854.png](https://static.studygolang.com/171111/95a47e52efd44bf0c9b9b810f6fa6d51.png)
User struct:
![QQ图片20171111091215.png](https://static.studygolang.com/171111/1c50ec404576914627f7391c187908ff.png)
Role struct:
![QQ图片20171111091230.png](https://static.studygolang.com/171111/41bed24088c7ebd14a603e69f76e3b40.png)
查询代码:
![QQ图片20171111091936.png](https://static.studygolang.com/171111/f2008cb047e9985c68ae6aac702f69bc.png)
user数据表:
![QQ图片20171111091337.png](https://static.studygolang.com/171111/aad1547ee944f0cc4fd3e52e2d55e63d.png)
role数据表:
![QQ图片20171111091350.png](https://static.studygolang.com/171111/322ee64d22043f5b7c508bba7cc1c3d8.png)
有疑问加站长微信联系(非本文作者)