drop view if exists inventory_rfid_views;

--gopg:split
CREATE VIEW inventory_rfid_views AS
SELECT
    rl.id as rfid_label_id,
    ib.id AS inventory_barang_id,
    rl.rfid,
    ib.toko_id AS toko_id,
    ib.kode_barang AS kode_barang,
    ib.status_label AS status_label,
    ib.status_ketersediaan AS status_ketersediaan
FROM
    inventory_barangs AS ib
    LEFT JOIN rfid_labels AS rl ON ib.id = rl.inventory_barang_id