Some extensions and fixes
This commit is contained in:
34
backend/models/falukant/data/marriage_proposal.js
Normal file
34
backend/models/falukant/data/marriage_proposal.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Model, DataTypes } from 'sequelize';
|
||||
import { sequelize } from '../../../utils/sequelize.js';
|
||||
|
||||
class MarriageProposal extends Model {}
|
||||
|
||||
MarriageProposal.init(
|
||||
{
|
||||
requesterCharacterId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
onDelete: 'CASCADE',
|
||||
},
|
||||
proposedCharacterId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
onDelete: 'CASCADE',
|
||||
},
|
||||
cost: {
|
||||
type: DataTypes.FLOAT,
|
||||
allowNull: false,
|
||||
defaultValue: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
modelName: 'MarriageProposal',
|
||||
tableName: 'marriage_proposals',
|
||||
schema: 'falukant_data',
|
||||
timestamps: true,
|
||||
underscored: true,
|
||||
}
|
||||
);
|
||||
|
||||
export default MarriageProposal;
|
||||
Reference in New Issue
Block a user