chore: Bringing some changes across from enterprise fork

This commit is contained in:
Tom Moor
2022-03-27 19:50:27 -07:00
parent 6fc7f7b287
commit 72614ea090
2 changed files with 13 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import {
Column,
Table,
DataType,
Scopes,
} from "sequelize-typescript";
import Collection from "./Collection";
import IntegrationAuthentication from "./IntegrationAuthentication";
@@ -12,6 +13,17 @@ import User from "./User";
import BaseModel from "./base/BaseModel";
import Fix from "./decorators/Fix";
@Scopes(() => ({
withAuthentication: {
include: [
{
model: IntegrationAuthentication,
as: "authentication",
required: true,
},
],
},
}))
@Table({ tableName: "integrations", modelName: "integration" })
@Fix
class Integration extends BaseModel {