mirror of
https://github.com/outline/outline.git
synced 2025-12-20 18:19:43 -06:00
* Upgrade Prettier to v3.6.2 and eslint-plugin-prettier to v5.5.1 - Upgraded prettier from ^2.8.8 to ^3.6.2 (latest version) - Upgraded eslint-plugin-prettier from ^4.2.1 to ^5.5.1 for compatibility - Applied automatic formatting changes from new Prettier version - All existing ESLint and Prettier configurations remain compatible * Applied automatic fixes * Trigger CI --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com>
25 lines
617 B
TypeScript
25 lines
617 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;
|