Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | 1x 1x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 1x 1x | import { Member } from './member';
import { Brand } from './brand';
import { Product } from './product';
import { Category } from './category';
import { Passion } from './passion';
import { IModel, ICollection, IColumns } from '../../../src/index';
export const tableName: string = 'recommendation';
export const columns: IColumns = [
'id',
{ column: 'member_id', references: Member },
{ column: 'brand_id', references: Brand },
{ column: 'product_id', references: Product },
{ column: 'category_id', references: Category },
{ column: 'passion_id', references: Passion }
];
export class Recommendation implements IModel {
id: number;
memberId: number;
member?: Member;
brandId: number;
brand?: Brand;
productId: number;
product?: Product;
categoryId: number;
category?: Category;
passionId: number;
passion?: Passion;
constructor(props: any) {
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;
}
}
export class Recommendations implements ICollection<Recommendation> {
models: Array<Recommendation>;
constructor({ models }: any) {
this.models = models;
}
}
export const recommendationEntity = {
tableName,
columns,
Model: Recommendation,
Collection: Recommendations
};
|