<?php

namespace Shm\ShmAuditLog\SchemaAuditLog;

use Shm\Collection\Collection;
use Shm\Shm;
use Shm\ShmChat\ShmChat;
use Shm\ShmDB\mDB;
use Shm\ShmTypes\Classes\ShmEventPayload;
use Shm\ShmTypes\StructureType;

class AuditLogs extends Collection
{




    public function schema(): ?StructureType
    {
        $schema = Shm::structure([

            'type' => Shm::enum([
                'insert' => 'Добавление',
                'update' => 'Обновление',
                'delete' => 'Удаление',
                'action' => 'Действие',
                'error' => 'Ошибка',
                'system' => 'Система',
            ]),
            'documents' => Shm::IDs(),
            'documentsCollection' => Shm::string(),
            'owner' => Shm::ID(),
            'ownerCollection' => Shm::string(),
            'changes' => Shm::string(),

        ]);




        return $schema;
    }
}