Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@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;
@BelongsTo(() => Experiment)
public Experiments: Experiment;
@HasMany(() => Snapshot)
public snapshots: Snapshot[];
}
@Table
export default class PointerImport extends Model {
@Column({
type: DataType.UUID,
primaryKey: true,
defaultValue: UUIDV4,
allowNull: false,
})
public id: string;
@Column(DataType.BOOLEAN)
public isLocked: boolean;
@ForeignKey(() => Pointer)
@Column(DataType.UUID)
public pointerId: string;
@BelongsTo(() => Pointer)
public pointer: Pointer;
@ForeignKey(() => Workspace)
@Column(DataType.UUID)
public workspaceId: string;
@BelongsTo(() => Workspace)
public workspace: Workspace;
}
import { IForkStatsModel } from '@risevision/core-interfaces';
import { ForkType } from '@risevision/core-types';
import {
Column,
DataType,
Model,
PrimaryKey,
Table,
} from 'sequelize-typescript';
@Table({ tableName: 'forks_stat' })
export class ForksStatsModel extends Model
implements IForkStatsModel {
@PrimaryKey
@Column(DataType.BLOB)
public generatorPublicKey: Buffer;
@PrimaryKey
@Column
public blockTimestamp: number;
@PrimaryKey
@Column
public blockId: string;
@PrimaryKey
@Column
public blockHeight: number;
@PrimaryKey
@Column
Model,
Table
} from "sequelize-typescript";
import User from "./user";
import Tree from "./tree";
@Table({ tableName: "UserTreeOracleRelation" })
export default class UserTreeOracleRelation extends Model<
UserTreeOracleRelation
> {
@Default(false)
@Column(DataType.BOOLEAN)
public isMalicious: boolean;
@ForeignKey(() => User)
@Column(DataType.UUID)
public UserId: string;
@BelongsTo(() => User)
public user: User;
@ForeignKey(() => Tree)
@Column(DataType.UUID)
public TreeId: string;
@BelongsTo(() => Tree)
public tree: User;
}