mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
31 lines
632 B
JavaScript
31 lines
632 B
JavaScript
|
/**
|
||
|
* @typedef {object} TierNameChangeEventData
|
||
|
* @prop {Tier} tier
|
||
|
*/
|
||
|
|
||
|
class TierNameChangeEvent {
|
||
|
/** @type {TierNameChangeEventData} */
|
||
|
data;
|
||
|
/** @type {Date} */
|
||
|
timestamp;
|
||
|
|
||
|
/**
|
||
|
* @param {TierNameChangeEvent} data
|
||
|
* @param {Date} timestamp
|
||
|
*/
|
||
|
constructor(data, timestamp) {
|
||
|
this.data = data;
|
||
|
this.timestamp = timestamp;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {TierNameChangeEvent} data
|
||
|
* @param {Date} [timestamp]
|
||
|
*/
|
||
|
static create(data, timestamp = new Date()) {
|
||
|
return new TierNameChangeEvent(data, timestamp);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = TierNameChangeEvent;
|