mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
27 lines
507 B
JavaScript
27 lines
507 B
JavaScript
import IEntity from "./IEntity"
|
|
|
|
export default class IdentifierEntity extends IEntity {
|
|
|
|
static attributes = {
|
|
value: String,
|
|
}
|
|
|
|
static attributeConverter = {
|
|
fromAttribute: (value, type) => new IdentifierEntity(value),
|
|
toAttribute: (value, type) => value.toString()
|
|
}
|
|
|
|
constructor(values) {
|
|
super(values)
|
|
/** @type {String} */ this.value
|
|
}
|
|
|
|
valueOf() {
|
|
return this.value
|
|
}
|
|
|
|
toString() {
|
|
return this.value
|
|
}
|
|
}
|