appwrite-utils-cli
Version:
Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.
182 lines (156 loc) • 3.69 kB
YAML
# yaml-language-server: $schema=../.yaml_schemas/collection.schema.json
# Collection Definition: Categories
name: Categories
id: 01JYDBQTB5W8SCBAYB654CATEG
documentSecurity: false
enabled: true
permissions:
- permission: read
target: any
- permission: create
target: users
- permission: update
target: users
- permission: delete
target: users
attributes:
# Core Information
- key: name
type: string
size: 100
required: true
description: "Category name or title"
- key: slug
type: string
size: 120
required: false
description: "URL-friendly version of the category name"
- key: description
type: string
size: 500
required: false
description: "Detailed description of the category"
# Hierarchy Support
- key: parentId
type: string
size: 50
required: false
description: "Parent category ID for hierarchical structure (manual reference)"
- key: level
type: integer
required: true
default: 0
min: 0
max: 5
description: "Hierarchy level (0 = root, 1 = subcategory, etc.)"
- key: sortOrder
type: integer
required: true
default: 0
description: "Sort order within the same level"
# Visual & Branding
- key: colorCode
type: string
size: 7
required: false
description: "Hex color code for category branding (e.g., #FF5733)"
- key: icon
type: string
size: 50
required: false
description: "Icon name or class for category display"
- key: coverImage
type: string
size: 255
required: false
description: "Cover image file ID for category header"
# Status & Management
- key: isActive
type: boolean
required: true
default: true
description: "Whether the category is active and visible"
- key: isFeatured
type: boolean
required: true
default: false
description: "Whether the category is featured"
# Statistics
- key: postCount
type: integer
required: true
default: 0
min: 0
description: "Number of posts in this category"
- key: totalPostCount
type: integer
required: true
default: 0
min: 0
description: "Total posts including subcategories"
# SEO
- key: metaTitle
type: string
size: 60
required: false
description: "SEO meta title for category page"
- key: metaDescription
type: string
size: 160
required: false
description: "SEO meta description for category page"
# Content Guidelines
- key: guidelines
type: string
size: 1000
required: false
description: "Content guidelines or rules for this category"
indexes:
# Search indexes
- key: name_search
type: fulltext
attributes:
- name
- key: description_search
type: fulltext
attributes:
- description
# Hierarchy queries
- key: parent_level
type: key
attributes:
- parentId
- level
- key: level_sort
type: key
attributes:
- level
- sortOrder
# Status queries
- key: active_featured
type: key
attributes:
- isActive
- isFeatured
- key: active_sort
type: key
attributes:
- isActive
- sortOrder
# Statistics
- key: post_count_desc
type: key
attributes:
- postCount
orders:
- desc
# Unique constraints
- key: name_unique
type: unique
attributes:
- name
- key: slug_unique
type: unique
attributes:
- slug
importDefs: []