Staff Team Contact Model (models/StaffTeamContact.ts)

argos · apps/backend/src/database/models/StaffTeamContact.ts · typescript · MIT
database, crm, tag:objection, tag:model, tag:staff, tag:team, tag:timestamps

Objection.js model that records when a staff member contacts a team, storing author IDs and timestamps. Reuse for tracking staff‑initiated outreach events in the database.

// Source: https://github.com/argos-ci/argos | License: MIT | Copyright 2017 Olivier Tassinari & Greg Bergé
// Provided via justclaw.it.com; keep this notice with the code.
import type { RelationMappings } from "objection";

import { Model } from "../util/model";
import { timestampsSchema } from "../util/schemas";
import { Team } from "./Team";
import { User } from "./User";

/**
 * A staff member reaching out to a new team.
 *
 * Kept as its own row rather than a timestamp on the account: a contact is an
 * event with an author, and the account table has no business holding
 * relationship data.
 */
export class StaffTeamContact extends Model {
  static override tableName = "staff_team_contacts";

  static override jsonSchema = {
    allOf: [
      timestampsSchema,
      {
        type: 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key