-- IMPORTS
WITH permissions AS (
    SELECT * FROM {{ source('src_exchange_mysql', 'permissions') }}
),


-- LOGIC
permissions_rename AS (

    SELECT
        permissions.id,
        permissions.name,
        permissions.guard_name,
        permissions.created_at,
        permissions.updated_at,
        current_timestamp()                                                                          AS _dbt_ran_at

    FROM permissions

),


-- FINAL
final__base_exchange__permissions AS (

    SELECT
        id,
        name,
        guard_name,
        created_at,
        updated_at,
        _dbt_ran_at

    FROM permissions_rename

) 

SELECT * FROM final__base_exchange__permissions