Arifzyn's picture
Buatkan project web fullstack bernama "ServiceBook" menggunakan **SvelteKit** dengan UI memakai **Tailwind CSS**, ikon **Lucide** dan palet warna berupa **soft color blocks + white** (bersih, minimal, modern). Aplikasi ini untuk pencatatan keuangan usaha servis HP.
8f096b5 verified
raw
history blame contribute delete
488 Bytes
import Dexie from 'dexie';
export const db = new Dexie('ServiceBookDB');
db.version(1).stores({
transactions: '++id, userId, date, type, category, amount',
syncQueue: '++id, action, payload, timestamp',
settings: 'key'
});
db.version(2).upgrade(trans => {
return trans.table('transactions').toCollection().modify(transaction => {
transaction.synced = false;
transaction.updatedAt = new Date().toISOString();
});
});
// Export the database instance
export default db;