explorer/server/schemes/OutInfo.ts

33 lines
889 B
TypeScript
Raw Permalink Normal View History

2024-08-11 16:12:51 +07:00
import { Model, DataTypes } from "sequelize";
import sequelize from "../database/sequelize";
class OutInfo extends Model {
declare readonly id: number;
2024-08-27 14:34:43 +07:00
declare amount: string;
2024-08-11 16:12:51 +07:00
declare i: BigInt;
declare tx_id: string;
declare block: BigInt;
declare readonly createdAt: Date;
declare readonly updatedAt: Date;
}
2024-08-27 11:57:09 +07:00
export type IOutInfo = Omit<OutInfo, keyof Model | 'createdAt' | 'updatedAt' | 'id'>;
2024-08-11 16:12:51 +07:00
OutInfo.init(
{
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
2024-08-27 14:34:43 +07:00
amount: { type: DataTypes.TEXT, allowNull: true },
2024-08-11 16:12:51 +07:00
i: { type: DataTypes.BIGINT, allowNull: true },
tx_id: { type: DataTypes.STRING, allowNull: true },
block: { type: DataTypes.BIGINT, allowNull: true }
},
{
sequelize,
modelName: "out_info",
timestamps: true
}
);
export default OutInfo;