jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.53k stars 4.02k forks source link

int support for enums #23650

Closed Spark61 closed 6 months ago

Spark61 commented 1 year ago
Overview of the feature request

I'd like to request the capability to assign integer values to enums in the JDL file. This would allow us to define enums in a more expressive manner by associating specific integer values to them.

The envisioned format would be:

enum Test {
    TEST(5)
}
Motivation for or Use Case

The current format of enums in JDL only allows for the declaration of the enum names without the possibility to assign specific values. In various use cases, there is a need to not only define the enum names but also have a specific integer value associated with them for better clarity and efficiency in data representation.

Having the ability to specify an integer value would make the JDL more flexible and powerful, allowing developers to better map their domain requirements into the JDL format. It also provides the potential to simplify data migrations and integrations with other systems where integer-based enum representations are crucial.

Related issues or PR

I've searched the issues both open and closed and couldn't find a similar feature request or PR. If it exists and I missed it, my apologies.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days