offerdetailsset
This commit is contained in:
parent
01c9fca093
commit
d3e419c98b
3 changed files with 75 additions and 1 deletions
|
|
@ -212,6 +212,70 @@ module.exports = {
|
||||||
},
|
},
|
||||||
{ transaction: t }
|
{ transaction: t }
|
||||||
),
|
),
|
||||||
|
queryInterface.createTable(
|
||||||
|
'offer_details_set',
|
||||||
|
{
|
||||||
|
uuid: {
|
||||||
|
type: Sequelize.UUID,
|
||||||
|
allowNull: false,
|
||||||
|
unique: true,
|
||||||
|
primaryKey: true,
|
||||||
|
},
|
||||||
|
offer_uuid: {
|
||||||
|
type: Sequelize.UUID,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
wants: {
|
||||||
|
type: Sequelize.STRING,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
premium: {
|
||||||
|
type: Sequelize.DECIMAL(5, 2),
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
trade_amount_eur: {
|
||||||
|
type: Sequelize.INTEGER,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
location_details: {
|
||||||
|
type: Sequelize.TEXT,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
time_availability_details: {
|
||||||
|
type: Sequelize.TEXT,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
show_offer_to_trusted: {
|
||||||
|
type: Sequelize.BOOLEAN,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
show_offer_to_trusted_trusted: {
|
||||||
|
type: Sequelize.BOOLEAN,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
show_offer_to_all_members: {
|
||||||
|
type: Sequelize.BOOLEAN,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
is_onchain_accepted: {
|
||||||
|
type: Sequelize.BOOLEAN,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
is_lightning_accepted: {
|
||||||
|
type: Sequelize.BOOLEAN,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
are_big_notes_accepted: {
|
||||||
|
type: Sequelize.BOOLEAN,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
created_at: {
|
||||||
|
type: Sequelize.DATE,
|
||||||
|
allowNull: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ transaction: t }
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,16 @@ module.exports = {
|
||||||
onDelete: 'cascade',
|
onDelete: 'cascade',
|
||||||
onUpdate: 'cascade',
|
onUpdate: 'cascade',
|
||||||
}),
|
}),
|
||||||
|
queryInterface.addConstraint('offer_details_set', {
|
||||||
|
fields: ['offer_uuid'],
|
||||||
|
type: 'foreign key',
|
||||||
|
references: {
|
||||||
|
table: 'offer_created',
|
||||||
|
field: 'uuid',
|
||||||
|
},
|
||||||
|
onDelete: 'cascade',
|
||||||
|
onUpdate: 'cascade',
|
||||||
|
}),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ class OfferDetailsSetProvider {
|
||||||
primaryKey: true,
|
primaryKey: true,
|
||||||
},
|
},
|
||||||
offer_uuid: {
|
offer_uuid: {
|
||||||
type: this.DataTypes.STRING,
|
type: this.DataTypes.UUID,
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
wants: {
|
wants: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue