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;
