mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
27 lines
620 B
JavaScript
27 lines
620 B
JavaScript
|
/**
|
||
|
* @typedef {object} MemberEntryViewEventData
|
||
|
* @prop {string} memberId
|
||
|
* @prop {string} memberStatus
|
||
|
* @prop {string} entryId
|
||
|
* @prop {string} entryUrl
|
||
|
*/
|
||
|
|
||
|
module.exports = class MemberEntryViewEvent {
|
||
|
/**
|
||
|
* @param {MemberEntryViewEventData} data
|
||
|
* @param {Date} timestamp
|
||
|
*/
|
||
|
constructor(data, timestamp) {
|
||
|
this.data = data;
|
||
|
this.timestamp = timestamp;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param {MemberEntryViewEventData} data
|
||
|
* @param {Date} [timestamp]
|
||
|
*/
|
||
|
static create(data, timestamp) {
|
||
|
return new MemberEntryViewEvent(data, timestamp || new Date);
|
||
|
}
|
||
|
};
|