2019-08-17 18:50:18 +00:00
|
|
|
import { Entity, PrimaryColumn, Column, OneToMany } from "typeorm";
|
|
|
|
import { ActorObject } from "../activitypub/activity";
|
|
|
|
import Note from "./Note";
|
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export default class Actor {
|
|
|
|
|
|
|
|
@PrimaryColumn()
|
|
|
|
id: string;
|
|
|
|
|
|
|
|
@Column({ type: "json" })
|
|
|
|
actorObject: ActorObject;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
isFollower: boolean;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
displayName: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
inbox: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
iconURL: string;
|
|
|
|
|
2020-04-15 16:55:16 +00:00
|
|
|
@Column({ nullable: true })
|
|
|
|
publicKeyPem: string | null;
|
2019-08-17 18:50:18 +00:00
|
|
|
|
|
|
|
@OneToMany(type => Note, note => note.actor)
|
|
|
|
notes: Note[];
|
|
|
|
}
|