Skip to content

Commit

Permalink
Log event to event_log when there are changes to supervisors list
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksTeresh committed Sep 27, 2024
1 parent 3c2df3a commit 4e89064
Show file tree
Hide file tree
Showing 5 changed files with 429 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/server/db/models/Supervision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import {
InferCreationAttributes,
DataTypes,
UUIDV4,
NonAttribute,
} from 'sequelize'

import { sequelize } from '../connection'
import User from './User'

class Supervision extends Model<
InferAttributes<Supervision>,
Expand All @@ -21,6 +23,8 @@ class Supervision extends Model<
declare percentage: number

declare isPrimarySupervisor: boolean

declare user: NonAttribute<User>
}

Supervision.init(
Expand Down
3 changes: 3 additions & 0 deletions src/server/db/models/Thesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { ThesisStatus } from '@backend/types'

import { sequelize } from '../connection'
import Grader from './Grader'
import Supervision from './Supervision'

class Thesis extends Model<
InferAttributes<Thesis>,
Expand All @@ -30,6 +31,8 @@ class Thesis extends Model<
declare targetDate: string | undefined

declare graders: NonAttribute<Grader[]>

declare supervisions: NonAttribute<Supervision[]>
}

Thesis.init(
Expand Down
Loading

0 comments on commit 4e89064

Please sign in to comment.