Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"id": {type: DataType.INTEGER, primaryKey: true, allowNull: false, autoIncrement: true},
"type": {type: DataType.STRING, allowNull: false},
"sourceNodeId": {
type: DataType.INTEGER,
allowNull: false,
references: {model: "voyager_nodes", key: "id"},
onUpdate: "cascade", onDelete: "cascade",
},
"targetNodeId": {
type: DataType.INTEGER,
allowNull: false,
references: {model: "voyager_nodes", key: "id"},
onUpdate: "cascade", onDelete: "cascade",
},
"timestamp": {type: DataType.BIGINT, allowNull: false},
"isVisible": {type: DataType.BOOLEAN, allowNull: false},
"isRedacted": {type: DataType.BOOLEAN, allowNull: false},
"eventId": {type: DataType.STRING, allowNull: true},
}));
},
public id: string;
@ForeignKey(() => User)
@Column(DataType.STRING)
public userId: string;
@BelongsTo(() => User)
public user: User;
@Column(DataType.BIGINT)
public startAtTimestamp: number;
@Column(DataType.BIGINT)
public endAtTimestamp: number;
@Column(DataType.BOOLEAN)
public isOracle: boolean;
@Column(DataType.BOOLEAN)
public isTimed: boolean;
@ForeignKey(() => Workspace)
@Column(DataType.UUID)
public workspaceId: string;
@BelongsTo(() => Workspace)
public Workspace: Workspace;
@ForeignKey(() => Experiment)
@Column(DataType.UUID)
public experimentId: string;
.then(() => queryInterface.createTable("voyager_nodes", {
"id": {type: DataType.INTEGER, primaryKey: true, allowNull: false, autoIncrement: true},
"type": {type: DataType.STRING, allowNull: false},
"objectId": {type: DataType.STRING, allowNull: false},
"isReal": {type: DataType.BOOLEAN, allowNull: false},
"isRedacted": {type: DataType.BOOLEAN, allowNull: false},
"isPublic": {type: DataType.BOOLEAN, allowNull: false},
"displayName": {type: DataType.STRING, allowNull: true},
"avatarUrl": {type: DataType.STRING, allowNull: true},
"firstTimestamp": {type: DataType.BIGINT, allowNull: false},
}))
.then(() => queryInterface.createTable("voyager_rooms", {
.then(() => queryInterface.createTable("dimension_scalar_tokens", {
"id": {type: DataType.INTEGER, primaryKey: true, autoIncrement: true, allowNull: false},
"userId": {
type: DataType.STRING,
allowNull: false,
references: {model: "dimension_users", key: "userId"},
onUpdate: "cascade", onDelete: "cascade",
},
"scalarToken": {type: DataType.STRING, allowNull: false},
"isDimensionToken": {type: DataType.BOOLEAN, allowNull: false},
"upstreamId": {
type: DataType.INTEGER,
allowNull: true,
references: {model: "dimension_upstreams", key: "id"},
onUpdate: "cascade", onDelete: "cascade",
},
}));
},
* The version of pixi this playground is built for.
*
*/
@Column({
type: DataType.STRING(255),
allowNull: false,
})
pixiVersion: string;
/**
* If public is `true` (default) it will be indexed by the search engine. "Secret"
* playgrounds are still visible to anyone, but are not indexed into the search engine.
*
*/
@Column({
type: DataType.BOOLEAN,
defaultValue: true,
})
isPublic: boolean;
/**
* If features is `true` the playground can appear in the front-page featured section.
*
*/
@Column({
type: DataType.BOOLEAN,
defaultValue: false,
})
isFeatured: boolean;
/**
* If official is `true` the playground can appear in the front-page official section.
name: string;
@ForeignKey(() => TemporarySave)
@Column(DataType.INTEGER)
temporarySaveId: number;
@BelongsTo(() => TemporarySave)
temporarySave: TemporarySave;
}
@Table
export class Version extends Model {
@Column(DataType.STRING)
name: string;
@Column(DataType.BOOLEAN)
dead: boolean;
@Column(DataType.INTEGER)
rollout: number;
@ForeignKey(() => Channel)
@Column(DataType.INTEGER)
channelId: number;
@BelongsTo(() => Channel)
channel: Channel;
@HasMany(() => File)
files: File[];
}
.then(() => queryInterface.createTable("dimension_neb_integrations", {
"id": {type: DataType.INTEGER, primaryKey: true, autoIncrement: true, allowNull: false},
"type": {type: DataType.STRING, allowNull: false},
"name": {type: DataType.STRING, allowNull: false},
"avatarUrl": {type: DataType.STRING, allowNull: false},
"description": {type: DataType.STRING, allowNull: false},
"isEnabled": {type: DataType.BOOLEAN, allowNull: false},
"isPublic": {type: DataType.BOOLEAN, allowNull: false},
"nebId": {
type: DataType.INTEGER, allowNull: false,
references: {model: "dimension_neb_configurations", key: "id"},
onUpdate: "cascade", onDelete: "cascade",
},
}))
.then(() => queryInterface.createTable("dimension_neb_bot_users", {
})
public id;
@Column(DataType.UUID)
public parentNavigationId;
@Column(DataType.STRING)
public name: string;
@Column(DataType.UUID)
public contentTypeId: string;
@Column(DataType.UUID)
public contentEntryId: string;
@Column(DataType.BOOLEAN)
public showEntries: boolean;
@Column(DataType.INTEGER)
public index: number;
}
@Column({
field: 'partner_id',
type: DataType.TEXT,
})
public partnerId!: string | null;
@Column({
field: 'partner_since',
type: DataType.DATE,
})
public partnerSince!: Date | null;
@Column({
field: 'partner_married',
type: DataType.BOOLEAN,
})
public partnerMarried!: boolean | null;
@Column({
defaultValue: false,
field: 'partner_hidden',
type: DataType.BOOLEAN,
})
public partnerHidden!: boolean;
@Column({
field: 'timezone',
type: DataType.INTEGER,
})
public timezone!: number | null;
.then(() => queryInterface.createTable("dimension_widgets", {
"id": {type: DataType.INTEGER, primaryKey: true, autoIncrement: true, allowNull: false},
"type": {type: DataType.STRING, allowNull: false},
"name": {type: DataType.STRING, allowNull: false},
"avatarUrl": {type: DataType.STRING, allowNull: false},
"description": {type: DataType.STRING, allowNull: false},
"isEnabled": {type: DataType.BOOLEAN, allowNull: false},
"isPublic": {type: DataType.BOOLEAN, allowNull: false},
"optionsJson": {type: DataType.STRING, allowNull: true},
}))
.then(() => queryInterface.bulkInsert("dimension_widgets", [