class SiteSettingRepository {
  constructor(prisma) { this.prisma = prisma; }
  findAll() { return this.prisma.siteSetting.findMany(); }
  findByKey(key) { return this.prisma.siteSetting.findUnique({ where: { key } }); }
  upsert(key, data) {
    return this.prisma.siteSetting.upsert({
      where: { key },
      update: data,
      create: { key, ...data },
    });
  }
}

export default SiteSettingRepository;
