started payouts

This commit is contained in:
jackiettran
2025-08-29 00:32:06 -04:00
parent 0f04182768
commit b52104c3fa
13 changed files with 578 additions and 252 deletions

View File

@@ -49,6 +49,22 @@ const Rental = sequelize.define('Rental', {
type: DataTypes.DECIMAL(10, 2),
allowNull: false
},
baseRentalAmount: {
type: DataTypes.DECIMAL(10, 2),
allowNull: false
},
platformFee: {
type: DataTypes.DECIMAL(10, 2),
allowNull: false
},
processingFee: {
type: DataTypes.DECIMAL(10, 2),
allowNull: false
},
payoutAmount: {
type: DataTypes.DECIMAL(10, 2),
allowNull: false
},
status: {
type: DataTypes.ENUM('pending', 'confirmed', 'active', 'completed', 'cancelled'),
defaultValue: 'pending'
@@ -57,6 +73,16 @@ const Rental = sequelize.define('Rental', {
type: DataTypes.ENUM('pending', 'paid', 'refunded'),
defaultValue: 'pending'
},
payoutStatus: {
type: DataTypes.ENUM('pending', 'processing', 'completed', 'failed'),
defaultValue: 'pending'
},
payoutProcessedAt: {
type: DataTypes.DATE
},
stripeTransferId: {
type: DataTypes.STRING
},
deliveryMethod: {
type: DataTypes.ENUM('pickup', 'delivery'),
defaultValue: 'pickup'