import { assets } from "@rudderhq/db";
import { eq } from "drizzle-orm";
export function assetService(db) {
    return {
        create: (orgId, data) => db
            .insert(assets)
            .values({ ...data, orgId })
            .returning()
            .then((rows) => rows[0]),
        getById: (id) => db
            .select()
            .from(assets)
            .where(eq(assets.id, id))
            .then((rows) => rows[0] ?? null),
    };
}
//# sourceMappingURL=assets.js.map