from datetime import datetime
from dataclasses import dataclass

from typing import Any, List, Optional


@dataclass
class Core[Properties: Any]:
  # Required fields
  id: str
  owner: str
  clients: List[str]
  created_at: datetime
  created_by: str
  created_in: str
  version: str
  rand: str
  timestamp: str

  # Optional fields
  ref: Optional[str] = None
  shares: Optional[List[str]] = None
  groups: Optional[List[str]] = None
  updated_at: Optional[datetime] = None
  updated_by: Optional[str] = None
  updated_in: Optional[str] = None
  deleted_at: Optional[datetime] = None
  deleted_by: Optional[str] = None
  deleted_in: Optional[str] = None
  restored_at: Optional[datetime] = None
  restored_by: Optional[str] = None
  restored_in: Optional[str] = None
  description: Optional[str] = None
  identity: Optional[str] = None
  props: Optional[Properties] = None
  tags: Optional[List[str]] = None
