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;
|
|
|
|
|
2020-08-31 21:49:21 +00:00
|
|
|
@Column({ default: false })
|
2019-08-17 18:50:18 +00:00
|
|
|
isFollower: boolean;
|
|
|
|
|
2020-08-31 21:49:21 +00:00
|
|
|
@Column({ nullable: true })
|
|
|
|
displayName: string | null;
|
2019-08-17 18:50:18 +00:00
|
|
|
|
|
|
|
@Column()
|
|
|
|
inbox: string;
|
|
|
|
|
2020-08-31 21:49:21 +00:00
|
|
|
@Column({ nullable: true })
|
|
|
|
iconURL: string | null;
|
2019-08-17 18:50:18 +00:00
|
|
|
|
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[];
|
|
|
|
}
|