@igeg/database
TypeScript icon, indicating that this package has built-in type declarations

1.11.0 • Public • Published

@igeg/database

npm version license

The @igeg/database npm package provides a set of classes that can be used as DTOs for database interactions with the MyAdmin and SG applications.

Installation

You can install the @igeg/database package using npm:

npm install @igeg/database

or alternatively by using yarn

yarn add @igeg/database

Usage

To use the @igeg/database package in your application, follow these steps:

  1. Import the desired classes into your application using the import statement:

    import { CustomerDto } from '@igeg/database';
  2. Use the imported classes as types in your code to define your data structures. For example, to define a user:

    const user = new CustomerDto();
    user.name = 'John Doe';
    user.email = 'john@example.com';
  3. You can also use the classes as DTOs to interact with the database. For example, to save a user:

    const userEntity = new UserEntity();
    userEntity.save(user)
      .then(() => {
        console.log('User saved successfully!');
      })
      .catch((error) => {
        console.error('Failed to save user:', error);
      });

Contributing

Contributions are welcome! If you find any issues or want to contribute enhancements, feel free to submit a pull request.

License

This package is licensed under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i @igeg/database

Weekly Downloads

0

Version

1.11.0

License

MIT

Unpacked Size

287 kB

Total Files

196

Last publish

Collaborators

  • lordrip