shadowfacts.net/lib/entity/Actor.ts

32 lines
504 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()
isFollower: boolean;
@Column()
displayName: string;
@Column()
inbox: string;
@Column()
iconURL: string;
@Column()
publicKeyPem: string;
@OneToMany(type => Note, note => note.actor)
notes: Note[];
}