floriday/models/tradeItem/photo.js

30 lines
524 B
JavaScript
Raw Normal View History

import { Sequelize } from 'sequelize';
2022-12-05 12:53:30 +00:00
const photo = {
tradeItemId: {
2023-01-11 12:13:22 +00:00
type: Sequelize.STRING,
2023-02-08 11:31:54 +00:00
primaryKey: true,
},
url: {
type: Sequelize.STRING,
primaryKey: true,
},
type: {
type: Sequelize.STRING,
},
primary: {
type: Sequelize.BOOLEAN,
},
2022-12-05 12:53:30 +00:00
};
export default (sequelize) => {
return sequelize.define(
'tradeItemPhoto',
photo,
{
timestamps: false,
freezeTableName: true,
}
);
};