31553/backend/src/db/seeders/20231127130745-sample-data.js
2025-05-15 13:06:00 +00:00

183 lines
3.0 KiB
JavaScript

const db = require('../models');
const Users = db.users;
const TaxCalculations = db.tax_calculations;
const TaxCalculationsData = [
{
ordinary_income: 75000,
dividends_capital_gains_income: 5000,
social_security_income: 12000,
income_adjustments: 2000,
other_deductions: 1500,
taxable_social_security: 6000,
total_income: 94000,
adjusted_gross_income: 92000,
standard_deduction: 12550,
qbi_deduction: 2000,
total_deductions: 14550,
taxable_ordinary_income: 77450,
taxable_dividends_capital_gains: 5000,
total_taxable_income: 82450,
ordinary_income_tax: 12000,
dividends_capital_gains_tax: 750,
total_tax: 12750,
average_tax_rate: 15.47,
dividends_capital_gains_deduction: 0,
},
{
ordinary_income: 85000,
dividends_capital_gains_income: 7000,
social_security_income: 15000,
income_adjustments: 2500,
other_deductions: 2000,
taxable_social_security: 7500,
total_income: 107500,
adjusted_gross_income: 105000,
standard_deduction: 12550,
qbi_deduction: 2500,
total_deductions: 15050,
taxable_ordinary_income: 89950,
taxable_dividends_capital_gains: 7000,
total_taxable_income: 96950,
ordinary_income_tax: 14000,
dividends_capital_gains_tax: 1050,
total_tax: 15050,
average_tax_rate: 15.52,
dividends_capital_gains_deduction: 0,
},
{
ordinary_income: 95000,
dividends_capital_gains_income: 8000,
social_security_income: 18000,
income_adjustments: 3000,
other_deductions: 2500,
taxable_social_security: 9000,
total_income: 123000,
adjusted_gross_income: 120000,
standard_deduction: 12550,
qbi_deduction: 3000,
total_deductions: 15550,
taxable_ordinary_income: 104450,
taxable_dividends_capital_gains: 8000,
total_taxable_income: 112450,
ordinary_income_tax: 16000,
dividends_capital_gains_tax: 1200,
total_tax: 17200,
average_tax_rate: 15.29,
dividends_capital_gains_deduction: 0,
},
{
ordinary_income: 105000,
dividends_capital_gains_income: 9000,
social_security_income: 20000,
income_adjustments: 3500,
other_deductions: 3000,
taxable_social_security: 10000,
total_income: 137500,
adjusted_gross_income: 134000,
standard_deduction: 12550,
qbi_deduction: 3500,
total_deductions: 16050,
taxable_ordinary_income: 117950,
taxable_dividends_capital_gains: 9000,
total_taxable_income: 126950,
ordinary_income_tax: 18000,
dividends_capital_gains_tax: 1350,
total_tax: 19350,
average_tax_rate: 15.24,
dividends_capital_gains_deduction: 0,
},
];
// Similar logic for "relation_many"
module.exports = {
up: async (queryInterface, Sequelize) => {
await TaxCalculations.bulkCreate(TaxCalculationsData);
await Promise.all([
// Similar logic for "relation_many"
]);
},
down: async (queryInterface, Sequelize) => {
await queryInterface.bulkDelete('tax_calculations', null, {});
},
};