1.2.0 • Published 12 months ago

@nfly/orm v1.2.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
12 months ago

Install

pnpm add @nfly/orm

Usage

More information typeorm

# service
mport { BaseService } from '@nfly/core';
import { Model } from '@nfly/orm';
import { Repository } from 'typeorm';
import { Photo } from '../../Model/home';

class HomeService extends BaseService {
  // connectname  default ''
  @Model<Photo>(Photo, 'connectname')
    home!: Repository<Photo>;

  async getName() {
    const data = await this.home.find();
    return data;
  }
}

# service
import { Service } from '@nfly/router';
import HomeService from '../../service/Home';

class Home extends BaseController {
  @Service(HomeService)
    homeServer!: HomeService;
  
}

use @nfly/cli create demo.

1.2.0

12 months ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.1

3 years ago