Files
competition-website/database/seeders/003-seed-carousel.js
WorkBuddy a303cf2d53 chore: 后端首次基线提交
运行必须源码:app/(controller/model/service/middleware/lib/utils/validate/router)、config/、database/(migrations/seeders/sql)、启动脚本、app/public/templates 模板。
已忽略运行非必须:node_modules/、logs/、run/、app/public 运行时上传数据、.env*、构建/缓存产物。
2026-08-17 12:25:42 +08:00

37 lines
1010 B
JavaScript

'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.bulkInsert('carousel', [
{
image_url: 'https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?w=1200&h=480&fit=crop',
sort_order: 1,
link_url: '',
enabled: 1,
created_at: new Date(),
updated_at: new Date(),
},
{
image_url: 'https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1200&h=480&fit=crop',
sort_order: 2,
link_url: '',
enabled: 1,
created_at: new Date(),
updated_at: new Date(),
},
{
image_url: 'https://images.unsplash.com/photo-1614728263952-84ea256f9679?w=1200&h=480&fit=crop',
sort_order: 3,
link_url: '',
enabled: 1,
created_at: new Date(),
updated_at: new Date(),
},
]);
},
down: async (queryInterface, Sequelize) => {
await queryInterface.bulkDelete('carousel', null, {});
},
};