terms_data = [
  {
    name: "Asset",
    title: "What is an Asset?",
    content: <<~MARKDOWN,
      An asset is any resource owned by an individual, company, or government with the expectation that it will provide a future benefit. Assets can be tangible (like cash, real estate, or equipment) or intangible (like patents, trademarks, or goodwill).

      ### Key Characteristics of Assets:
      - **Ownership:** The entity has a right or claim to the asset.
      - **Future Economic Benefit:** The asset is expected to generate income, reduce expenses, or provide other economic advantages.
      - **Result of Past Transactions:** The asset was acquired through a past event or transaction.

      ### Types of Assets:
      - **Current Assets:** Expected to be converted to cash or used up within one year (e.g., cash, accounts receivable, inventory).
      - **Non-Current Assets (Fixed Assets):** Long-term assets not expected to be converted to cash within one year (e.g., property, plant, equipment, long-term investments, intangible assets).

      In personal finance, common assets include:
      - Cash and cash equivalents (savings accounts, checking accounts)
      - Investments (stocks, bonds, mutual funds, ETFs)
      - Real estate (primary residence, rental properties)
      - Personal property (vehicles, valuables)
      - Retirement accounts (401(k)s, IRAs)

      Understanding and strategically growing your assets is a fundamental component of building wealth and achieving financial security.
    MARKDOWN
    meta_image_url: "https://images.unsplash.com/photo-1553729459-efe14ef6055d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" # Generic finance image
  },
  {
    name: "Liability",
    title: "Understanding Liabilities in Finance",
    content: <<~MARKDOWN,
      A liability is a financial obligation or debt owed by an individual, company, or government to another party (a creditor). Liabilities represent future sacrifices of economic benefits that the entity is obliged to make as a result of past transactions or events.

      ### Key Characteristics of Liabilities:
      - **Present Obligation:** There is a duty or responsibility to another party.
      - **Arises from Past Events:** The obligation is the result of a transaction or event that has already occurred.
      - **Future Outflow of Resources:** Settling the liability will require an outflow of resources embodying economic benefits (e.g., cash, goods, services).

      ### Types of Liabilities:
      - **Current Liabilities:** Obligations expected to be settled within one year or the normal operating cycle, whichever is longer (e.g., accounts payable, short-term loans, accrued expenses, credit card debt).
      - **Non-Current Liabilities (Long-Term Liabilities):** Obligations not expected to be settled within one year (e.g., long-term loans, bonds payable, mortgages, deferred tax liabilities).

      Common personal liabilities include:
      - Mortgages
      - Car loans
      - Student loans
      - Credit card debt
      - Personal loans

      Managing liabilities effectively by minimizing debt and understanding repayment terms is crucial for maintaining financial health and stability.
    MARKDOWN
    meta_image_url: "https://images.unsplash.com/photo-1590283603385-17ffb3a7f29f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" # Generic finance image
  },
  {
    name: "Net Worth",
    title: "Calculating Your Net Worth: A Key Financial Metric",
    content: <<~MARKDOWN,
      Net worth is a critical measure of an individual's or company's financial health. It represents the value of what you own (assets) minus what you owe (liabilities).

      **Formula:**
      `Net Worth = Total Assets - Total Liabilities`

      ### Why is Net Worth Important?
      - **Financial Snapshot:** It provides a clear picture of your current financial position.
      - **Progress Tracking:** Calculating your net worth periodically (e.g., annually or quarterly) helps you track your financial progress over time.
      - **Goal Setting:** It can be a benchmark for financial goals, such as retirement planning or wealth accumulation.
      - **Loan Applications:** Lenders often consider net worth when evaluating loan applications.

      ### How to Calculate Your Net Worth:
      1.  **List Your Assets:** Include cash, savings, investments (stocks, bonds, retirement accounts), real estate (market value), valuable personal property (cars, jewelry).
      2.  **List Your Liabilities:** Include mortgages, car loans, student loans, credit card balances, personal loans, and any other debts.
      3.  **Subtract Total Liabilities from Total Assets:** The result is your net worth.

      A positive and growing net worth is generally a good indicator of financial progress and stability. If your net worth is negative, it means you owe more than you own, highlighting a need to focus on debt reduction and asset building.
    MARKDOWN
    meta_image_url: "https://images.unsplash.com/photo-1639389016137-659583197ad2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" # Generic finance image
  },
  {
    name: "Diversification",
    title: "The Importance of Diversification in Investing",
    content: <<~MARKDOWN,
      Diversification is an investment strategy that involves spreading your investments across various asset classes, industries, and geographic regions. The core principle is "don't put all your eggs in one basket."

      ### Why Diversify?
      - **Risk Reduction:** The primary goal of diversification is to reduce overall portfolio risk. Different asset classes often react differently to market conditions. If one investment performs poorly, other investments may perform well, potentially offsetting losses.
      - **Smoother Returns:** A diversified portfolio tends to experience less volatility compared to a concentrated one.
      - **Exposure to More Opportunities:** Diversification allows investors to participate in the growth potential of various sectors and markets.

      ### How to Diversify:
      - **Asset Classes:** Allocate investments among stocks, bonds, real estate, commodities, and cash equivalents.
      - **Industries/Sectors:** Invest in companies across different sectors (e.g., technology, healthcare, financials, consumer goods).
      - **Geographic Regions:** Include investments in both domestic and international markets.
      - **Company Size:** Consider investing in large-cap, mid-cap, and small-cap companies.
      - **Investment Vehicles:** Utilize mutual funds and Exchange-Traded Funds (ETFs), which often provide instant diversification.

      While diversification does not guarantee profits or protect against all losses, it is a fundamental and widely accepted principle for managing risk and building a resilient long-term investment portfolio.
    MARKDOWN
    meta_image_url: "https://images.unsplash.com/photo-1542744095-291d1f67b221?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" # Generic finance/strategy image
  },
  {
    name: "Inflation",
    title: "What is Inflation and How Does It Affect You?",
    content: <<~MARKDOWN,
      Inflation is the rate at which the general level of prices for goods and services is rising, and consequently, the purchasing power of currency is falling. In simpler terms, your money buys less over time due to inflation.

      ### How is Inflation Measured?
      Inflation is typically measured using price indexes, such as:
      - **Consumer Price Index (CPI):** Tracks the average change in prices paid by urban consumers for a basket of consumer goods and services.
      - **Producer Price Index (PPI):** Measures the average change in selling prices received by domestic producers for their output.

      ### Causes of Inflation:
      - **Demand-Pull Inflation:** Occurs when there is too much money chasing too few goods, leading to increased demand and higher prices.
      - **Cost-Push Inflation:** Arises from increases in the costs of production (e.g., wages, raw materials), which businesses pass on to consumers as higher prices.
      - **Built-in Inflation (Wage-Price Spiral):** Workers demand higher wages to keep up with rising prices, and businesses raise prices to cover higher wage costs, creating a cycle.

      ### Effects of Inflation:
      - **Reduced Purchasing Power:** The most direct impact is that each unit of currency buys fewer goods and services.
      - **Impact on Savings:** If the interest earned on savings does not outpace inflation, the real value of those savings decreases.
      - **Impact on Investments:** Some investments (like stocks or real estate) may act as a hedge against inflation, while others (like bonds with fixed interest rates) can be negatively affected.
      - **Uncertainty:** High or unpredictable inflation can create economic uncertainty, making it difficult for businesses and individuals to plan.

      Central banks often aim to manage inflation through monetary policy (e.g., adjusting interest rates) to maintain price stability and support sustainable economic growth. Understanding inflation is crucial for making informed financial decisions, especially regarding saving, investing, and budgeting.
    MARKDOWN
    meta_image_url: "https://images.unsplash.com/photo-1611771341253-bad2899df700?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" # Generic economy/money image
  }
]

terms_data.each do |attrs|
  Term.find_or_create_by!(slug: attrs[:title].parameterize) do |term|
    term.name = attrs[:name]
    term.title = attrs[:title]
    term.content = attrs[:content]
    term.meta_image_url = attrs[:meta_image_url]
    # Video fields can be populated if data is available
    # term.video_id = attrs[:video_id]
    # term.video_title = attrs[:video_title]
    # term.video_description = attrs[:video_description]
    # term.video_thumbnail_url = attrs[:video_thumbnail_url]
    # term.video_upload_date = attrs[:video_upload_date]
    # term.video_duration = attrs[:video_duration]
  end
end

puts "Seeded #{Term.count} financial terms."
