Path: blob/master/src/packages/util/db-schema/file-access-log.ts
1447 views
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Table } from "./types";67Table({8name: "file_access_log",9rules: {10primary_key: "id",11durability: "soft", // loss of some log data not serious, since used only for analytics12pg_indexes: ["project_id", "account_id", "filename", "time"],13user_query: {14get: {15admin: true,16fields: {17id: null,18project_id: null,19account_id: null,20filename: null,21time: null,22},23},24},25},26fields: {27id: {28type: "uuid",29},30project_id: {31type: "uuid",32render: { type: "project_link" },33},34account_id: {35type: "uuid",36render: { type: "account" },37},38filename: {39type: "string",40},41time: {42type: "timestamp",43},44expire: {45type: "timestamp",46desc: "Either expire after the given PII retention period, or after 1 year, whichever is sooner.",47},48},49});505152