Options
All
  • Public
  • Public/Protected
  • All
Menu

Module orm_functions/contract

Index

Functions

  • contractsByProject(projectId: number): Promise<{ contract_id: number; contract_status: contract_status_enum; login_user: null | { is_admin: boolean; is_coach: boolean; login_user_id: number; person: person }; project_role: null | { positions: number; project_id: number; project_role_id: number; role: { name: string }; role_id: number }; student: null | { alumni: boolean; gender: string; nickname: null | string; person: person; phone_number: string; pronouns: null | string; student_id: number } }[]>
  • Parameters

    • projectId: number

    Returns Promise<{ contract_id: number; contract_status: contract_status_enum; login_user: null | { is_admin: boolean; is_coach: boolean; login_user_id: number; person: person }; project_role: null | { positions: number; project_id: number; project_role_id: number; role: { name: string }; role_id: number }; student: null | { alumni: boolean; gender: string; nickname: null | string; person: person; phone_number: string; pronouns: null | string; student_id: number } }[]>

  • contractsForStudent(studentId: number): Promise<{ contract_id: number; project_role: null | { project: { osoc_id: number }; project_id: number }; student: null | student }[]>
  • find all contracts for the given student

    Parameters

    • studentId: number

    Returns Promise<{ contract_id: number; project_role: null | { project: { osoc_id: number }; project_id: number }; student: null | student }[]>

    the contract(s)

  • add contract created by login_user_id for student_id that has the role project_role_id

    Parameters

    Returns Promise<contract>

    created contract object in the database

  • removeContract(contractId: number): Promise<contract>
  • remove the contract with contractId

    Parameters

    • contractId: number

    Returns Promise<contract>

    the removed contract

  • removeContractsFromStudent(studentId: number): Promise<BatchPayload>
  • remove all the contracts associated with studentId

    Parameters

    • studentId: number

    Returns Promise<BatchPayload>

    the number of removed contracts {count: number}

  • sortedContractsByOsocEdition(osocId: number): Promise<{ project_role: null | { project: project }; student_id: null | number }[]>
  • Parameters

    • osocId: number

    Returns Promise<{ project_role: null | { project: project }; student_id: null | number }[]>

Generated using TypeDoc