mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 08:31:43 +03:00
b8f59f07f2
no issue
25 lines
585 B
JavaScript
25 lines
585 B
JavaScript
const {faker} = require('@faker-js/faker');
|
|
const TableImporter = require('./base');
|
|
|
|
class MembersNewslettersImporter extends TableImporter {
|
|
static table = 'members_newsletters';
|
|
|
|
constructor(knex) {
|
|
super(MembersNewslettersImporter.table, knex);
|
|
}
|
|
|
|
setImportOptions({model}) {
|
|
this.model = model;
|
|
}
|
|
|
|
generate() {
|
|
return {
|
|
id: faker.database.mongodbObjectId(),
|
|
member_id: this.model.member_id,
|
|
newsletter_id: this.model.newsletter_id
|
|
};
|
|
}
|
|
}
|
|
|
|
module.exports = MembersNewslettersImporter;
|