export type Notification = {
  id: string
  message: string
}

export type Asset = {
  key: string
  value: string
  group: 'tiles' | 'objects' | 'sound' | 'music' | 'ui' | 'font' | 'other'
  type: 'base64' | 'link'
}

export type Tile = {
  id: string
  name: string
  tags: string[]
  createdAt: Date
  updatedAt: Date
}

export type Object = {
  id: string
  name: string
  origin_x: number
  origin_y: number
  createdAt: Date
  updatedAt: Date
  ZoneObject: ZoneObject[]
}

export type Item = {
  id: string
  name: string
  description: string
  stackable: boolean
  createdAt: Date
  updatedAt: Date
  characters: CharacterItem[]
}

export type User = {
  id: number
  username: string
  password: string
  characters: Character[]
}

export type Character = {
  id: number
  userId: number
  user: User
  name: string
  hitpoints: number
  mana: number
  level: number
  experience: number
  role: string
  position_x: number
  position_y: number
  rotation: number
  zoneId: number
  zone: Zone
  chats: Chat[]
  items: CharacterItem[]
}

export type CharacterItem = {
  id: number
  characterId: number
  character: Character
  itemId: string
  item: Item
  quantity: number
}

export type Zone = {
  id: number
  name: string
  width: number
  height: number
  tiles: any // Using 'any' for Json type, consider using a more specific type if possible
  zoneEventTiles: ZoneEventTile[]
  zoneObjects: ZoneObject[]
  characters: Character[]
  chats: Chat[]
  createdAt: Date
  updatedAt: Date
}

export type ZoneObject = {
  id: string
  zoneId: number
  zone: Zone
  objectId: string
  object: Object
  depth: number
  position_x: number
  position_y: number
}

export type ZoneEventTile = {
  id: string
  zoneId: number
  zone: Zone
  type: 'BLOCK' | 'WARP' | 'NPC' | 'ITEM'
  position_x: number
  position_y: number
}

export type Chat = {
  id: number
  characterId: number
  character: Character
  zoneId: number
  zone: Zone
  message: string
  createdAt: Date
}
