mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Use a model class for mod actions
This commit is contained in:
parent
47f124c7d6
commit
e9fb76f76d
3 changed files with 39 additions and 9 deletions
14
src/models/ModAction.ts
Normal file
14
src/models/ModAction.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import Model from "./Model";
|
||||
|
||||
export default class ModAction extends Model {
|
||||
public id: number;
|
||||
public guild_id: string;
|
||||
public case_number: number;
|
||||
public user_id: string;
|
||||
public user_name: string;
|
||||
public mod_id: string;
|
||||
public mod_name: string;
|
||||
public action_type: number;
|
||||
public audit_log_id: string;
|
||||
public created_at: string;
|
||||
}
|
7
src/models/Model.ts
Normal file
7
src/models/Model.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
export default class Model {
|
||||
constructor(props) {
|
||||
for (const key in props) {
|
||||
this[key] = props[key];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue