feat: 添加 GitHub 相关的 API 操作,包括获取、创建、更新和删除 starred 项目

This commit is contained in:
2026-02-13 19:15:23 +08:00
parent 8ea5c56ba5
commit 9464a5c85f
3 changed files with 77 additions and 7 deletions

View File

@@ -4,16 +4,17 @@ import { v } from "convex/values";
export default defineSchema({
// Other tables here...
github_starred: defineTable({
author: v.string(),
auto: v.string(),
repo_id: v.number(),
title: v.string(),
description: v.string(),
author: v.string(),
stars: v.number(),
last_updated: v.string(),
link: v.string(),
repo_id: v.float64(),
stars: v.float64(),
summary: v.string(),
title: v.string(),
}),
auto: v.optional(v.string()),
summary: v.optional(v.string()),
}).index("by_repo_id", ["repo_id"])
.index("by_title", ["title"]),
users: defineTable({
userId: v.string(), // 外部系统的用户 ID
name: v.string(),