Path: blob/master/src/packages/util/db-schema/email-counter.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: "email_counter",9fields: {10id: {11type: "uuid",12desc: "The project, account or owner id. Who 'caused' these emails to get sent.",13},14count: {15type: "integer",16desc: "How many messages have been sent with given time.",17},18time: {19type: "timestamp",20desc: "Start of the time interval when these emails were sent (e.g., start of the day if we are counting up for a single day).",21},22expire: {23type: "timestamp",24},25},26rules: {27// using a compound primary key consisting of who and day we start.28primary_key: ["id", "time"],29},30});313233