Skip to content

Instantly share code, notes, and snippets.

@umutyerebakmaz
Created January 17, 2020 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umutyerebakmaz/d1fc00485541e3c357ab259658af952c to your computer and use it in GitHub Desktop.
Save umutyerebakmaz/d1fc00485541e3c357ab259658af952c to your computer and use it in GitHub Desktop.
TypeORM ManyToMany Kullanımı.
import { BaseEntity, PrimaryColumn, Entity, CreateDateColumn } from 'typeorm';
@Entity()
export class UserAuthorLike extends BaseEntity {
@PrimaryColumn('uuid')
userId: string;
@PrimaryColumn('uuid')
authorId: string;
@CreateDateColumn({ type: 'timestamp' })
likedAt: Date;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment