var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result) __defProp(target, key, result);
  return result;
};
import { OptionalProps } from "@mikro-orm/core";
import { Entity, Index, ManyToOne, PrimaryKey, Property, Unique } from "@mikro-orm/decorators/legacy";
OptionalProps;
let FeatureToggle = class {
  constructor() {
    this.createdAt = /* @__PURE__ */ new Date();
    this.updatedAt = /* @__PURE__ */ new Date();
  }
};
__decorateClass([
  PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
], FeatureToggle.prototype, "id", 2);
__decorateClass([
  Property({ type: "text" })
], FeatureToggle.prototype, "identifier", 2);
__decorateClass([
  Property({ type: "text" })
], FeatureToggle.prototype, "name", 2);
__decorateClass([
  Property({ type: "text", nullable: true })
], FeatureToggle.prototype, "description", 2);
__decorateClass([
  Property({ type: "text", nullable: true })
], FeatureToggle.prototype, "category", 2);
__decorateClass([
  Property({ name: "default_value", type: "jsonb" })
], FeatureToggle.prototype, "defaultValue", 2);
__decorateClass([
  Property({ name: "type", type: "text" })
], FeatureToggle.prototype, "type", 2);
__decorateClass([
  Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
], FeatureToggle.prototype, "createdAt", 2);
__decorateClass([
  Property({ name: "updated_at", type: Date, onUpdate: () => /* @__PURE__ */ new Date() })
], FeatureToggle.prototype, "updatedAt", 2);
__decorateClass([
  Property({ name: "deleted_at", type: Date, nullable: true })
], FeatureToggle.prototype, "deletedAt", 2);
FeatureToggle = __decorateClass([
  Entity({ tableName: "feature_toggles" }),
  Unique({ name: "feature_toggles_identifier_unique", properties: ["identifier"] }),
  Index({ name: "feature_toggles_category_idx", properties: ["category"] }),
  Index({ name: "feature_toggles_name_idx", properties: ["name"] })
], FeatureToggle);
OptionalProps;
let FeatureToggleOverride = class {
  constructor() {
    this.createdAt = /* @__PURE__ */ new Date();
    this.updatedAt = /* @__PURE__ */ new Date();
  }
};
__decorateClass([
  PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
], FeatureToggleOverride.prototype, "id", 2);
__decorateClass([
  ManyToOne(() => FeatureToggle, { fieldName: "toggle_id" })
], FeatureToggleOverride.prototype, "toggle", 2);
__decorateClass([
  Property({ name: "tenant_id", type: "uuid" })
], FeatureToggleOverride.prototype, "tenantId", 2);
__decorateClass([
  Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
], FeatureToggleOverride.prototype, "createdAt", 2);
__decorateClass([
  Property({ name: "updated_at", type: Date, onCreate: () => /* @__PURE__ */ new Date(), onUpdate: () => /* @__PURE__ */ new Date() })
], FeatureToggleOverride.prototype, "updatedAt", 2);
__decorateClass([
  Property({ name: "value", type: "jsonb" })
], FeatureToggleOverride.prototype, "value", 2);
FeatureToggleOverride = __decorateClass([
  Entity({ tableName: "feature_toggle_overrides" }),
  Unique({
    name: "feature_toggle_overrides_toggle_tenant_unique",
    properties: ["toggle", "tenantId"]
  }),
  Index({ name: "feature_toggle_overrides_tenant_idx", properties: ["tenantId"] }),
  Index({ name: "feature_toggle_overrides_toggle_idx", properties: ["toggle"] })
], FeatureToggleOverride);
export {
  FeatureToggle,
  FeatureToggleOverride
};
//# sourceMappingURL=entities.js.map
