feat: add API key expiry options (#7064)
* feat: add API key expiry options * review
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
BeforeValidate,
|
||||
BelongsTo,
|
||||
ForeignKey,
|
||||
IsDate,
|
||||
} from "sequelize-typescript";
|
||||
import { ApiKeyValidation } from "@shared/validations";
|
||||
import User from "./User";
|
||||
@@ -34,6 +35,10 @@ class ApiKey extends ParanoidModel<
|
||||
@Column
|
||||
secret: string;
|
||||
|
||||
@IsDate
|
||||
@Column
|
||||
expiresAt: Date | null;
|
||||
|
||||
// hooks
|
||||
|
||||
@BeforeValidate
|
||||
|
||||
Reference in New Issue
Block a user