-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Log all mutations to scheduled shifts, including detailed changes
- Loading branch information
Showing
9 changed files
with
308 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// @ts-nocheck | ||
/* eslint-disable quotes, max-len */ | ||
/** | ||
* DO NOT EDIT: | ||
* | ||
* This file has been auto-generated from database schema using ts-sql-codegen. | ||
* Any changes will be overwritten. | ||
*/ | ||
import { Table } from "ts-sql-query/Table"; | ||
import type { DBConnection } from "../Connection"; | ||
import { | ||
TemporalTypeAdapter, | ||
} from "../TemporalTypeAdapter"; | ||
import { | ||
Mutation, | ||
} from "../Types"; | ||
import { | ||
ZonedDateTime, | ||
} from "../../Temporal"; | ||
|
||
export class ScheduleLogsTable extends Table<DBConnection, 'ScheduleLogsTable'> { | ||
mutationId = this.autogeneratedPrimaryKey('mutation_id', 'int'); | ||
eventId = this.column('event_id', 'int'); | ||
scheduleId = this.column('schedule_id', 'int'); | ||
mutation = this.column<Mutation>('mutation', 'enum', 'Mutation'); | ||
mutationBeforeShiftId = this.optionalColumnWithDefaultValue('mutation_before_shift_id', 'int'); | ||
mutationBeforeTimeStart = this.optionalColumnWithDefaultValue<ZonedDateTime>('mutation_before_time_start', 'customLocalDateTime', 'dateTime', TemporalTypeAdapter); | ||
mutationBeforeTimeEnd = this.optionalColumnWithDefaultValue<ZonedDateTime>('mutation_before_time_end', 'customLocalDateTime', 'dateTime', TemporalTypeAdapter); | ||
mutationBeforeUserId = this.optionalColumnWithDefaultValue('mutation_before_user_id', 'int'); | ||
mutationAfterShiftId = this.optionalColumnWithDefaultValue('mutation_after_shift_id', 'int'); | ||
mutationAfterTimeStart = this.optionalColumnWithDefaultValue<ZonedDateTime>('mutation_after_time_start', 'customLocalDateTime', 'dateTime', TemporalTypeAdapter); | ||
mutationAfterTimeEnd = this.optionalColumnWithDefaultValue<ZonedDateTime>('mutation_after_time_end', 'customLocalDateTime', 'dateTime', TemporalTypeAdapter); | ||
mutationAfterUserId = this.optionalColumnWithDefaultValue('mutation_after_user_id', 'int'); | ||
mutationUserId = this.column('mutation_user_id', 'int'); | ||
mutationDate = this.columnWithDefaultValue<ZonedDateTime>('mutation_date', 'customLocalDateTime', 'dateTime', TemporalTypeAdapter); | ||
|
||
constructor() { | ||
super('schedule_logs'); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.