Numex yayın: models/lokasyon.js

This commit is contained in:
numex-admin 2026-09-10 08:59:17 +00:00
parent 93a5b3742e
commit 4666abf772

19
models/lokasyon.js Normal file
View File

@ -0,0 +1,19 @@
// Lokasyon (depo / şube) modeli
const store = require('./store');
// Geçerli lokasyon mu kontrol et
function dogrula(veri) {
const hatalar = [];
if (!veri.ad || veri.ad.trim() === '') hatalar.push('Lokasyon adı zorunludur');
return hatalar;
}
function tumu() {
return store.oku('lokasyonlar');
}
function bul(id) {
return store.bulKoleksiyonda('lokasyonlar', Number(id));
}
module.exports = { dogrula, tumu, bul };