Skip to content

Commit

Permalink
chore(base): update example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 18, 2023
1 parent 4d3548a commit 44150e2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { TypeNexus } from 'typenexus';

Entity is a class that maps to a database table (or collection when using `Postgres`). You can create an entity by defining a new class and mark it with **`@Entity()`**:

`./src/entities/user.entity.ts`
`./src/user.entity.ts`

```typescript
import { Entity, PrimaryGeneratedColumn, Column, DeleteDateColumn, CreateDateColumn } from 'typenexus';
Expand Down
6 changes: 3 additions & 3 deletions examples/base/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TypeNexus, TypeNexusOptions, DataSourceOptions } from 'typenexus';
import { UserController } from './controller/User.js';
import { Session } from './entity/Session.js';
import { User } from './entity/User.js';
import { UserController } from './user.controller.js';
import { Session } from './session.entity.js';
import { User } from './user.entity.js';

const ormOptions: DataSourceOptions = {
type: 'postgres',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from 'typenexus';
import { HeaderParam, HeaderParams, Body, BodyParam, Session, SessionParam } from 'typenexus';
import { Response, Request } from 'express';
import { User } from '../entity/User.js';
import { User } from './user.entity.js';

@Controller('/users')
export class UserController {
Expand Down
File renamed without changes.

0 comments on commit 44150e2

Please sign in to comment.