Skip to content

将实体主键改为雪花算法 #287

@gmf520

Description

@gmf520

您的功能请求与现有问题有关吗?请描述

  • 实体主键的数据类型,int自增不容易应对数据迁移,合并,分布式,分库分表等需求,Guid太长且复杂
  • long类型的雪花算法较短且有序,是最佳解决方案

描述您想要的需求方案

将实体主键类型更改为long类型,使用雪花算法给值,应用库:https://github.com/yitter/IdGenerator

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions