mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Test Note object federation
This commit is contained in:
parent
4ced6744fa
commit
d92764d81a
7 changed files with 131 additions and 4 deletions
|
|
@ -2,6 +2,7 @@ import {
|
|||
BaseEntity,
|
||||
Column,
|
||||
Entity,
|
||||
JoinTable,
|
||||
ManyToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
} from "typeorm";
|
||||
|
|
@ -18,10 +19,11 @@ export class RawActivity extends BaseEntity {
|
|||
@PrimaryGeneratedColumn("uuid")
|
||||
id!: string;
|
||||
|
||||
@Column("json")
|
||||
@Column("jsonb")
|
||||
data!: APActivity;
|
||||
|
||||
// Any associated objects (there is typically only one)
|
||||
@ManyToMany(() => RawObject, object => object.id)
|
||||
@JoinTable()
|
||||
objects!: RawObject[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ export class RawObject extends BaseEntity {
|
|||
@PrimaryGeneratedColumn("uuid")
|
||||
id!: string;
|
||||
|
||||
@Column("json")
|
||||
@Column("jsonb")
|
||||
data!: APObject;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue