Merge branch 'master' of https://github.com/fosscord/fosscord-server
This commit is contained in:
@@ -71,7 +71,7 @@ export class Invite extends BaseClassWithoutId {
|
||||
@Column({ nullable: true })
|
||||
target_user_type?: number;
|
||||
|
||||
@Column({ nullable: true})
|
||||
@Column({ nullable: true })
|
||||
vanity_url?: boolean;
|
||||
|
||||
static async joinGuild(user_id: string, code: string) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
FindConditions,
|
||||
Index,
|
||||
JoinColumn,
|
||||
JoinTable,
|
||||
ManyToMany,
|
||||
@@ -45,9 +46,11 @@ export enum MessageType {
|
||||
}
|
||||
|
||||
@Entity("messages")
|
||||
@Index(["channel_id", "id"], { unique: true })
|
||||
export class Message extends BaseClass {
|
||||
@Column({ nullable: true })
|
||||
@RelationId((message: Message) => message.channel)
|
||||
@Index()
|
||||
channel_id: string;
|
||||
|
||||
@JoinColumn({ name: "channel_id" })
|
||||
@@ -68,10 +71,13 @@ export class Message extends BaseClass {
|
||||
|
||||
@Column({ nullable: true })
|
||||
@RelationId((message: Message) => message.author)
|
||||
@Index()
|
||||
author_id: string;
|
||||
|
||||
@JoinColumn({ name: "author_id", referencedColumnName: "id" })
|
||||
@ManyToOne(() => User)
|
||||
@ManyToOne(() => User, {
|
||||
onDelete: "CASCADE",
|
||||
})
|
||||
author?: User;
|
||||
|
||||
@Column({ nullable: true })
|
||||
|
||||
@@ -10,7 +10,7 @@ export class Migration extends BaseClassWithoutId {
|
||||
@PrimaryIdAutoGenerated()
|
||||
id: number;
|
||||
|
||||
@Column({ type: 'bigint' })
|
||||
@Column({ type: "bigint" })
|
||||
timestamp: number;
|
||||
|
||||
@Column()
|
||||
|
||||
Reference in New Issue
Block a user