How to use the sequelize-typescript.DataType.BOOLEAN function in sequelize-typescript

To help you get started, we’ve selected a few sequelize-typescript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github turt2live / matrix-voyager-bot / src / db / migrations / 20180131210945-TableStructure.ts View on Github external
"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},
            }));
    },
github oughtinc / mosaic / server / lib / models / assignment.ts View on Github external
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;
github turt2live / matrix-voyager-bot / src / db / migrations / 20180131210945-TableStructure.ts View on Github external
.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", {
github turt2live / matrix-dimension / src / db / migrations / 20171218203245-AddTables.ts View on Github external
.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",
                },
            }));
    },
github englercj / playground / server / src / models / Playground.ts View on Github external
* 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.
github atlassian / nucleus / src / db / sequelize / models / index.ts View on Github external
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[];
}
github turt2live / matrix-dimension / src / db / migrations / 20171224140745-AddNeb.ts View on Github external
.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", {
github birkir / prime / packages / prime-core / src / models / Navigation.ts View on Github external
})
  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;
}
github Hydractify / kanna_kobayashi / src / models / User.ts View on Github external
@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;
github turt2live / matrix-dimension / src / db / migrations / 20171218203245-AddWidgets.ts View on Github external
.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", [