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);
};
import Incident from "./Incident";
import Alert from "./Alert";
import AlertEpisode from "./AlertEpisode";
import IncidentEpisode from "./IncidentEpisode";
import OnCallDutyPolicy from "./OnCallDutyPolicy";
import OnCallDutyPolicyEscalationRule from "./OnCallDutyPolicyEscalationRule";
import OnCallDutyPolicyExecutionLog from "./OnCallDutyPolicyExecutionLog";
import OnCallDutyPolicyExecutionLogTimeline from "./OnCallDutyPolicyExecutionLogTimeline";
import Project from "./Project";
import Team from "./Team";
import User from "./User";
import UserCall from "./UserCall";
import UserEmail from "./UserEmail";
import UserNotificationRule from "./UserNotificationRule";
import UserPush from "./UserPush";
import UserOnCallLog from "./UserOnCallLog";
import UserSMS from "./UserSMS";
import UserTelegram from "./UserTelegram";
import UserWebhook from "./UserWebhook";
import UserWhatsApp from "./UserWhatsApp";
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
import Route from "../../Types/API/Route";
import { PlanType } from "../../Types/Billing/SubscriptionPlan";
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
import OwnedThrough from "../../Types/Database/AccessControl/OwnedThrough";
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
import TableBillingAccessControl from "../../Types/Database/AccessControl/TableBillingAccessControl";
import CanAccessIfCanReadOn from "../../Types/Database/CanAccessIfCanReadOn";
import ColumnLength from "../../Types/Database/ColumnLength";
import ColumnType from "../../Types/Database/ColumnType";
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
import TableColumn from "../../Types/Database/TableColumn";
import TableColumnType from "../../Types/Database/TableColumnType";
import TableMetadata from "../../Types/Database/TableMetadata";
import TenantColumn from "../../Types/Database/TenantColumn";
import IconProp from "../../Types/Icon/IconProp";
import ObjectID from "../../Types/ObjectID";
import Permission from "../../Types/Permission";
import UserNotificationEventType from "../../Types/UserNotification/UserNotificationEventType";
import UserNotificationStatus from "../../Types/UserNotification/UserNotificationStatus";
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
let UserOnCallLogTimeline = class UserOnCallLogTimeline extends BaseModel {
    constructor() {
        super(...arguments);
        this.user = undefined;
        this.userId = undefined;
        this.project = undefined;
        this.projectId = undefined;
        this.userOnCallLog = undefined;
        this.userNotificationLogId = undefined;
        this.userNotificationRule = undefined;
        this.userNotificationRuleId = undefined;
        this.onCallDutyPolicy = undefined;
        this.onCallDutyPolicyId = undefined;
        this.triggeredByIncident = undefined;
        this.triggeredByIncidentId = undefined;
        this.triggeredByAlert = undefined;
        this.triggeredByAlertId = undefined;
        this.triggeredByAlertEpisode = undefined;
        this.triggeredByAlertEpisodeId = undefined;
        this.triggeredByIncidentEpisode = undefined;
        this.triggeredByIncidentEpisodeId = undefined;
        this.onCallDutyPolicyExecutionLog = undefined;
        this.onCallDutyPolicyExecutionLogId = undefined;
        this.onCallDutyPolicyExecutionLogTimeline = undefined;
        this.onCallDutyPolicyExecutionLogTimelineId = undefined;
        this.onCallDutyPolicyEscalationRule = undefined;
        this.userNotificationEventType = undefined;
        this.onCallDutyPolicyEscalationRuleId = undefined;
        this.userBelongsToTeam = undefined;
        this.userBelongsToTeamId = undefined;
        this.statusMessage = undefined;
        this.status = undefined;
        this.createdByUser = undefined;
        this.createdByUserId = undefined;
        this.deletedByUser = undefined;
        this.isAcknowledged = undefined;
        this.acknowledgedAt = undefined;
        this.userCall = undefined;
        this.userCallId = undefined;
        this.userSms = undefined;
        this.userSmsId = undefined;
        this.userWhatsApp = undefined;
        this.userWhatsAppId = undefined;
        this.userTelegram = undefined;
        this.userTelegramId = undefined;
        this.userWebhook = undefined;
        this.userWebhookId = undefined;
        this.userEmail = undefined;
        this.userEmailId = undefined;
        this.userPush = undefined;
        this.userPushId = undefined;
        this.deletedByUserId = undefined;
    }
};
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userId",
        type: TableColumnType.Entity,
        modelType: User,
        title: "User",
        description: "Relation to User who this log belongs to",
    }),
    ManyToOne(() => {
        return User;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userId" }),
    __metadata("design:type", User)
], UserOnCallLogTimeline.prototype, "user", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "User ID",
        description: "User ID who this log belongs to",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "projectId",
        type: TableColumnType.Entity,
        modelType: Project,
        title: "Project",
        description: "Relation to Project Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return Project;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "projectId" }),
    __metadata("design:type", Project)
], UserOnCallLogTimeline.prototype, "project", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "Project ID",
        description: "ID of your OneUptime Project in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "projectId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userNotificationLogId",
        type: TableColumnType.Entity,
        modelType: UserOnCallLog,
        title: "User Notification Log",
        description: "Relation to User Notification Log Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserOnCallLog;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userNotificationLogId" }),
    __metadata("design:type", UserOnCallLog)
], UserOnCallLogTimeline.prototype, "userOnCallLog", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "User Notification Log ID",
        description: "ID of your OneUptime User Notification Log in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userNotificationLogId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userNotificationRuleId",
        type: TableColumnType.Entity,
        modelType: UserNotificationRule,
        title: "User Notification Rule",
        description: "Relation to User Notification Rule Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserNotificationRule;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userNotificationRuleId" }),
    __metadata("design:type", UserNotificationRule)
], UserOnCallLogTimeline.prototype, "userNotificationRule", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "User Notification Rule ID",
        description: "ID of your OneUptime User Notification Rule in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userNotificationRuleId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "onCallDutyPolicyId",
        type: TableColumnType.Entity,
        modelType: OnCallDutyPolicy,
        title: "OnCallDutyPolicy",
        description: "Relation to on-call duty policy Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return OnCallDutyPolicy;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "onCallDutyPolicyId" }),
    __metadata("design:type", OnCallDutyPolicy)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicy", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "OnCallDutyPolicy ID",
        description: "ID of your OneUptime on-call duty policy in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicyId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "triggeredByIncidentId",
        type: TableColumnType.Entity,
        modelType: Incident,
        title: "Incident",
        description: "Relation to Incident Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return Incident;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "triggeredByIncidentId" }),
    __metadata("design:type", Incident)
], UserOnCallLogTimeline.prototype, "triggeredByIncident", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "Incident ID",
        description: "ID of your OneUptime Incident in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "triggeredByIncidentId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "triggeredByAlertId",
        type: TableColumnType.Entity,
        modelType: Alert,
        title: "Alert",
        description: "Relation to Alert Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return Alert;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "triggeredByAlertId" }),
    __metadata("design:type", Alert)
], UserOnCallLogTimeline.prototype, "triggeredByAlert", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "Alert ID",
        description: "ID of your OneUptime Alert in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "triggeredByAlertId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "triggeredByAlertEpisodeId",
        type: TableColumnType.Entity,
        modelType: AlertEpisode,
        title: "Alert Episode",
        description: "Relation to Alert Episode Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return AlertEpisode;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "triggeredByAlertEpisodeId" }),
    __metadata("design:type", AlertEpisode)
], UserOnCallLogTimeline.prototype, "triggeredByAlertEpisode", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "Alert Episode ID",
        description: "ID of your OneUptime Alert Episode in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "triggeredByAlertEpisodeId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "triggeredByIncidentEpisodeId",
        type: TableColumnType.Entity,
        modelType: IncidentEpisode,
        title: "Incident Episode",
        description: "Relation to Incident Episode Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return IncidentEpisode;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "triggeredByIncidentEpisodeId" }),
    __metadata("design:type", IncidentEpisode)
], UserOnCallLogTimeline.prototype, "triggeredByIncidentEpisode", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "Incident Episode ID",
        description: "ID of your OneUptime Incident Episode in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "triggeredByIncidentEpisodeId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "onCallDutyPolicyExecutionLogId",
        type: TableColumnType.Entity,
        modelType: OnCallDutyPolicyExecutionLog,
        title: "On-Call Policy Execution Log",
        description: "Relation to On-Call Policy Execution Log where this timeline event belongs.",
    }),
    ManyToOne(() => {
        return OnCallDutyPolicyExecutionLog;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "onCallDutyPolicyExecutionLogId" }),
    __metadata("design:type", OnCallDutyPolicyExecutionLog)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicyExecutionLog", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "On-Call Policy Execution Log Timeline ID",
        description: "ID of your On-Call Policy Execution Log Timeline where this timeline event belongs.",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicyExecutionLogId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "onCallDutyPolicyExecutionLogTimelineId",
        type: TableColumnType.Entity,
        modelType: OnCallDutyPolicyExecutionLogTimeline,
        title: "On-Call Policy Execution Log Timeline",
        description: "Relation to On-Call Policy Execution Log Timeline where this timeline event belongs.",
    }),
    ManyToOne(() => {
        return OnCallDutyPolicyExecutionLogTimeline;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "onCallDutyPolicyExecutionLogTimelineId" }),
    __metadata("design:type", OnCallDutyPolicyExecutionLogTimeline)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicyExecutionLogTimeline", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "On-Call Policy Execution Log ID",
        description: "ID of your On-Call Policy Execution Log where this timeline event belongs.",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicyExecutionLogTimelineId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "onCallDutyPolicyEscalationRuleId",
        type: TableColumnType.Entity,
        modelType: OnCallDutyPolicyEscalationRule,
        title: "On-Call Policy Escalation Rule",
        description: "Relation to On-Call Policy Escalation Rule where this timeline event belongs.",
    }),
    ManyToOne(() => {
        return OnCallDutyPolicyEscalationRule;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "onCallDutyPolicyEscalationRuleId" }),
    __metadata("design:type", OnCallDutyPolicyEscalationRule)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicyEscalationRule", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.ShortText,
        title: "Notification Event Type",
        description: "Notification Event Type of this execution",
        canReadOnRelationQuery: false,
    }),
    Column({
        nullable: false,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], UserOnCallLogTimeline.prototype, "userNotificationEventType", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "On-Call Policy Escalation Rule ID",
        description: "ID of your On-Call Policy Escalation Rule where this timeline event belongs.",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "onCallDutyPolicyEscalationRuleId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userBelongsToTeamId",
        type: TableColumnType.Entity,
        modelType: Team,
        title: "Which team did the user belong to when the alert was sent?",
        description: "Which team did the user belong to when the alert was sent?",
    }),
    ManyToOne(() => {
        return Team;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userBelongsToTeamId" }),
    __metadata("design:type", Team)
], UserOnCallLogTimeline.prototype, "userBelongsToTeam", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "Which team did the user belong to when the alert was sent?",
        description: "Which team did the user belong to when the alert was sent?",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userBelongsToTeamId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.LongText,
        title: "Status Message",
        description: "Status message of this execution timeline event",
        canReadOnRelationQuery: false,
    }),
    Column({
        nullable: false,
        type: ColumnType.LongText,
        length: ColumnLength.LongText,
    }),
    __metadata("design:type", String)
], UserOnCallLogTimeline.prototype, "statusMessage", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.ShortText,
        title: "Status",
        description: "Status of this execution timeline event",
        canReadOnRelationQuery: false,
    }),
    Column({
        nullable: false,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], UserOnCallLogTimeline.prototype, "status", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "createdByUserId",
        type: TableColumnType.Entity,
        modelType: User,
        title: "Created by User",
        description: "Relation to User who created this object (if this object was created by a User)",
    }),
    ManyToOne(() => {
        return User;
    }, {
        eager: false,
        nullable: true,
        onDelete: "SET NULL",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "createdByUserId" }),
    __metadata("design:type", User)
], UserOnCallLogTimeline.prototype, "createdByUser", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "Created by User ID",
        description: "User ID who created this object (if this object was created by a User)",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "createdByUserId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "deletedByUserId",
        type: TableColumnType.Entity,
        title: "Deleted by User",
        modelType: User,
        description: "Relation to User who deleted this object (if this object was deleted by a User)",
    }),
    ManyToOne(() => {
        return User;
    }, {
        cascade: false,
        eager: false,
        nullable: true,
        onDelete: "SET NULL",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "deletedByUserId" }),
    __metadata("design:type", User)
], UserOnCallLogTimeline.prototype, "deletedByUser", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        isDefaultValueColumn: false,
        required: false,
        type: TableColumnType.Boolean,
    }),
    Column({
        type: ColumnType.Boolean,
        nullable: true,
        unique: false,
    }),
    __metadata("design:type", Boolean)
], UserOnCallLogTimeline.prototype, "isAcknowledged", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        isDefaultValueColumn: false,
        required: false,
        type: TableColumnType.Date,
    }),
    Column({
        type: ColumnType.Date,
        nullable: true,
        unique: false,
    }),
    __metadata("design:type", Date)
], UserOnCallLogTimeline.prototype, "acknowledgedAt", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userCallId",
        type: TableColumnType.Entity,
        modelType: UserCall,
        title: "User Call",
        description: "Relation to User Call Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserCall;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userCallId" }),
    __metadata("design:type", UserCall)
], UserOnCallLogTimeline.prototype, "userCall", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "User Call ID",
        description: "ID of User Call in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userCallId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userSmsId",
        type: TableColumnType.Entity,
        modelType: UserSMS,
        title: "User SMS",
        description: "Relation to User SMS Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserSMS;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userSmsId" }),
    __metadata("design:type", UserSMS)
], UserOnCallLogTimeline.prototype, "userSms", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "User SMS ID",
        description: "ID of User SMS in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userSmsId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userWhatsAppId",
        type: TableColumnType.Entity,
        modelType: UserWhatsApp,
        title: "User WhatsApp",
        description: "Relation to User WhatsApp Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserWhatsApp;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userWhatsAppId" }),
    __metadata("design:type", UserWhatsApp)
], UserOnCallLogTimeline.prototype, "userWhatsApp", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "User WhatsApp ID",
        description: "ID of User WhatsApp in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userWhatsAppId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userTelegramId",
        type: TableColumnType.Entity,
        modelType: UserTelegram,
        title: "User Telegram",
        description: "Relation to User Telegram Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserTelegram;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userTelegramId" }),
    __metadata("design:type", UserTelegram)
], UserOnCallLogTimeline.prototype, "userTelegram", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "User Telegram ID",
        description: "ID of User Telegram in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userTelegramId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userWebhookId",
        type: TableColumnType.Entity,
        modelType: UserWebhook,
        title: "User Webhook",
        description: "Relation to User Webhook Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserWebhook;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userWebhookId" }),
    __metadata("design:type", UserWebhook)
], UserOnCallLogTimeline.prototype, "userWebhook", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "User Webhook ID",
        description: "ID of User Webhook in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userWebhookId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userEmailId",
        type: TableColumnType.Entity,
        modelType: UserEmail,
        title: "User Email",
        description: "Relation to User Email Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserEmail;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userEmailId" }),
    __metadata("design:type", UserEmail)
], UserOnCallLogTimeline.prototype, "userEmail", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "User Email ID",
        description: "ID of User Email in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userEmailId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "userPushId",
        type: TableColumnType.Entity,
        modelType: UserPush,
        title: "User Push",
        description: "Relation to User Push Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return UserPush;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "userPushId" }),
    __metadata("design:type", UserPush)
], UserOnCallLogTimeline.prototype, "userPush", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        canReadOnRelationQuery: true,
        title: "User Push ID",
        description: "ID of User Push in which this object belongs",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "userPushId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "Deleted by User ID",
        description: "User ID who deleted this object (if this object was deleted by a User)",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], UserOnCallLogTimeline.prototype, "deletedByUserId", void 0);
UserOnCallLogTimeline = __decorate([
    TableBillingAccessControl({
        create: PlanType.Growth,
        read: PlanType.Growth,
        update: PlanType.Growth,
        delete: PlanType.Growth,
    }),
    EnableDocumentation(),
    CanAccessIfCanReadOn("onCallDutyPolicy"),
    TenantColumn("projectId"),
    TableAccessControl({
        create: [],
        read: [Permission.CurrentUser],
        delete: [],
        update: [],
    }),
    CrudApiEndpoint(new Route("/user-notification-log-timeline")),
    OwnedThrough("onCallDutyPolicyId", OnCallDutyPolicy),
    Entity({
        name: "UserOnCallLogTimeline",
    }),
    Index(["userId", "createdAt"]),
    Index(["onCallDutyPolicyExecutionLogId", "status"]),
    Index(["projectId", "status"]),
    TableMetadata({
        tableName: "UserOnCallLogTimeline",
        singularName: "User On-Call Log Timeline",
        pluralName: "User  On-Call  Log Timelines",
        icon: IconProp.Logs,
        tableDescription: "Timeline events for user on-call log.",
    })
], UserOnCallLogTimeline);
export default UserOnCallLogTimeline;
//# sourceMappingURL=UserOnCallLogTimeline.js.map