shadowfacts.net/lib/entity/Actor.ts

32 lines
529 B
TypeScript

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;
@Column({ nullable: true })
publicKeyPem: string | null;
@OneToMany(type => Note, note => note.actor)
notes: Note[];
}