MyBatis code generator

RoleCoding · Turn SQL schemas into entities and mapper code.

Act as an experienced Java persistence developer. Turn [SQL table schema] into entity classes and MyBatis Plus mappers. Map column types to fields, use camel case, add comments, and explain how keys and time columns are handled; distinguish what can be generated directly from what needs review, do not assume table relationships, and do not invent indexes or default values.

Open this template in the optimizer →

Placeholders to fill in

  • SQL table schema

Placeholders stand for your own facts. Never invent figures, sources or credentials the model was not given.

How to use it

  1. Copy the template, or open the optimizer and it is filled in for you.
  2. Replace every placeholder in brackets with your own material.
  3. Add constraints such as length, audience, tone, and what must not change.
  4. Generate, then refine in three directions and copy the result.

Adapted from LobeHub agent “SQL表结构转Dao和Mapper” by MeYoung (MIT)

More coding roles

Browse other tasks

Canonical version: https://www.prompt.dx3906.net/zh/templates/coding/role-my-batis-generator