/**
 * ⚠️ 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 TagSchema = {
  $id: "#tag/base",
  title: "core/tag",
  type: "object",
  required: [
    "_id",
    "owner",
    "isDeleted",
    "createdAt",
    "updatedAt",
  ],
  properties: {
    _id: {
      type: "string",
    },
    project: {
      type: "string",
    },
    title: {
      maxLength: 200,
      default: null,
      type: "string",
    },
    tags: {
      default: [],
      type: "array",
      items: {
        type: "string",
      },
    },
    locked: {
      default: false,
      type: "boolean",
    },
    color: {
      pattern: "^#([0-9a-fA-F]{3}){1,2}$",
      default: "#CCCCCC",
      type: "string",
    },
    type: {
      enum: [
        "status",
        "milestone",
        "content",
        "user",
        "project",
        "category",
        "event",
        "system",
      ],
      maxLength: 50,
      default: "system",
      type: "string",
    },
    owner: {
      type: "string",
    },
    order: {
      default: 0,
      type: "number",
    },
    isDeleted: {
      default: false,
      type: "boolean",
    },
    createdAt: {
      format: "date-time",
      type: "string",
    },
    updatedAt: {
      format: "date-time",
      type: "string",
    },
  },
}



export default TagSchema
