quaerateum
Version:
Simple 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 JS.
22 lines (14 loc) • 344 B
text/typescript
import { Entity, IEntity, PrimaryKey, Property } from '../../lib';
()
export class Test {
({ type: 'ObjectID' })
_id: any;
({ type: 'string' })
name: any;
static create(name: string) {
const t = new Test();
t.name = name;
return t;
}
}
export interface Test extends IEntity<string> { }