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