"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.LegacyCommonEntity = exports.LEGACY_TABLE_FIELDS_PREFIX = void 0;
const openapi = require("@nestjs/swagger");
const class_transformer_1 = require("class-transformer");
const local_date_time_transformer_1 = require("../transformers/typeorm/local-date-time-transformer");
const typeorm_1 = require("typeorm");
exports.LEGACY_TABLE_FIELDS_PREFIX = 'ss';
let LegacyCommonEntity = class LegacyCommonEntity {
    static _OPENAPI_METADATA_FACTORY() {
        return { createdAt: { required: true, type: () => Date, nullable: true }, updatedAt: { required: true, type: () => Date, nullable: true }, deletedAt: { required: true, type: () => Date, nullable: true }, deletedTracker: { required: true, type: () => String, nullable: true }, publishedAt: { required: true, type: () => Date, nullable: true }, localeName: { required: true, type: () => String, nullable: true }, defaultEntityLocaleId: { required: true, type: () => Number, nullable: true }, createdBy: { required: true, type: () => Number, nullable: true }, updatedBy: { required: true, type: () => Number, nullable: true } };
    }
};
exports.LegacyCommonEntity = LegacyCommonEntity;
__decorate([
    (0, typeorm_1.CreateDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_created_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer, nullable: true }),
    __metadata("design:type", Date)
], LegacyCommonEntity.prototype, "createdAt", void 0);
__decorate([
    (0, typeorm_1.UpdateDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_updated_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer, nullable: true }),
    __metadata("design:type", Date)
], LegacyCommonEntity.prototype, "updatedAt", void 0);
__decorate([
    (0, typeorm_1.DeleteDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_deleted_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer, nullable: true }),
    (0, typeorm_1.Index)(),
    __metadata("design:type", Date)
], LegacyCommonEntity.prototype, "deletedAt", void 0);
__decorate([
    (0, typeorm_1.Column)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_deleted_tracker`, default: "not-deleted", nullable: true }),
    __metadata("design:type", String)
], LegacyCommonEntity.prototype, "deletedTracker", void 0);
__decorate([
    (0, class_transformer_1.Expose)(),
    (0, typeorm_1.Column)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_published_at`, default: null, nullable: true, transformer: local_date_time_transformer_1.LocalDateTimeTransformer }),
    __metadata("design:type", Date)
], LegacyCommonEntity.prototype, "publishedAt", void 0);
__decorate([
    (0, class_transformer_1.Expose)(),
    (0, typeorm_1.Column)({ type: "varchar", name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_locale_name`, default: null, nullable: true }),
    __metadata("design:type", String)
], LegacyCommonEntity.prototype, "localeName", void 0);
__decorate([
    (0, class_transformer_1.Expose)(),
    (0, typeorm_1.Column)({ type: "int", name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_default_entity_locale_id`, default: null, nullable: true }),
    __metadata("design:type", Number)
], LegacyCommonEntity.prototype, "defaultEntityLocaleId", void 0);
__decorate([
    (0, class_transformer_1.Expose)(),
    (0, typeorm_1.Column)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_created_by_id`, nullable: true }),
    __metadata("design:type", Number)
], LegacyCommonEntity.prototype, "createdBy", void 0);
__decorate([
    (0, class_transformer_1.Expose)(),
    (0, typeorm_1.Column)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_updated_by_id`, nullable: true }),
    __metadata("design:type", Number)
], LegacyCommonEntity.prototype, "updatedBy", void 0);
exports.LegacyCommonEntity = LegacyCommonEntity = __decorate([
    (0, class_transformer_1.Exclude)()
], LegacyCommonEntity);
//# sourceMappingURL=legacy-common.entity.js.map