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.
21 lines (13 loc) • 364 B
text/typescript
import { IEntity, PrimaryKey, Property } from '../../lib';
import { ObjectID } from 'bson';
export abstract class BaseEntity {
()
_id: ObjectID;
()
createdAt = new Date();
({ onUpdate: () => new Date() })
updatedAt = new Date();
()
foo: string;
}
export interface BaseEntity extends IEntity<string> { }