Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.19 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.19 KB

entity-generator

entity-generator is a command-line tool that reads your Prisma schema file and automatically generates TypeScript classes for mappers, entities, and repositories. This tool is designed to streamline the process of setting up a structured data layer in your TypeScript applications, saving time and reducing the need for repetitive coding.

Features

  • Parses your Prisma schema file.
  • Generates TypeScript classes for:
    • Mapper: Handles data transformations.
    • Entity: Represents your data models.
    • Repository: Manages database operations.

Installation

Download the latest release from Releases and add the binary to your system's PATH.

wget https://github.com/xsadia/entity_generator/releases/download/v1.6/entity-generator-linux-x64.tar.gz
tar -xzf entity-generator-linux-x64.tar.gz
sudo mv entity-generator /usr/local/bin

Usage

Run the following command in the root of your project and choose the model you want to create an entity, mapper or repository of and choose the output module:

entity-generator

Demo

2024-11-11.20-25-19.mp4