REFACTOR: Remove `Discourse.Model`

REFACTOR: Remove Discourse.Model

diff --git a/app/assets/javascripts/admin/models/admin-dashboard.js.es6 b/app/assets/javascripts/admin/models/admin-dashboard.js.es6
index 20cdbe2772..756de2cc09 100644
--- a/app/assets/javascripts/admin/models/admin-dashboard.js.es6
+++ b/app/assets/javascripts/admin/models/admin-dashboard.js.es6
@@ -1,4 +1,5 @@
 import { ajax } from "discourse/lib/ajax";
+import EmberObject from "@ember/object";
 
 const GENERAL_ATTRIBUTES = [
   "updated_at",
@@ -6,7 +7,7 @@ const GENERAL_ATTRIBUTES = [
   "release_notes_link"
 ];
 
-const AdminDashboard = Discourse.Model.extend({});
+const AdminDashboard = EmberObject.extend({});
 
 AdminDashboard.reopenClass({
   fetch() {
diff --git a/app/assets/javascripts/admin/models/backup-status.js.es6 b/app/assets/javascripts/admin/models/backup-status.js.es6
index b31d1cb176..62c360b532 100644
--- a/app/assets/javascripts/admin/models/backup-status.js.es6
+++ b/app/assets/javascripts/admin/models/backup-status.js.es6
@@ -1,7 +1,8 @@
 import discourseComputed from "discourse-common/utils/decorators";
 import { not } from "@ember/object/computed";
+import EmberObject from "@ember/object";
 
-export default Discourse.Model.extend({
+export default EmberObject.extend({
   restoreDisabled: not("restoreEnabled"),
 
   @discourseComputed("allowRestore", "isOperationRunning")
diff --git a/app/assets/javascripts/admin/models/backup.js.es6 b/app/assets/javascripts/admin/models/backup.js.es6
index 7cd151378a..882173300a 100644
--- a/app/assets/javascripts/admin/models/backup.js.es6
+++ b/app/assets/javascripts/admin/models/backup.js.es6
@@ -1,7 +1,8 @@
 import { ajax } from "discourse/lib/ajax";
 import { extractError } from "discourse/lib/ajax-error";
+import EmberObject from "@ember/object";
 
-const Backup = Discourse.Model.extend({
+const Backup = EmberObject.extend({
   destroy() {
     return ajax("/admin/backups/" + this.filename, { type: "DELETE" });
   },
diff --git a/app/assets/javascripts/admin/models/color-scheme-color.js.es6 b/app/assets/javascripts/admin/models/color-scheme-color.js.es6
index d023295ce5..0d984c77a6 100644
--- a/app/assets/javascripts/admin/models/color-scheme-color.js.es6
+++ b/app/assets/javascripts/admin/models/color-scheme-color.js.es6
@@ -4,8 +4,9 @@ import {
   on
 } from "discourse-common/utils/decorators";
 import { propertyNotEqual } from "discourse/lib/computed";
+import EmberObject from "@ember/object";
 
-const ColorSchemeColor = Discourse.Model.extend({
+const ColorSchemeColor = EmberObject.extend({
   @on("init")
   startTrackingChanges() {
     this.set("originals", { hex: this.hex || "FFFFFF" });
diff --git a/app/assets/javascripts/admin/models/color-scheme.js.es6 b/app/assets/javascripts/admin/models/color-scheme.js.es6
index 5d0550d2e0..8486002386 100644
--- a/app/assets/javascripts/admin/models/color-scheme.js.es6
+++ b/app/assets/javascripts/admin/models/color-scheme.js.es6
@@ -2,8 +2,9 @@ import discourseComputed from "discourse-common/utils/decorators";
 import { not } from "@ember/object/computed";
 import { ajax } from "discourse/lib/ajax";
 import ColorSchemeColor from "admin/models/color-scheme-color";
+import EmberObject from "@ember/object";
 
-const ColorScheme = Discourse.Model.extend(Ember.Copyable, {
+const ColorScheme = EmberObject.extend(Ember.Copyable, {
   init() {
     this._super(...arguments);
 
diff --git a/app/assets/javascripts/admin/models/email-log.js.es6 b/app/assets/javascripts/admin/models/email-log.js.es6
index f1ac52ac8d..c2eaaa26e6 100644
--- a/app/assets/javascripts/admin/models/email-log.js.es6
+++ b/app/assets/javascripts/admin/models/email-log.js.es6
@@ -1,7 +1,8 @@
 import { ajax } from "discourse/lib/ajax";
 import AdminUser from "admin/models/admin-user";
+import EmberObject from "@ember/object";
 
-const EmailLog = Discourse.Model.extend({});
+const EmailLog = EmberObject.extend({});
 
 EmailLog.reopenClass({
   create(attrs) {
diff --git a/app/assets/javascripts/admin/models/email-preview.js.es6 b/app/assets/javascripts/admin/models/email-preview.js.es6
index b8585d9080..42b7ab5878 100644
--- a/app/assets/javascripts/admin/models/email-preview.js.es6
+++ b/app/assets/javascripts/admin/models/email-preview.js.es6
@@ -1,5 +1,7 @@
 import { ajax } from "discourse/lib/ajax";
-const EmailPreview = Discourse.Model.extend({});
+import EmberObject from "@ember/object";
+
+const EmailPreview = EmberObject.extend({});
 
 export function oneWeekAgo() {
   return moment()
diff --git a/app/assets/javascripts/admin/models/email-settings.js.es6 b/app/assets/javascripts/admin/models/email-settings.js.es6
index e1d838463e..1730aae7c9 100644
--- a/app/assets/javascripts/admin/models/email-settings.js.es6
+++ b/app/assets/javascripts/admin/models/email-settings.js.es6
@@ -1,5 +1,7 @@
 import { ajax } from "discourse/lib/ajax";
-const EmailSettings = Discourse.Model.extend({});
+import EmberObject from "@ember/object";
+
+const EmailSettings = EmberObject.extend({});
 
 EmailSettings.reopenClass({
   find: function() {
diff --git a/app/assets/javascripts/admin/models/incoming-email.js.es6 b/app/assets/javascripts/admin/models/incoming-email.js.es6
index fd9d68730b..8d46429a1d 100644
--- a/app/assets/javascripts/admin/models/incoming-email.js.es6
+++ b/app/assets/javascripts/admin/models/incoming-email.js.es6
@@ -1,7 +1,8 @@
 import { ajax } from "discourse/lib/ajax";
 import AdminUser from "admin/models/admin-user";
+import EmberObject from "@ember/object";
 
-const IncomingEmail = Discourse.Model.extend({});
+const IncomingEmail = EmberObject.extend({});
 
 IncomingEmail.reopenClass({
   create(attrs) {
diff --git a/app/assets/javascripts/admin/models/permalink.js.es6 b/app/assets/javascripts/admin/models/permalink.js.es6
index 9019bdbc30..b86e931692 100644
--- a/app/assets/javascripts/admin/models/permalink.js.es6
+++ b/app/assets/javascripts/admin/models/permalink.js.es6
@@ -1,5 +1,7 @@
 import { ajax } from "discourse/lib/ajax";
-const Permalink = Discourse.Model.extend({
+import EmberObject from "@ember/object";
+
+const Permalink = EmberObject.extend({
   save: function() {
     return ajax("/admin/permalinks.json", {
       type: "POST",
diff --git a/app/assets/javascripts/admin/models/report.js.es6 b/app/assets/javascripts/admin/models/report.js.es6
index bb745b1302..91a5f54002 100644
--- a/app/assets/javascripts/admin/models/report.js.es6
+++ b/app/assets/javascripts/admin/models/report.js.es6
@@ -17,7 +17,7 @@ import { renderAvatar } from "discourse/helpers/user-avatar";
 // and you want to ensure cache is reset
 export const SCHEMA_VERSION = 4;
 
-const Report = Discourse.Model.extend({
+const Report = EmberObject.extend({
   average: false,
   percent: false,
   higher_is_better: true,
diff --git a/app/assets/javascripts/admin/models/screened-email.js.es6 b/app/assets/javascripts/admin/models/screened-email.js.es6
index 0d20f2c7d1..ea72510551 100644
--- a/app/assets/javascripts/admin/models/screened-email.js.es6
+++ b/app/assets/javascripts/admin/models/screened-email.js.es6
@@ -1,7 +1,8 @@
 import discourseComputed from "discourse-common/utils/decorators";
 import { ajax } from "discourse/lib/ajax";
+import EmberObject from "@ember/object";
 
-const ScreenedEmail = Discourse.Model.extend({
+const ScreenedEmail = EmberObject.extend({
   @discourseComputed("action")
   actionName(action) {
     return I18n.t("admin.logs.screened_actions." + action);
diff --git a/app/assets/javascripts/admin/models/screened-ip-address.js.es6 b/app/assets/javascripts/admin/models/screened-ip-address.js.es6
index e2b60a2108..bfac17d86c 100644
--- a/app/assets/javascripts/admin/models/screened-ip-address.js.es6
+++ b/app/assets/javascripts/admin/models/screened-ip-address.js.es6
@@ -1,8 +1,9 @@
 import discourseComputed from "discourse-common/utils/decorators";
 import { equal } from "@ember/object/computed";
 import { ajax } from "discourse/lib/ajax";
+import EmberObject from "@ember/object";
 
-const ScreenedIpAddress = Discourse.Model.extend({
+const ScreenedIpAddress = EmberObject.extend({

[... diff too long, it was truncated ...]

GitHub sha: f03edb36