UNPKG

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.

39 lines (33 loc) 681 B
const { Collection } = require('../../lib'); const { BaseEntity4 } = require('./index').BaseEntity4; /** * @property {number} id * @property {string} name * @property {Collection<Book3>} books */ class BookTag3 extends BaseEntity4 { /** * @param {string} name */ constructor(name) { super(); this.name = name; } } const schema = { name: 'BookTag3', extends: 'BaseEntity4', properties: { name: 'string', books: { reference: 'm:n', owner: false, mappedBy: 'tags', type: 'Book3', }, }, path: __filename, }; module.exports.BookTag3 = BookTag3; module.exports.entity = BookTag3; module.exports.schema = schema;