import type { Permission, Role, RolePermission, Schema, User, UserRole } from "../lib/types";

export const pendingUser = {
  id: "user-pending-1",
  email: "pending@example.com",
  name: "Pending User",
  status: "PENDING",
  permissions: null,
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies User<Schema>;

export const activeUser = {
  id: "user-active-1",
  email: "active@example.com",
  name: "Active User",
  status: "ACTIVE",
  permissions: null,
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: new Date("2024-01-02T00:00:00.000Z"),
} as const satisfies User<Schema>;

export const inactiveUser = {
  id: "user-inactive-1",
  email: "inactive@example.com",
  name: "Inactive User",
  status: "INACTIVE",
  permissions: null,
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: new Date("2024-01-03T00:00:00.000Z"),
} as const satisfies User<Schema>;

export const basePermission = {
  id: "permission-1",
  key: "orders:read",
  description: "Permission to read orders",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Permission<Schema>;

export const writePermission = {
  id: "permission-2",
  key: "orders:write",
  description: "Permission to write orders",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Permission<Schema>;

export const baseRole = {
  id: "role-1",
  name: "Order Manager",
  description: "Role for managing orders",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Role<Schema>;

export const adminRole = {
  id: "role-2",
  name: "Admin",
  description: "Administrator role",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Role<Schema>;

export const baseUserRole = {
  id: "user-role-1",
  userId: "user-active-1",
  roleId: "role-1",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies UserRole<Schema>;

export const baseRolePermission = {
  id: "role-permission-1",
  roleId: "role-1",
  permissionId: "permission-1",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies RolePermission<Schema>;
