mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
31 lines
618 B
JavaScript
31 lines
618 B
JavaScript
|
/**
|
||
|
* @typedef {object} TierArchivedEventData
|
||
|
* @prop {Tier} tier
|
||
|
*/
|
||
|
|
||
|
class TierArchivedEvent {
|
||
|
/** @type {TierArchivedEventData} */
|
||
|
data;
|
||
|
/** @type {Date} */
|
||
|
timestamp;
|
||
|
|
||
|
/**
|
||
|
* @param {TierArchivedEvent} data
|
||
|
* @param {Date} timestamp
|
||
|
*/
|
||
|
constructor(data, timestamp) {
|
||
|
this.data = data;
|
||
|
this.timestamp = timestamp;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {TierArchivedEvent} data
|
||
|
* @param {Date} [timestamp]
|
||
|
*/
|
||
|
static create(data, timestamp = new Date()) {
|
||
|
return new TierArchivedEvent(data, timestamp);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = TierArchivedEvent;
|