1
0
forked from noxious/server

npm run format

This commit is contained in:
2024-12-25 02:06:58 +01:00
parent c35e27799e
commit b4989aac26
28 changed files with 252 additions and 243 deletions

View File

@ -1,37 +1,37 @@
import { Collection, Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
import { Sprite } from './sprite';
import { CharacterItem } from './characterItem';
import { ItemType, ItemRarity } from '#utilities/enums';
import { Sprite } from './sprite'
import { CharacterItem } from './characterItem'
import { ItemType, ItemRarity } from '#utilities/enums'
@Entity()
export class Item {
@PrimaryKey()
id!: string;
id!: string
@Property()
name!: string;
name!: string
@Property({ nullable: true })
description?: string;
description?: string
@Enum(() => ItemType)
itemType!: ItemType;
itemType!: ItemType
@Property()
stackable = false;
stackable = false
@Enum(() => ItemRarity)
rarity: ItemRarity = ItemRarity.COMMON;
rarity: ItemRarity = ItemRarity.COMMON
@ManyToOne(() => Sprite, { nullable: true })
sprite?: Sprite;
sprite?: Sprite
@Property()
createdAt = new Date();
createdAt = new Date()
@Property()
updatedAt = new Date();
updatedAt = new Date()
@OneToMany(() => CharacterItem, characterItem => characterItem.item)
characters = new Collection<CharacterItem>(this);
}
@OneToMany(() => CharacterItem, (characterItem) => characterItem.item)
characters = new Collection<CharacterItem>(this)
}