shadowfacts.net/lib/entity/Actor.ts

32 lines
597 B
TypeScript
Raw Normal View History

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