version: 2
models:
  - name: silver__nft_sales_hadeswap
    tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - TX_ID
            - MINT
      - compare_model_subset:
          name: silver__nft_sales_hadeswap_business_logic_test
          compare_model: ref('testing__nft_sales_hadeswap')
          compare_columns: 
            - tx_id
            - purchaser
            - seller
            - mint
            - sales_amount
          model_condition: "where tx_id in ('5RtXVH7vZMEyKrf3M1mm31AUBaBkK6dH2frpbHyhbt7oBMevWKLT8LeS3NBEwSNzKik4hDbF1x9gY3qkgbEnR3EY',
          '5GaJip8wTmyRT1cSbNRs6cF61YG9fAxko6Cqrt6ox5b7XDYKM6RH7Dxivz9T5EGoQ21SGwSWsSfG7hpucRaJPNBt',
          '2CHMyQYu4gNCESvqVS3SxNHL9VArq9UNWbFjYjhQ3bdF2RM1gFzyFAtdu1QVWJtXSAWyDUDzVA1LvYbvLC1ciD3J',
          '127fAuDiNxX9YX6ZbYXTza9ASXunGtDVBoU6vQRcsEcgLAsd5JnUErFYr6sU7yfgf8fWAgFDe9WheuWqq6Q554vY',
          '124y71JFhG1CSCitqMqBRb6GkvQZd25YfazmFdDVJ6Bt7m1wYDRf27ZJDNPwRVHuPShCanfDy4g6EmqeQBbxo81n',
          '126zdfjWUNmtqMfUM4YtLnJhoaRHBaD5eEACUscsezkWDx2khXRZLALsxG8MWLTGVmd3EcjCgVhY8Kci5vPKQAY9',
          '5o1JD7tDY5m1o3FUrvArZHNRJevNXCHXG7PsJPovKV3NjnBe2PrWYf4RqtFrXDp83hcjqHEZJH4sdThB61f8np8Y')"
    columns:
      - name: BLOCK_TIMESTAMP
        description: "{{ doc('block_timestamp') }}"
        tests:
          - not_null
      - name: BLOCK_ID
        description: "{{ doc('block_id') }}"
        tests:
          - not_null
      - name: TX_ID
        description: "{{ doc('tx_id') }}"
        tests:
          - not_null
      - name: SUCCEEDED
        description: "{{ doc('tx_succeeded') }}"
        tests:
          - not_null
      - name: PROGRAM_ID 
        description: "{{ doc('program_id') }}"
        tests: 
          - not_null
      - name: PURCHASER
        description: "{{ doc('purchaser') }}"
        tests: 
          - not_null
      - name: SELLER
        description: "{{ doc('seller') }}"
        tests: 
          - not_null
      - name: MINT
        description: "{{ doc('mint') }}"
        tests: 
          - not_null:
              where: succeeded = TRUE
      - name: SALES_AMOUNT
        description: "{{ doc('sales_amount') }}"
        tests: 
          - not_null: 
              where: succeeded = TRUE
      - name: _INSERTED_TIMESTAMP
        description: "{{ doc('_inserted_timestamp') }}"
        tests: 
          - not_null