一键导入
domain-entity-creator
Create a new backend domain entity and all required artifacts; use for prompts like "Create an entity ... in package ...".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a new backend domain entity and all required artifacts; use for prompts like "Create an entity ... in package ...".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add a collection field to an existing backend entity and update dependent artifacts; use for prompts like "Add collection ... to entity ...".
Add a many-to-one relation between existing entities and update dependent artifacts; use for prompts like "Add a required many-to-one relation ...".
Add a one-to-many relation between existing entities and update dependent artifacts; use for prompts like "Add a one-to-many relation ...".
Add a one-to-one relation between existing entities and update dependent artifacts; use for prompts like "Add a required one-to-one relation ...".
Add or remove a property on an existing backend entity and update dependent artifacts; use for prompts like "Add property ... to entity ...".
Lint and format source code using the gradle tasks. Run lint to verify source files are correctly formatted. Run format to apply changes on the source code to automatically fix formatting issues. Java code is processed by Spotless; TypeScript code is processed by Prettier.
| name | domain-entity-creator |
| description | Create a new backend domain entity and all required artifacts; use for prompts like "Create an entity ... in package ...". |
You MUST NOT generate code if even one of the preconditions is not met.
Extract the entity name from the request.
Check if name is a valid identifier for the programming languages Java, Typescript and SQL.
Check that NO entity class with this name already exists.
Replace placeholder {Entity} with the given name.
Replace placeholder {entity} with kebab case of the the given name.
Replace placeholder '{table}' with snake case of the the given name.
Extract the domain package name from the request.
Check if name is a valid identifier for the programming languages Java, Typescript and SQL.
Check that a package directory with this name exists.
Replace placeholder {package} with the given name.
Add a short description of the main purpose of the entity.
Use doc/concept/spring/_json-jpa-entity.adoc as the implementation baseline.
Create a new change set with:
id of type UUID (not null).version of type BIGINT (not null).
Add a preCondition element that checks tableExists tableName="{entity}".
Include the new file {entity}.xml in changelog.xml at the end of the list.Use doc/concept/spring/_json-jpa-entity.adoc as the implementation baseline.
Annotate with @Entity, @Table(name = "{entity}").
Add package-visible constructors.
Add property id property following _json-jpa-entity-version-id.adoc.
Add property version property following _json-jpa-entity-version-id.adoc.
Add operation isEqual.
Add operation withId.
Add operation verify only when requested.
Add operation extraJson only when requested as it may have negative impact on the performance if relations are involved.
Use doc/concept/spring/_json-jpa-entity.adoc as the implementation baseline.
Implement tests from the test approach example only.
Use doc/concept/spring/_json-jpa-repository.adoc as the implementation baseline.
Use doc/concept/spring/_json-jpa-repository.adoc as the implementation baseline.
Implement tests from the test approach example only.
Use doc/concept/spring/_json-jpa-rest-controller.adoc as the implementation baseline.
Use doc/concept/spring/_json-jpa-rest-controller.adoc as the implementation baseline.
Add DELETE statement for database table {table} in DatabaseCleaner class.
Add getApi{Entity}NoElement test.
Add postApi{Entity} test.
Add postApi{Entity}Conflict test if entity has unique columns.
Add putApi{Entity} test.
Add patchApi{Entity} tests for all properties.
Add patchApi{Entity} tests for all collections.
Add patchApi{Entity} tests for all relations.
Add getApi{Entity} test.
Add getApi{Entity}ById test.
Add getApi{Entity}ByIdNotFound test.
Add delete{Entity} test.
Add delete{Entity}NotFound test.
Use doc/concept/spring/_graphql-controller.adoc as the implementation baseline.
Add all{Entity}: [{Entity}] in Query.gqls.
Add {entity}ById(id: ID!): {Entity} in Query.gqls.
Do not add other queries.
Use doc/concept/spring/_graphql-controller.adoc as the implementation baseline.
Use doc/concept/spring/_graphql-controller.adoc as the implementation baseline.
Implement tests from the test approach example only.