2017-08-10 18:47:59 +02:00
|
|
|
module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, ARRAY, DECIMAL, DOUBLE }) => {
|
|
|
|
const Claim = sequelize.define(
|
|
|
|
'Claim',
|
|
|
|
{
|
|
|
|
address: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
amount: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
claimId: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
claimSequence: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : INTEGER,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
decodedClaim: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : BOOLEAN,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
depth: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : INTEGER,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
effectiveAmount: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
hasSignature: {
|
|
|
|
type : BOOLEAN,
|
2017-08-15 01:16:32 +02:00
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
height: {
|
|
|
|
type : STRING,
|
2017-08-15 01:16:32 +02:00
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
hex: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : TEXT('long'),
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
name: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
nout: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : INTEGER,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
txid: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
validAtHeight: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
outpoint: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
claimType: {
|
2017-08-15 01:16:32 +02:00
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
2017-08-15 22:48:42 +02:00
|
|
|
certificateId: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
2017-08-10 18:47:59 +02:00
|
|
|
author: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
description: {
|
2017-08-15 22:48:42 +02:00
|
|
|
type : TEXT('long'),
|
2017-08-10 18:47:59 +02:00
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
language: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-15 22:48:42 +02:00
|
|
|
},
|
|
|
|
license: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
2017-08-10 18:47:59 +02:00
|
|
|
},
|
|
|
|
licenseUrl: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
nsfw: {
|
|
|
|
type : BOOLEAN,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
preview: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
thumbnail: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
metadataVersion: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
contentType: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
source: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
sourceType: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
sourceVersion: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
streamVersion: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
valueVersion: {
|
|
|
|
type : STRING,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
freezeTableName: true,
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
return Claim;
|
|
|
|
};
|