pure-orm
Version:
A SQL Toolkit based on pure business objects passed to and from stateful data access objects
49 lines (48 loc) • 1.21 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.personEntity = exports.Persons = exports.Person = exports.columns = exports.tableName = void 0;
exports.tableName = 'person';
exports.columns = [
'id',
'first_name',
'last_name',
'slug',
'email',
'picture',
'cover_photo',
'brand',
'tagline',
'display_name',
'biography',
'title'
];
class Person {
constructor(props) {
this.id = props.id;
this.firstName = props.firstName;
this.lastName = props.lastName;
this.slug = props.slug;
this.email = props.email;
this.picture = props.picture;
this.coverPhoto = props.coverPhoto;
this.brand = props.brand;
this.tagline = props.tagline;
this.displayName = props.displayName;
this.biography = props.biography;
this.title = props.title;
}
}
exports.Person = Person;
class Persons {
constructor({ models }) {
this.models = models;
return this;
}
}
exports.Persons = Persons;
exports.personEntity = {
tableName: exports.tableName,
columns: exports.columns,
Model: Person,
Collection: Persons
};