13 lines
272 B
TypeScript
13 lines
272 B
TypeScript
import { Entity, PrimaryKey, Property } from '@mikro-orm/core';
|
|
|
|
@Entity({ abstract: true })
|
|
export abstract class User {
|
|
@PrimaryKey({ type: 'string' })
|
|
username!: string;
|
|
|
|
@Property()
|
|
firstName: string = '';
|
|
|
|
@Property()
|
|
lastName: string = '';
|
|
}
|