mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +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;
|