isaac-allef / typeorm-inheritance

Learn how to implement inheritance in TypeORM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeORM Inheritance

Learn how to implement inheritance in TypeORM

๐Ÿ“Œ Table of Contents

๐Ÿš€ Features

  • Use inheritance in order to create database schema

๐Ÿ“™ Class Diagram

In order to better visualize the class inheritance scheme, I've created the following class diagram:

๐Ÿ“‹ Database Model

In order to understand how the database schema would look, I've created the following database models:

๐Ÿ‘ท Installation

You need to install Node.js and Yarn first, then in order to clone the project via HTTPS, run this command:

# Clone this repository
git clone https://github.com/isaac-allef/typeorm-inheritance.git

# Go into the repository
$ cd typeorm-inheritance

# Install dependencies
yarn install

Setup a database

Install Postgres to create a database or if you have Docker in your machine, fill the environment values related to database configurations and then run the following commands in order to create a Postgres container.

# Create postgres docker
$ sudo docker run --name typeorm-inheritance -e POSTGRES_PASSWORD=1234 -p 5433:5432 -d postgres

# Create 'users' database
$ CREATE DATABASE academy;

๐Ÿƒ Getting Started

Run the transactions in order to configure the database schema

yarn typeorm migration:run

๐Ÿ“ฎ Faq

Question: What are the tecnologies used in this project?

Answer: The tecnologies used in this project are NodeJS, Typescript and TypeORM

๐Ÿ“• License

๐Ÿ“ License

This project is under the MIT license. See the LICENSE for more information.


Made with โ™ฅ by Isaac Allef ๐Ÿ‘‹

About

Learn how to implement inheritance in TypeORM.

License:MIT License


Languages

Language:TypeScript 100.0%