30 lines
524 B
JavaScript
30 lines
524 B
JavaScript
import { Sequelize } from 'sequelize';
|
|
|
|
const photo = {
|
|
tradeItemId: {
|
|
type: Sequelize.STRING,
|
|
primaryKey: true,
|
|
},
|
|
url: {
|
|
type: Sequelize.STRING,
|
|
primaryKey: true,
|
|
},
|
|
type: {
|
|
type: Sequelize.STRING,
|
|
},
|
|
primary: {
|
|
type: Sequelize.BOOLEAN,
|
|
},
|
|
};
|
|
|
|
export default (sequelize) => {
|
|
return sequelize.define(
|
|
'tradeItemPhoto',
|
|
photo,
|
|
{
|
|
timestamps: false,
|
|
freezeTableName: true,
|
|
}
|
|
);
|
|
};
|