undeexcepturi
Version:
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.
22 lines (15 loc) • 551 B
text/typescript
import { Collection, Entity, ManyToMany, PrimaryKey, Property } from '@mikro-orm/core';
import { v4 } from 'uuid';
import { Test2 } from './Test2';
({ tableName: 'public.label2' })
export class Label2 {
({ type: 'uuid', serializedName: 'id', serializer: value => `uuid is ${value}` })
uuid = v4();
()
name: string;
({ entity: () => Test2, pivotTable: 'label_schema.label2_tests', fixedOrder: true })
tests = new Collection<Test2>(this);
constructor(name: string) {
this.name = name;
}
}