added Certificate model

This commit is contained in:
bill bittner 2017-08-21 13:27:13 -07:00
parent 060501c347
commit a43836d639

91
models/certificate.js Normal file
View file

@ -0,0 +1,91 @@
module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, ARRAY, DECIMAL, DOUBLE }) => {
const Certificate = sequelize.define(
'Certificate',
{
address: {
type : STRING,
default: null,
},
amount: {
type : STRING,
default: null,
},
claimId: {
type : STRING,
default: null,
},
claimSequence: {
type : INTEGER,
default: null,
},
decodedClaim: {
type : BOOLEAN,
default: null,
},
depth: {
type : INTEGER,
default: null,
},
effectiveAmount: {
type : STRING,
default: null,
},
hasSignature: {
type : BOOLEAN,
default: null,
},
height: {
type : STRING,
default: null,
},
hex: {
type : TEXT('long'),
default: null,
},
name: {
type : STRING,
default: null,
},
nout: {
type : INTEGER,
default: null,
},
txid: {
type : STRING,
default: null,
},
validAtHeight: {
type : STRING,
default: null,
},
outpoint: {
type : STRING,
default: null,
},
valueVersion: {
type : STRING,
default: null,
},
claimType: {
type : STRING,
default: null,
},
certificateVersion: {
type : STRING,
default: null,
},
keyType: {
type : STRING,
default: null,
},
publicKey: {
type : TEXT('long'),
default: null,
},
},
{
freezeTableName: true,
}
);
return Certificate;
};