mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
758d4edbb9
* Upgrade @typescript-eslint dependencies from v6.21.0 to v8.33.0 - Updated @typescript-eslint/eslint-plugin from ^6.21.0 to ^8.33.0 - Updated @typescript-eslint/parser from ^6.21.0 to ^8.33.0 - Tested linting functionality to ensure compatibility - This brings the latest TypeScript ESLint features and bug fixes * lint * tsc --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com>
25 lines
616 B
TypeScript
25 lines
616 B
TypeScript
import { AllowNull, Column, IsDate } from "sequelize-typescript";
|
|
import ParanoidModel from "./ParanoidModel";
|
|
|
|
class ArchivableModel<
|
|
TModelAttributes extends object = any,
|
|
TCreationAttributes extends object = TModelAttributes
|
|
> extends ParanoidModel<TModelAttributes, TCreationAttributes> {
|
|
/** Whether the document is archived, and if so when. */
|
|
@AllowNull
|
|
@IsDate
|
|
@Column
|
|
archivedAt: Date | null;
|
|
|
|
/**
|
|
* Whether the model has been archived.
|
|
*
|
|
* @returns True if the model has been archived
|
|
*/
|
|
get isArchived() {
|
|
return !!this.archivedAt;
|
|
}
|
|
}
|
|
|
|
export default ArchivableModel;
|