Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
})
);
}
@PrimaryKey
@Default(DataType.UUIDV4)
@Column(DataType.UUID)
public id;
@Column(DataType.STRING)
public name: string;
@Column(DataType.STRING)
public url: string;
@Default('POST')
@Column(DataType.STRING)
public method: string;
@Column(DataType.JSONB)
public options: any;
@Column(DataType.UUID)
public userId: any;
@CreatedAt
@Column
public createdAt: Date;
@UpdatedAt
@Column
public updatedAt: Date;
@Column(DataType.STRING)
public name: string;
@AllowNull
@Default(null)
@Column(DataType.INTEGER)
public eligibilityRank: number;
@Column(DataType.JSON)
public description: Object;
@Column(DataType.JSON)
public metadata: Object;
@AllowNull(false)
@Default(true)
@Column(DataType.BOOLEAN)
public areNewWorkspacesOracleOnlyByDefault: boolean;
@BelongsToMany(() => Tree, "ExperimentTreeRelation", "ExperimentId", "TreeId")
public trees: Tree[];
@BelongsToMany(
() => Experiment,
"FallbackRelation",
"primaryExperimentId",
"fallbackExperimentId",
)
public fallbacks: Experiment[];
@HasMany(() => Instructions, "experimentId")
public instructions: Instructions[];
@AllowNull(false)
@Column(DataType.STRING(256))
name: string
@Column({ type: DataType.STRING(128), comment: 'property generation rules' })
rule: string
@Column({ type: DataType.TEXT, comment: 'value of this property' })
value: string
@Column(DataType.TEXT)
description: string
@AllowNull(false)
@Default(-1)
@Column({ comment: 'parent property ID' })
parentId: number
@AllowNull(false)
@Default(1)
@Column(DataType.BIGINT())
priority: number
@ForeignKey(() => Interface)
@Column
interfaceId: number
@ForeignKey(() => User)
@Column
creatorId: number
import { Table, Model, Column, Default, PrimaryKey, BelongsTo, DataType} from 'sequelize-typescript'
import { Workflow } from './workflow'
@Table({
timestamps: false,
freezeTableName: true
})
export class Subscription extends Model {
@Default(DataType.UUIDV1)
@Column(DataType.UUID)
@PrimaryKey
id: string;
@BelongsTo(() => Workflow)
workflowId: Workflow;
@Column
stepId: number;
@Column
eventName: string;
@Column(DataType.TEXT)
get eventKey(): any {
return JSON.parse(this.getDataValue('eventKey'));
public name: string;
@Column
public title: string;
@Column
public description: string;
@Column
public type: string;
@Default('Main')
@Column
public group: string;
@Default(0)
@Column
public position: number;
@Default(false)
@Column
public isDisplay: boolean;
@ForeignKey(() => ContentType)
@Column(DataType.UUID)
public contentTypeId;
@ForeignKey(() => ContentTypeField)
@Column(DataType.UUID)
public contentTypeFieldId;
@BelongsTo(() => ContentType, {
@AllowNull(false)
@Column({ comment: 'msg type' })
type: string
@Column(DataType.STRING(128))
param1: string
@Column(DataType.STRING(128))
param2: string
@Column(DataType.STRING(128))
param3: string
@AllowNull(false)
@Default(false)
@Column
readed: boolean
}
public entryId: string;
@PrimaryKey
@Default(DataType.UUIDV4)
@Column(DataType.UUID)
public versionId: any;
@ForeignKey(() => ContentType)
@Column(DataType.UUID)
public contentTypeId: any;
@ForeignKey(() => ContentRelease)
@Column(DataType.UUID)
public contentReleaseId: any;
@Default('en')
@Column
public language: string;
@Column
public isPublished: boolean;
@Column(DataType.JSON)
public data: any;
@Column(DataType.UUID)
public userId: any;
@CreatedAt
@Column
public createdAt: Date;
import * as Sequelize from 'sequelize';
import { Table, Column, Model, Unique, Default } from 'sequelize-typescript';
@Table({
paranoid: true,
timestamps: true,
underscored: true,
freezeTableName: true
})
export class BaseEntity<i> extends Model> {
@Unique
@Default(Sequelize.UUIDV4)
@Column({
type: Sequelize.UUID,
field: 'identity'
})
identity: string;
}
</i>