UNPKG

@ckstack/ck-lib-models

Version:

ckstack default database table sequelize models

236 lines (235 loc) 8.24 kB
"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; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Partition = void 0; const sequelize_typescript_1 = require("sequelize-typescript"); let Partition = class Partition extends sequelize_typescript_1.Model { }; __decorate([ (0, sequelize_typescript_1.Column)({ field: 'TABLE_CATALOG', type: sequelize_typescript_1.DataType.STRING(512), allowNull: false, defaultValue: '', primaryKey: true, }), __metadata("design:type", String) ], Partition.prototype, "TABLE_CATALOG", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'TABLE_SCHEMA', type: sequelize_typescript_1.DataType.STRING(64), allowNull: false, defaultValue: '', }), __metadata("design:type", String) ], Partition.prototype, "TABLE_SCHEMA", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'TABLE_NAME', type: sequelize_typescript_1.DataType.STRING(64), allowNull: false, defaultValue: '', }), __metadata("design:type", String) ], Partition.prototype, "TABLE_NAME", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'PARTITION_NAME', type: sequelize_typescript_1.DataType.STRING(64), allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "PARTITION_NAME", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'SUBPARTITION_NAME', type: sequelize_typescript_1.DataType.STRING(64), allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "SUBPARTITION_NAME", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'PARTITION_ORDINAL_POSITION', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: true, }), __metadata("design:type", Number) ], Partition.prototype, "PARTITION_ORDINAL_POSITION", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'SUBPARTITION_ORDINAL_POSITION', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: true, }), __metadata("design:type", Number) ], Partition.prototype, "SUBPARTITION_ORDINAL_POSITION", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'PARTITION_METHOD', type: sequelize_typescript_1.DataType.STRING(18), allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "PARTITION_METHOD", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'SUBPARTITION_METHOD', type: sequelize_typescript_1.DataType.STRING(12), allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "SUBPARTITION_METHOD", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'PARTITION_EXPRESSION', type: sequelize_typescript_1.DataType.TEXT, allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "PARTITION_EXPRESSION", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'SUBPARTITION_EXPRESSION', type: sequelize_typescript_1.DataType.TEXT, allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "SUBPARTITION_EXPRESSION", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'PARTITION_DESCRIPTION', type: sequelize_typescript_1.DataType.TEXT, allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "PARTITION_DESCRIPTION", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'TABLE_ROWS', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: false, defaultValue: 0, }), __metadata("design:type", Number) ], Partition.prototype, "TABLE_ROWS", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'AVG_ROW_LENGTH', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: false, defaultValue: 0, }), __metadata("design:type", Number) ], Partition.prototype, "AVG_ROW_LENGTH", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'DATA_LENGTH', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: false, defaultValue: 0, }), __metadata("design:type", Number) ], Partition.prototype, "DATA_LENGTH", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'MAX_DATA_LENGTH', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: true, }), __metadata("design:type", Number) ], Partition.prototype, "MAX_DATA_LENGTH", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'INDEX_LENGTH', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: false, defaultValue: 0, }), __metadata("design:type", Number) ], Partition.prototype, "INDEX_LENGTH", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'DATA_FREE', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: false, defaultValue: 0, }), __metadata("design:type", Number) ], Partition.prototype, "DATA_FREE", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'CREATE_TIME', type: sequelize_typescript_1.DataType.DATE, allowNull: true, }), __metadata("design:type", Date) ], Partition.prototype, "CREATE_TIME", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'UPDATE_TIME', type: sequelize_typescript_1.DataType.DATE, allowNull: true, }), __metadata("design:type", Date) ], Partition.prototype, "UPDATE_TIME", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'CHECK_TIME', type: sequelize_typescript_1.DataType.DATE, allowNull: true, }), __metadata("design:type", Date) ], Partition.prototype, "CHECK_TIME", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'CHECKSUM', type: sequelize_typescript_1.DataType.BIGINT.UNSIGNED, allowNull: true, }), __metadata("design:type", Number) ], Partition.prototype, "CHECKSUM", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'PARTITION_COMMENT', type: sequelize_typescript_1.DataType.STRING(80), allowNull: false, defaultValue: '', }), __metadata("design:type", String) ], Partition.prototype, "PARTITION_COMMENT", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'NODEGROUP', type: sequelize_typescript_1.DataType.STRING(12), allowNull: false, defaultValue: '', }), __metadata("design:type", String) ], Partition.prototype, "NODEGROUP", void 0); __decorate([ (0, sequelize_typescript_1.Column)({ field: 'TABLESPACE_NAME', type: sequelize_typescript_1.DataType.STRING(64), allowNull: true, }), __metadata("design:type", String) ], Partition.prototype, "TABLESPACE_NAME", void 0); Partition = __decorate([ (0, sequelize_typescript_1.Table)({ tableName: 'PARTITIONS', freezeTableName: true, underscored: true, timestamps: false, }) ], Partition); exports.Partition = Partition;