Files
outline/server/models/base/IdModel.ts
codegen-sh[bot]andTom Moor 758d4edbb9 Upgrade @typescript-eslint dependencies to v8.33.0 (#9363)
* 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>
2025-06-01 11:01:15 -04:00

30 lines
509 B
TypeScript

import {
CreatedAt,
UpdatedAt,
Column,
PrimaryKey,
IsUUID,
DataType,
Default,
} from "sequelize-typescript";
import Model from "./Model";
class IdModel<
TModelAttributes extends object = any,
TCreationAttributes extends object = TModelAttributes
> extends Model<TModelAttributes, TCreationAttributes> {
@IsUUID(4)
@PrimaryKey
@Default(DataType.UUIDV4)
@Column(DataType.UUID)
id: string;
@CreatedAt
createdAt: Date;
@UpdatedAt
updatedAt: Date;
}
export default IdModel;