Path: blob/master/src/packages/util/db-schema/bookmarks.ts
1447 views
/*1* This file is part of CoCalc: Copyright © 2024 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Table } from "./types";6import { ID } from "./crm";78// This table stores various types of bookmarks. This started with backing up starred tabs for a user in a project.9Table({10name: "bookmarks",11fields: {12id: ID,13type: {14type: "string",15desc: "Type of bookmark as defined in @cocalc/util/consts/bookmarks",16},17project_id: {18type: "uuid",19desc: "The Project ID where this bookmark belongs to",20},21account_id: {22type: "uuid",23desc: "(optional) if not set, this bookmark is project wide, for all collaborators",24},25path: {26type: "string",27desc: "(optional) path to a specific file in the project",28},29stars: {30type: "array",31pg_type: "TEXT[]",32desc: " a list of strings of paths or IDs",33},34last_edited: {35type: "timestamp",36desc: "When the bookmark last changed",37},38},39rules: {40desc: "Table for various types of bookmarks.",41primary_key: "id",42pg_indexes: ["type", "project_id", "account_id"],43user_query: {},44},45});464748