This commit is contained in:
oneao committed 2026-03-03 17:28:56 +08:00
1 parent 2efeb7cee2
commit c0531c1d0a
35 files changed
+1817 -984

No files matched your search

@@ -211,6 +211,20 @@ func (q *Queries) ListSpacesByUserId(ctx context.Context, userID int64) ([]ListS
return items, nil
}
const updateSpaceInviteCode = `-- name: UpdateSpaceInviteCode :exec
UPDATE space set invite_code = $1,update_time = NOW() WHERE id = $2
`
type UpdateSpaceInviteCodeParams struct {
InviteCode string
ID int64
}
func (q *Queries) UpdateSpaceInviteCode(ctx context.Context, arg UpdateSpaceInviteCodeParams) error {
_, err := q.db.Exec(ctx, updateSpaceInviteCode, arg.InviteCode, arg.ID)
return err
}
const updateSpaceName = `-- name: UpdateSpaceName :exec
UPDATE space SET name = $1
WHERE id = $2
@@ -225,3 +239,17 @@ func (q *Queries) UpdateSpaceName(ctx context.Context, arg UpdateSpaceNameParams
_, err := q.db.Exec(ctx, updateSpaceName, arg.Name, arg.ID)
return err
}
const updateSpaceOwnerId = `-- name: UpdateSpaceOwnerId :exec
UPDATE space set owner_id = $1,update_time = NOW() WHERE id = $2
`
type UpdateSpaceOwnerIdParams struct {
OwnerID int64
ID int64
}
func (q *Queries) UpdateSpaceOwnerId(ctx context.Context, arg UpdateSpaceOwnerIdParams) error {
_, err := q.db.Exec(ctx, updateSpaceOwnerId, arg.OwnerID, arg.ID)
return err
}