feat: 完成....

This commit is contained in:
2026-01-07 23:22:15 +08:00
parent ad070b51f2
commit f01762dab2
45 changed files with 4501 additions and 26 deletions

View File

@@ -0,0 +1,25 @@
"use server"
import { db } from "@/app/server/db"
import { redPackets } from "@/app/server/schema/red-packet"
import { eq } from "drizzle-orm"
export async function getRedPacketByPublicId(id: string) {
const rows = await db
.select()
.from(redPackets)
.where(eq(redPackets.publicId, id))
.limit(1)
return rows[0] ?? null
}
export async function getRedPacketByAdminId(id: string) {
const rows = await db
.select()
.from(redPackets)
.where(eq(redPackets.adminId, id))
.limit(1)
return rows[0] ?? null
}