mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 16:55:03 +00:00
parent
517ce4f52f
commit
7e8ffb9ee3
161 changed files with 659 additions and 534 deletions
|
@ -19,7 +19,10 @@ export class ApiLogin {
|
|||
@Column()
|
||||
expires_at: string;
|
||||
|
||||
@ManyToOne((type) => ApiUserInfo, (userInfo) => userInfo.logins)
|
||||
@ManyToOne(
|
||||
type => ApiUserInfo,
|
||||
userInfo => userInfo.logins,
|
||||
)
|
||||
@JoinColumn({ name: "user_id" })
|
||||
userInfo: ApiUserInfo;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,10 @@ export class ApiPermissionAssignment {
|
|||
@Column("simple-array")
|
||||
permissions: string[];
|
||||
|
||||
@ManyToOne((type) => ApiUserInfo, (userInfo) => userInfo.permissionAssignments)
|
||||
@ManyToOne(
|
||||
type => ApiUserInfo,
|
||||
userInfo => userInfo.permissionAssignments,
|
||||
)
|
||||
@JoinColumn({ name: "target_id" })
|
||||
userInfo: ApiUserInfo;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,15 @@ export class ApiUserInfo {
|
|||
@Column()
|
||||
updated_at: string;
|
||||
|
||||
@OneToMany((type) => ApiLogin, (login) => login.userInfo)
|
||||
@OneToMany(
|
||||
type => ApiLogin,
|
||||
login => login.userInfo,
|
||||
)
|
||||
logins: ApiLogin[];
|
||||
|
||||
@OneToMany((type) => ApiPermissionAssignment, (p) => p.userInfo)
|
||||
@OneToMany(
|
||||
type => ApiPermissionAssignment,
|
||||
p => p.userInfo,
|
||||
)
|
||||
permissionAssignments: ApiPermissionAssignment[];
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@ export class Case {
|
|||
*/
|
||||
@Column({ type: String, nullable: true }) log_message_id: string | null;
|
||||
|
||||
@OneToMany((type) => CaseNote, (note) => note.case)
|
||||
@OneToMany(
|
||||
type => CaseNote,
|
||||
note => note.case,
|
||||
)
|
||||
notes: CaseNote[];
|
||||
}
|
||||
|
|
|
@ -15,7 +15,10 @@ export class CaseNote {
|
|||
|
||||
@Column() created_at: string;
|
||||
|
||||
@ManyToOne((type) => Case, (theCase) => theCase.notes)
|
||||
@ManyToOne(
|
||||
type => Case,
|
||||
theCase => theCase.notes,
|
||||
)
|
||||
@JoinColumn({ name: "case_id" })
|
||||
case: Case;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export class Config {
|
|||
@Column()
|
||||
edited_at: string;
|
||||
|
||||
@ManyToOne((type) => ApiUserInfo)
|
||||
@ManyToOne(type => ApiUserInfo)
|
||||
@JoinColumn({ name: "edited_by" })
|
||||
userInfo: ApiUserInfo;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ export class StarboardMessage {
|
|||
@Column()
|
||||
guild_id: string;
|
||||
|
||||
@OneToOne((type) => SavedMessage)
|
||||
@OneToOne(type => SavedMessage)
|
||||
@JoinColumn({ name: "message_id" })
|
||||
message: SavedMessage;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ export class StarboardReaction {
|
|||
@Column()
|
||||
reactor_id: string;
|
||||
|
||||
@OneToOne((type) => SavedMessage)
|
||||
@OneToOne(type => SavedMessage)
|
||||
@JoinColumn({ name: "message_id" })
|
||||
message: SavedMessage;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue