pure-orm
Version:
A SQL Toolkit based on pure business objects passed to and from stateful data access objects
46 lines (45 loc) • 1.58 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.recommendationEntity = exports.Recommendations = exports.Recommendation = exports.columns = exports.tableName = void 0;
const member_1 = require("./member");
const brand_1 = require("./brand");
const product_1 = require("./product");
const category_1 = require("./category");
const passion_1 = require("./passion");
exports.tableName = 'recommendation';
exports.columns = [
'id',
{ column: 'member_id', references: member_1.Member },
{ column: 'brand_id', references: brand_1.Brand },
{ column: 'product_id', references: product_1.Product },
{ column: 'category_id', references: category_1.Category },
{ column: 'passion_id', references: passion_1.Passion }
];
class Recommendation {
constructor(props) {
this.id = props.id;
this.memberId = props.memberId;
this.member = props.member;
this.brandId = props.brandId;
this.brand = props.brand;
this.productId = props.productId;
this.product = props.product;
this.categoryId = props.categoryId;
this.category = props.category;
this.passionId = props.passionId;
this.passion = props.passion;
}
}
exports.Recommendation = Recommendation;
class Recommendations {
constructor({ models }) {
this.models = models;
}
}
exports.Recommendations = Recommendations;
exports.recommendationEntity = {
tableName: exports.tableName,
columns: exports.columns,
Model: Recommendation,
Collection: Recommendations
};