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 { Entity, PrimaryKey, Property, Unique } from "@mikro-orm/decorators/legacy";
let DashboardLayout = class {
  constructor() {
    this.layoutJson = [];
    this.createdAt = /* @__PURE__ */ new Date();
  }
};
__decorateClass([
  PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
], DashboardLayout.prototype, "id", 2);
__decorateClass([
  Property({ name: "user_id", type: "uuid" })
], DashboardLayout.prototype, "userId", 2);
__decorateClass([
  Property({ name: "tenant_id", type: "uuid", nullable: true })
], DashboardLayout.prototype, "tenantId", 2);
__decorateClass([
  Property({ name: "organization_id", type: "uuid", nullable: true })
], DashboardLayout.prototype, "organizationId", 2);
__decorateClass([
  Property({ name: "layout_json", type: "json", default: [] })
], DashboardLayout.prototype, "layoutJson", 2);
__decorateClass([
  Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
], DashboardLayout.prototype, "createdAt", 2);
__decorateClass([
  Property({ name: "updated_at", type: Date, onUpdate: () => /* @__PURE__ */ new Date(), nullable: true })
], DashboardLayout.prototype, "updatedAt", 2);
__decorateClass([
  Property({ name: "deleted_at", type: Date, nullable: true })
], DashboardLayout.prototype, "deletedAt", 2);
DashboardLayout = __decorateClass([
  Entity({ tableName: "dashboard_layouts" }),
  Unique({ properties: ["userId", "tenantId", "organizationId"] })
], DashboardLayout);
let DashboardRoleWidgets = class {
  constructor() {
    this.widgetIdsJson = [];
    this.createdAt = /* @__PURE__ */ new Date();
  }
};
__decorateClass([
  PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
], DashboardRoleWidgets.prototype, "id", 2);
__decorateClass([
  Property({ name: "role_id", type: "uuid" })
], DashboardRoleWidgets.prototype, "roleId", 2);
__decorateClass([
  Property({ name: "tenant_id", type: "uuid", nullable: true })
], DashboardRoleWidgets.prototype, "tenantId", 2);
__decorateClass([
  Property({ name: "organization_id", type: "uuid", nullable: true })
], DashboardRoleWidgets.prototype, "organizationId", 2);
__decorateClass([
  Property({ name: "widget_ids_json", type: "json", default: [] })
], DashboardRoleWidgets.prototype, "widgetIdsJson", 2);
__decorateClass([
  Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
], DashboardRoleWidgets.prototype, "createdAt", 2);
__decorateClass([
  Property({ name: "updated_at", type: Date, onUpdate: () => /* @__PURE__ */ new Date(), nullable: true })
], DashboardRoleWidgets.prototype, "updatedAt", 2);
__decorateClass([
  Property({ name: "deleted_at", type: Date, nullable: true })
], DashboardRoleWidgets.prototype, "deletedAt", 2);
DashboardRoleWidgets = __decorateClass([
  Entity({ tableName: "dashboard_role_widgets" }),
  Unique({ properties: ["roleId", "tenantId", "organizationId"] })
], DashboardRoleWidgets);
let DashboardUserWidgets = class {
  constructor() {
    this.mode = "inherit";
    this.widgetIdsJson = [];
    this.createdAt = /* @__PURE__ */ new Date();
  }
};
__decorateClass([
  PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
], DashboardUserWidgets.prototype, "id", 2);
__decorateClass([
  Property({ name: "user_id", type: "uuid" })
], DashboardUserWidgets.prototype, "userId", 2);
__decorateClass([
  Property({ name: "tenant_id", type: "uuid", nullable: true })
], DashboardUserWidgets.prototype, "tenantId", 2);
__decorateClass([
  Property({ name: "organization_id", type: "uuid", nullable: true })
], DashboardUserWidgets.prototype, "organizationId", 2);
__decorateClass([
  Property({ name: "mode", type: "text", default: "inherit" })
], DashboardUserWidgets.prototype, "mode", 2);
__decorateClass([
  Property({ name: "widget_ids_json", type: "json", default: [] })
], DashboardUserWidgets.prototype, "widgetIdsJson", 2);
__decorateClass([
  Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
], DashboardUserWidgets.prototype, "createdAt", 2);
__decorateClass([
  Property({ name: "updated_at", type: Date, onUpdate: () => /* @__PURE__ */ new Date(), nullable: true })
], DashboardUserWidgets.prototype, "updatedAt", 2);
__decorateClass([
  Property({ name: "deleted_at", type: Date, nullable: true })
], DashboardUserWidgets.prototype, "deletedAt", 2);
DashboardUserWidgets = __decorateClass([
  Entity({ tableName: "dashboard_user_widgets" }),
  Unique({ properties: ["userId", "tenantId", "organizationId"] })
], DashboardUserWidgets);
export {
  DashboardLayout,
  DashboardRoleWidgets,
  DashboardUserWidgets
};
//# sourceMappingURL=entities.js.map
