add connections
This commit is contained in:
@@ -27,6 +27,9 @@ export type PublicConnectedAccount = Pick<
|
||||
|
||||
@Entity("connected_accounts")
|
||||
export class ConnectedAccount extends BaseClass {
|
||||
@Column()
|
||||
external_id: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@RelationId((account: ConnectedAccount) => account.user)
|
||||
user_id: string;
|
||||
@@ -41,16 +44,16 @@ export class ConnectedAccount extends BaseClass {
|
||||
access_token: string;
|
||||
|
||||
@Column({ select: false })
|
||||
friend_sync: boolean;
|
||||
friend_sync: boolean = false;
|
||||
|
||||
@Column()
|
||||
name: string;
|
||||
|
||||
@Column({ select: false })
|
||||
revoked: boolean;
|
||||
revoked: boolean = false;
|
||||
|
||||
@Column({ select: false })
|
||||
show_activity: boolean;
|
||||
show_activity: boolean = true;
|
||||
|
||||
@Column()
|
||||
type: string;
|
||||
@@ -59,5 +62,17 @@ export class ConnectedAccount extends BaseClass {
|
||||
verified: boolean;
|
||||
|
||||
@Column({ select: false })
|
||||
visibility: number;
|
||||
visibility: boolean = true;
|
||||
|
||||
@Column({ type: "simple-array" })
|
||||
integrations: string[];
|
||||
|
||||
@Column({ type: "simple-json", name: "metadata" })
|
||||
metadata_: any;
|
||||
|
||||
@Column()
|
||||
metadata_visibility: boolean = true;
|
||||
|
||||
@Column()
|
||||
two_way_link: boolean = false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Column, Entity } from "typeorm";
|
||||
import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass";
|
||||
|
||||
@Entity("connection_config")
|
||||
export class ConnectionConfigEntity extends BaseClassWithoutId {
|
||||
@PrimaryIdColumn()
|
||||
key: string;
|
||||
|
||||
@Column({ type: "simple-json", nullable: true })
|
||||
value: number | boolean | null | string | Date | undefined;
|
||||
}
|
||||
@@ -27,6 +27,7 @@ export * from "./Channel";
|
||||
export * from "./ClientRelease";
|
||||
export * from "./Config";
|
||||
export * from "./ConnectedAccount";
|
||||
export * from "./ConnectionConfigEntity";
|
||||
export * from "./EmbedCache";
|
||||
export * from "./Emoji";
|
||||
export * from "./Encryption";
|
||||
|
||||
Reference in New Issue
Block a user