Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/entities/Publisher.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Collection, Entity, Enum, OneToMany, Opt, PrimaryKey, Property } from '@mikro-orm/core';
import { Book } from './Book';
import { BaseEntity } from './BaseEntity';

@Entity()
export class Publisher {

@PrimaryKey()
id!: number;
export class Publisher extends BaseEntity {
Comment thread
B4nan marked this conversation as resolved.

@Property()
name: string;
Expand All @@ -17,6 +15,7 @@ export class Publisher {
type: PublisherType & Opt;

constructor(name: string, type = PublisherType.LOCAL) {
super();
this.name = name;
this.type = type;
}
Expand Down