@book000/pixivts
Version:
pixiv Unofficial API Library for TypeScript
101 lines • 3.32 kB
JavaScript
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DBResponse = void 0;
const typeorm_1 = require("typeorm");
let DBResponse = class DBResponse extends typeorm_1.BaseEntity {
};
exports.DBResponse = DBResponse;
__decorate([
(0, typeorm_1.PrimaryGeneratedColumn)('increment', {
type: 'int',
comment: 'レスポンスID',
})
], DBResponse.prototype, "id", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'varchar',
length: 10,
comment: 'エンドポイントのメソッド',
})
], DBResponse.prototype, "method", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'varchar',
length: 255,
comment: 'エンドポイントの名前',
})
], DBResponse.prototype, "endpoint", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'text',
comment: 'リクエストURL',
nullable: true,
})
], DBResponse.prototype, "url", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'varchar',
length: 255,
comment: 'リクエストURLのハッシュ値',
})
], DBResponse.prototype, "urlHash", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'longtext',
comment: 'リクエストヘッダー',
nullable: true,
})
], DBResponse.prototype, "requestHeaders", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'longtext',
comment: 'リクエストボディ',
nullable: true,
})
], DBResponse.prototype, "requestBody", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'varchar',
length: 10,
comment: 'レスポンスの種別',
})
], DBResponse.prototype, "responseType", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'int',
comment: 'レスポンスのステータスコード',
})
], DBResponse.prototype, "statusCode", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'longtext',
comment: 'レスポンスヘッダー',
nullable: true,
})
], DBResponse.prototype, "responseHeaders", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'longtext',
comment: 'レスポンスボディ',
})
], DBResponse.prototype, "responseBody", void 0);
__decorate([
(0, typeorm_1.Column)({
type: 'datetime',
comment: 'データ登録日時',
precision: 3,
})
], DBResponse.prototype, "createdAt", void 0);
exports.DBResponse = DBResponse = __decorate([
(0, typeorm_1.Entity)('responses'),
(0, typeorm_1.Index)(['method', 'endpoint', 'statusCode', 'createdAt', 'urlHash'], {
unique: true,
})
], DBResponse);
//# sourceMappingURL=response-entity.js.map