origintrail-node
Version:
OriginTrail Node - Decentralized Knowledge Graph Node Library
31 lines (30 loc) • 1.05 kB
JavaScript
export default (sequelize, DataTypes) => {
const randomSamplingChallenge = sequelize.define(
'random_sampling_challenge',
{
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
blockchainId: DataTypes.STRING,
// startDate: DataTypes.DATE,
// endDate: DataTypes.DATE,
contractAddress: DataTypes.STRING,
knowledgeCollectionId: DataTypes.INTEGER,
chunkNumber: DataTypes.INTEGER,
epoch: DataTypes.INTEGER,
activeProofPeriodStartBlock: DataTypes.BIGINT,
finalized: DataTypes.BOOLEAN,
sentSuccessfully: DataTypes.BOOLEAN,
score: DataTypes.BIGINT,
createdAt: DataTypes.DATE,
updatedAt: DataTypes.DATE,
},
{ underscored: true },
);
randomSamplingChallenge.associate = () => {
// associations can be defined here
};
return randomSamplingChallenge;
};