-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schema和entity是不是有点重复了 #27
Comments
嗯,会存在一些重复,不过,想要处理存储层的完全隔离,需要有一层对象层到实体层的映射。 |
确实,要是每个业务表都这么做处理累死咯....不过代码清晰干净很多,剩下就是复制粘贴的活儿.... |
哈哈 这个时候需要一个代码生成器 |
嗯,写个简单的工具就可以实现,我自己用的时候就写了一个😁 |
求大佬科普,golang如何实现代码生成,自寻资料找到这个https://github.com/goadesign/goa |
大佬,工具一并开源了呀!! |
@LyricTian 大佬,要不把代码生成器一并开源了 |
@lchjczw |
你的意思是直接拷贝一个,而不是弄两个结构体转来转去? |
有没有更好的处理方式 两个model包 一个bill一个scheme 还有entity 要绕死了 |
通通干掉 怎么简洁怎么来 :) |
简洁 不容易出错 好维护 |
大佬,工具一并开源了呀!! |
确实有点绕 , 同求开源代码生成器/:B-) |
schema和entity是不是有点重复了,转来转去感觉有点复杂了。
The text was updated successfully, but these errors were encountered: