/**
 * ⚠️ WARNING: THIS FILE IS AUTO-GENERATED ⚠️
 * 
 * This file is generated by the type generation system.
 * Any manual changes will be overwritten on next server start and should always be committed.
 * 
 */

import { Type } from "@sinclair/typebox"

export const UserSchema = {
  $id: "#user/base",
  title: "core/user",
  type: "object",
  required: [
    "_id",
    "email",
    "firstname",
    "lastname",
    "email_verified",
    "active",
    "blocked",
    "tags",
    "createdAt",
    "updatedAt",
    "isDeleted",
  ],
  properties: {
    _id: {
      format: "uuid",
      type: "string",
    },
    email: {
      format: "email",
      type: "string",
    },
    title: {
      type: "string",
    },
    firstname: {
      type: "string",
    },
    lastname: {
      type: "string",
    },
    email_verified: {
      default: false,
      type: "boolean",
    },
    active: {
      default: true,
      type: "boolean",
    },
    blocked: {
      default: false,
      type: "boolean",
    },
    tags: {
      default: [],
      type: "array",
      items: {
        type: "string",
      },
    },
    settings: {},
    ux: {},
    password: {
      type: "string",
    },
    owner: {
      type: "string",
    },
    account: {
      type: "string",
    },
    resetToken: {
      type: "string",
    },
    resetDate: {
      format: "date-time",
      type: "string",
    },
    passwordUpdatedAt: {
      format: "date-time",
      type: "string",
    },
    signedTermsAt: {
      format: "date-time",
      type: "string",
    },
    createdAt: {
      format: "date-time",
      type: "string",
    },
    updatedAt: {
      format: "date-time",
      type: "string",
    },
    isDeleted: {
      default: false,
      type: "boolean",
    },
  },
}

export const PublicUserSchema = {
  title: "core/user",
  type: "object",
  required: [
    "_id",
    "email",
    "firstname",
    "lastname",
    "email_verified",
    "active",
    "blocked",
    "tags",
    "createdAt",
    "updatedAt",
    "isDeleted",
  ],
  properties: {
    _id: {
      format: "uuid",
      type: "string",
    },
    email: {
      format: "email",
      type: "string",
    },
    title: {
      type: "string",
    },
    firstname: {
      type: "string",
    },
    lastname: {
      type: "string",
    },
    email_verified: {
      default: false,
      type: "boolean",
    },
    active: {
      default: true,
      type: "boolean",
    },
    blocked: {
      default: false,
      type: "boolean",
    },
    tags: {
      default: [],
      type: "array",
      items: {
        type: "string",
      },
    },
    settings: {},
    ux: {},
    owner: {
      type: "string",
    },
    account: {
      type: "string",
    },
    passwordUpdatedAt: {
      format: "date-time",
      type: "string",
    },
    signedTermsAt: {
      format: "date-time",
      type: "string",
    },
    createdAt: {
      format: "date-time",
      type: "string",
    },
    updatedAt: {
      format: "date-time",
      type: "string",
    },
    isDeleted: {
      default: false,
      type: "boolean",
    },
  },
}

export default UserSchema
