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 BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
import Route from "../../Types/API/Route";
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
import ColumnLength from "../../Types/Database/ColumnLength";
import ColumnType from "../../Types/Database/ColumnType";
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
import TableColumn from "../../Types/Database/TableColumn";
import TableColumnType from "../../Types/Database/TableColumnType";
import TableMetadata from "../../Types/Database/TableMetadata";
import IconProp from "../../Types/Icon/IconProp";
import { Column, Entity } from "typeorm";
let OpenSourceDeployment = class OpenSourceDeployment extends BaseModel {
    constructor() {
        super(...arguments);
        this.email = undefined;
        this.name = undefined;
        this.companyName = undefined;
        this.companyPhoneNumber = undefined;
        this.oneuptimeVersion = undefined;
        this.instanceUrl = undefined;
    }
};
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.Email,
        title: "Email",
        description: "Email address of the user who registered.",
    }),
    Column({
        nullable: false,
        type: ColumnType.Email,
        length: ColumnLength.Email,
    }),
    __metadata("design:type", String)
], OpenSourceDeployment.prototype, "email", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.ShortText,
        title: "Name",
        description: "Full name of the user who registered.",
    }),
    Column({
        nullable: false,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], OpenSourceDeployment.prototype, "name", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.ShortText,
        title: "Company Name",
        description: "Company name of the user who registered.",
    }),
    Column({
        nullable: true,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], OpenSourceDeployment.prototype, "companyName", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.Phone,
        title: "Company Phone Number",
        description: "Phone number of the user who registered.",
    }),
    Column({
        nullable: true,
        type: ColumnType.Phone,
        length: ColumnLength.Phone,
    }),
    __metadata("design:type", String)
], OpenSourceDeployment.prototype, "companyPhoneNumber", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.ShortText,
        title: "Version",
        description: "OneUptime version of the self-hosted instance.",
    }),
    Column({
        nullable: false,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], OpenSourceDeployment.prototype, "oneuptimeVersion", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.ShortText,
        title: "Instance URL",
        description: "URL of the self-hosted instance.",
    }),
    Column({
        nullable: true,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], OpenSourceDeployment.prototype, "instanceUrl", void 0);
OpenSourceDeployment = __decorate([
    TableAccessControl({
        create: [],
        read: [],
        update: [],
        delete: [],
    }),
    CrudApiEndpoint(new Route("/open-source-deployment")),
    TableMetadata({
        tableName: "OpenSourceDeployment",
        singularName: "Open Source Deployment",
        pluralName: "Open Source Deployments",
        icon: IconProp.Globe,
        tableDescription: "Open source deployment registrations from self-hosted instances.",
    }),
    Entity({
        name: "OpenSourceDeployment",
    })
], OpenSourceDeployment);
export default OpenSourceDeployment;
//# sourceMappingURL=OpenSourceDeployment.js.map