mirror of
https://github.com/outline/outline.git
synced 2026-11-20 21:23:06 +03:00
* Upgrade Mobx * fix: Enforce MobX action boundaries * fix: Wrap static observable updates in actions * Remove iteration tests
53 lines
1012 B
TypeScript
53 lines
1012 B
TypeScript
import type { AuthenticationType } from "@shared/types";
|
|
import Collection from "./Collection";
|
|
import Document from "./Document";
|
|
import User from "./User";
|
|
import Model from "./base/Model";
|
|
import Relation from "./decorators/Relation";
|
|
|
|
class Event<T extends Model> extends Model {
|
|
static modelName = "Event";
|
|
|
|
constructor(fields: Record<string, unknown>, store: Model["store"]) {
|
|
super(fields, store);
|
|
this.initialize(fields);
|
|
}
|
|
|
|
name: string;
|
|
|
|
modelId: string | undefined;
|
|
|
|
actorIpAddress: string | null | undefined;
|
|
|
|
@Relation(() => Document)
|
|
document: Document;
|
|
|
|
documentId: string | undefined;
|
|
|
|
@Relation(() => Collection)
|
|
collection: Collection;
|
|
|
|
collectionId: string | undefined;
|
|
|
|
@Relation(() => User)
|
|
user: User;
|
|
|
|
userId: string;
|
|
|
|
@Relation(() => User)
|
|
actor: User;
|
|
|
|
actorId: string;
|
|
|
|
authType: AuthenticationType | null;
|
|
|
|
data: Partial<T> | null;
|
|
|
|
changes: {
|
|
attributes: Partial<T>;
|
|
previous: Partial<T>;
|
|
} | null;
|
|
}
|
|
|
|
export default Event;
|