mirror of
https://github.com/standardnotes/server
synced 2026-07-14 00:01:54 -04:00
19 lines
563 B
TypeScript
19 lines
563 B
TypeScript
import { Entity } from '../Core/Entity'
|
|
import { Result } from '../Core/Result'
|
|
import { UniqueEntityId } from '../Core/UniqueEntityId'
|
|
import { SubscriptionProps } from './SubscriptionProps'
|
|
|
|
export class Subscription extends Entity<SubscriptionProps> {
|
|
get id(): UniqueEntityId {
|
|
return this._id
|
|
}
|
|
|
|
private constructor(props: SubscriptionProps, id?: UniqueEntityId) {
|
|
super(props, id)
|
|
}
|
|
|
|
static create(props: SubscriptionProps, id?: UniqueEntityId): Result<Subscription> {
|
|
return Result.ok<Subscription>(new Subscription(props, id))
|
|
}
|
|
}
|