forked from noxious/server
Fixed enum fields, new migration file
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Collection, Entity, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
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';
|
||||
@ -14,13 +14,13 @@ export class Item {
|
||||
@Property({ nullable: true })
|
||||
description?: string;
|
||||
|
||||
@Property()
|
||||
@Enum(() => ItemType)
|
||||
itemType!: ItemType;
|
||||
|
||||
@Property()
|
||||
stackable = false;
|
||||
|
||||
@Property()
|
||||
@Enum(() => ItemRarity)
|
||||
rarity: ItemRarity = ItemRarity.COMMON;
|
||||
|
||||
@ManyToOne(() => Sprite, { nullable: true })
|
||||
|
Reference in New Issue
Block a user