Skip to content
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

base model中id为string的意义? #105

Open
xylplm opened this issue Oct 19, 2021 · 1 comment
Open

base model中id为string的意义? #105

xylplm opened this issue Oct 19, 2021 · 1 comment

Comments

@xylplm
Copy link

xylplm commented Oct 19, 2021

base model中id为string的意义是什么?数据库id不是基本都是int或者bugint类型?这里数据模型id也应该是number才是啊,为啥是string。求科普一下

@waitingsong
Copy link
Member

有可能用的是 bigint 类型,db驱动程序自动转换为 string 输出,避免 js 处理 int/bigint 混乱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants