velocious 1.0.99 → 1.0.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/spec/database/migration/column-exists-spec.js +28 -0
  3. package/spec/database/record/create-spec.js +14 -7
  4. package/spec/database/transactions-spec.js +8 -1
  5. package/spec/dummy/src/model-bases/account.js +67 -0
  6. package/spec/dummy/src/model-bases/authentication-token.js +108 -0
  7. package/spec/dummy/src/model-bases/project-detail.js +101 -0
  8. package/spec/dummy/src/model-bases/project-translation.js +124 -0
  9. package/spec/dummy/src/model-bases/project.js +178 -0
  10. package/spec/dummy/src/model-bases/task.js +117 -0
  11. package/spec/dummy/src/model-bases/user.js +170 -0
  12. package/spec/dummy/src/models/account.js +2 -2
  13. package/spec/dummy/src/models/authentication-token.js +2 -2
  14. package/spec/dummy/src/models/project-detail.js +2 -2
  15. package/spec/dummy/src/models/project.js +2 -2
  16. package/spec/dummy/src/models/task.js +2 -2
  17. package/spec/dummy/src/models/user.js +2 -2
  18. package/src/cli/base-command.js +1 -1
  19. package/src/configuration.js +6 -2
  20. package/src/database/drivers/base-column.js +8 -7
  21. package/src/database/drivers/base-columns-index.js +1 -1
  22. package/src/database/drivers/base-foreign-key.js +5 -5
  23. package/src/database/drivers/base-table.js +4 -4
  24. package/src/database/drivers/base.js +18 -19
  25. package/src/database/drivers/mysql/column.js +8 -0
  26. package/src/database/migration/index.js +7 -5
  27. package/src/database/pool/base.js +5 -5
  28. package/src/database/query/base.js +1 -1
  29. package/src/database/query/from-base.js +2 -4
  30. package/src/database/query/order-base.js +1 -1
  31. package/src/database/query/select-base.js +1 -1
  32. package/src/database/query/where-base.js +1 -1
  33. package/src/database/record/index.js +5 -2
  34. package/src/database/record/relationships/base.js +2 -2
  35. package/src/database/record/validators/base.js +1 -1
  36. package/src/environment-handlers/base.js +7 -7
  37. package/src/environment-handlers/node/cli/commands/generate/base-models.js +79 -24
  38. package/src/initializer.js +1 -1
  39. package/src/routes/base-route.js +1 -1
  40. package/src/testing/test.js +3 -3
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "velocious": "bin/velocious.js"
4
4
  },
5
5
  "name": "velocious",
6
- "version": "1.0.99",
6
+ "version": "1.0.101",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "lint": "eslint",
@@ -0,0 +1,28 @@
1
+ // @ts-check
2
+
3
+ import Dummy from "../../dummy/index.js"
4
+ import dummyConfiguration from "../../dummy/src/config/configuration.js"
5
+ import {describe, it} from "../../../src/testing/test.js"
6
+ import Migration from "../../../src/database/migration/index.js"
7
+
8
+ describe("database - migration", () => {
9
+ it("checks if a column exists", async () => {
10
+ await Dummy.run(async () => {
11
+ await dummyConfiguration.ensureConnections(async (dbs) => {
12
+ const migration = new Migration({
13
+ configuration: dummyConfiguration,
14
+ databaseIdentifier: "default",
15
+ db: dbs.default
16
+ })
17
+
18
+ const projectsIDExists = await migration.columnExists("projects", "id")
19
+
20
+ expect(projectsIDExists).toBe(true)
21
+
22
+ const projectsSomeNonExistingColumnExists = await migration.columnExists("projects", "some_non_existing_column")
23
+
24
+ expect(projectsSomeNonExistingColumnExists).toBe(false)
25
+ })
26
+ })
27
+ })
28
+ })
@@ -1,3 +1,5 @@
1
+ // @ts-check
2
+
1
3
  import Dummy from "../../dummy/index.js"
2
4
  import Project from "../../dummy/src/models/project.js"
3
5
  import Task from "../../dummy/src/models/task.js"
@@ -51,7 +53,7 @@ describe("Record - create", () => {
51
53
 
52
54
  expect(tasksRelationship.getPreloaded()).toBeTrue()
53
55
 
54
- const projectTasksIDs = project.tasks().loaded().map((task) => task.id())
56
+ const projectTasksIDs = project.tasksLoaded().map((task) => task.id())
55
57
 
56
58
  expect(projectTasksIDs).toEqual([task.id()])
57
59
  })
@@ -65,17 +67,17 @@ describe("Record - create", () => {
65
67
 
66
68
  await project.save()
67
69
 
68
- const tasks = project.tasks().loaded()
70
+ const tasks = project.tasksLoaded()
69
71
  const task1 = tasks.find((task) => task.name() == "Test task 1")
70
72
  const task2 = tasks.find((task) => task.name() == "Test task 2")
71
73
 
72
74
  expect(tasks.length).toEqual(2)
73
75
 
74
- expect(task1.projectId()).toEqual(project.id())
75
- expect(task1.project().id()).toEqual(project.id())
76
+ expect(task1?.projectId()).toEqual(project.id())
77
+ expect(task1?.project().id()).toEqual(project.id())
76
78
 
77
- expect(task2.projectId()).toEqual(project.id())
78
- expect(task2.project().id()).toEqual(project.id())
79
+ expect(task2?.projectId()).toEqual(project.id())
80
+ expect(task2?.project().id()).toEqual(project.id())
79
81
  })
80
82
 
81
83
  it("creates a new task with an existing project", async () => {
@@ -111,7 +113,12 @@ describe("Record - create", () => {
111
113
  throw new Error("Didnt expect to succeed")
112
114
  } catch (error) {
113
115
  expect(error).toBeInstanceOf(ValidationError)
114
- expect(error.message).toEqual("Name can't be blank")
116
+
117
+ if (error instanceof Error) {
118
+ expect(error.message).toEqual("Name can't be blank")
119
+ } else {
120
+ throw new Error(`Expected error to be an instance of Error: ${typeof error}`)
121
+ }
115
122
  }
116
123
 
117
124
  const projectsCount = await Project.count()
@@ -1,3 +1,5 @@
1
+ // @ts-check
2
+
1
3
  import Dummy from "../dummy/index.js"
2
4
  import dummyConfiguration from "../dummy/src/config/configuration.js"
3
5
  import Project from "../dummy/src/models/project.js"
@@ -26,7 +28,12 @@ describe("database - transactions", () => {
26
28
  })
27
29
  } catch (error) {
28
30
  expect(error).toBeInstanceOf(ValidationError)
29
- expect(error.message).toEqual("Name can't be blank")
31
+
32
+ if (error instanceof Error) {
33
+ expect(error.message).toEqual("Name can't be blank")
34
+ } else {
35
+ throw new Error(`'error' wasn't an 'Error': ${typeof error}`)
36
+ }
30
37
  }
31
38
  })
32
39
  })
@@ -0,0 +1,67 @@
1
+ import Record from "../../../../src/database/record/index.js"
2
+
3
+ export default class AccountBase extends Record {
4
+ /**
5
+ * @returns {number}
6
+ */
7
+ id() { return this.readAttribute("id") }
8
+
9
+ /**
10
+ * @param {number} newValue
11
+ * @returns {void}
12
+ */
13
+ setId(newValue) { return this._setColumnAttribute("id", newValue) }
14
+
15
+ /**
16
+ * @returns {boolean}
17
+ */
18
+ hasId() { return this._hasAttribute(this.id()) }
19
+
20
+ /**
21
+ * @returns {string | null}
22
+ */
23
+ name() { return this.readAttribute("name") }
24
+
25
+ /**
26
+ * @param {string | null} newValue
27
+ * @returns {void}
28
+ */
29
+ setName(newValue) { return this._setColumnAttribute("name", newValue) }
30
+
31
+ /**
32
+ * @returns {boolean}
33
+ */
34
+ hasName() { return this._hasAttribute(this.name()) }
35
+
36
+ /**
37
+ * @returns {Date | null}
38
+ */
39
+ createdAt() { return this.readAttribute("createdAt") }
40
+
41
+ /**
42
+ * @param {Date | null} newValue
43
+ * @returns {void}
44
+ */
45
+ setCreatedAt(newValue) { return this._setColumnAttribute("createdAt", newValue) }
46
+
47
+ /**
48
+ * @returns {boolean}
49
+ */
50
+ hasCreatedAt() { return this._hasAttribute(this.createdAt()) }
51
+
52
+ /**
53
+ * @returns {Date | null}
54
+ */
55
+ updatedAt() { return this.readAttribute("updatedAt") }
56
+
57
+ /**
58
+ * @param {Date | null} newValue
59
+ * @returns {void}
60
+ */
61
+ setUpdatedAt(newValue) { return this._setColumnAttribute("updatedAt", newValue) }
62
+
63
+ /**
64
+ * @returns {boolean}
65
+ */
66
+ hasUpdatedAt() { return this._hasAttribute(this.updatedAt()) }
67
+ }
@@ -0,0 +1,108 @@
1
+ import Record from "../../../../src/database/record/index.js"
2
+
3
+ export default class AuthenticationTokenBase extends Record {
4
+ /**
5
+ * @returns {number}
6
+ */
7
+ id() { return this.readAttribute("id") }
8
+
9
+ /**
10
+ * @param {number} newValue
11
+ * @returns {void}
12
+ */
13
+ setId(newValue) { return this._setColumnAttribute("id", newValue) }
14
+
15
+ /**
16
+ * @returns {boolean}
17
+ */
18
+ hasId() { return this._hasAttribute(this.id()) }
19
+
20
+ /**
21
+ * @returns {string | null}
22
+ */
23
+ userToken() { return this.readAttribute("userToken") }
24
+
25
+ /**
26
+ * @param {string | null} newValue
27
+ * @returns {void}
28
+ */
29
+ setUserToken(newValue) { return this._setColumnAttribute("userToken", newValue) }
30
+
31
+ /**
32
+ * @returns {boolean}
33
+ */
34
+ hasUserToken() { return this._hasAttribute(this.userToken()) }
35
+
36
+ /**
37
+ * @returns {number | null}
38
+ */
39
+ userId() { return this.readAttribute("userId") }
40
+
41
+ /**
42
+ * @param {number | null} newValue
43
+ * @returns {void}
44
+ */
45
+ setUserId(newValue) { return this._setColumnAttribute("userId", newValue) }
46
+
47
+ /**
48
+ * @returns {boolean}
49
+ */
50
+ hasUserId() { return this._hasAttribute(this.userId()) }
51
+
52
+ /**
53
+ * @returns {Date | null}
54
+ */
55
+ createdAt() { return this.readAttribute("createdAt") }
56
+
57
+ /**
58
+ * @param {Date | null} newValue
59
+ * @returns {void}
60
+ */
61
+ setCreatedAt(newValue) { return this._setColumnAttribute("createdAt", newValue) }
62
+
63
+ /**
64
+ * @returns {boolean}
65
+ */
66
+ hasCreatedAt() { return this._hasAttribute(this.createdAt()) }
67
+
68
+ /**
69
+ * @returns {Date | null}
70
+ */
71
+ updatedAt() { return this.readAttribute("updatedAt") }
72
+
73
+ /**
74
+ * @param {Date | null} newValue
75
+ * @returns {void}
76
+ */
77
+ setUpdatedAt(newValue) { return this._setColumnAttribute("updatedAt", newValue) }
78
+
79
+ /**
80
+ * @returns {boolean}
81
+ */
82
+ hasUpdatedAt() { return this._hasAttribute(this.updatedAt()) }
83
+
84
+ /**
85
+ * @returns {import("../models/user.js").default}
86
+ */
87
+ user() { return this.getRelationshipByName("user").loaded() }
88
+
89
+ /**
90
+ * @abstract
91
+ * @param {Record<string, any>} attributes
92
+ * @returns {import("../models/user.js").default}
93
+ */
94
+ buildUser(attributes) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
95
+
96
+ /**
97
+ * @abstract
98
+ * @returns {Promise<void>}
99
+ */
100
+ loadUser() { throw new Error("Not implemented") }
101
+
102
+ /**
103
+ * @abstract
104
+ * @param {import("../models/user.js").default} newModel
105
+ * @returns {void}
106
+ */
107
+ setUser(newModel) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
108
+ }
@@ -0,0 +1,101 @@
1
+ import Record from "../../../../src/database/record/index.js"
2
+
3
+ export default class ProjectDetailBase extends Record {
4
+ /**
5
+ * @returns {number}
6
+ */
7
+ id() { return this.readAttribute("id") }
8
+
9
+ /**
10
+ * @param {number} newValue
11
+ * @returns {void}
12
+ */
13
+ setId(newValue) { return this._setColumnAttribute("id", newValue) }
14
+
15
+ /**
16
+ * @returns {boolean}
17
+ */
18
+ hasId() { return this._hasAttribute(this.id()) }
19
+
20
+ /**
21
+ * @returns {number}
22
+ */
23
+ projectId() { return this.readAttribute("projectId") }
24
+
25
+ /**
26
+ * @param {number} newValue
27
+ * @returns {void}
28
+ */
29
+ setProjectId(newValue) { return this._setColumnAttribute("projectId", newValue) }
30
+
31
+ /**
32
+ * @returns {boolean}
33
+ */
34
+ hasProjectId() { return this._hasAttribute(this.projectId()) }
35
+
36
+ note() { return this.readAttribute("note") }
37
+
38
+ setNote(newValue) { return this._setColumnAttribute("note", newValue) }
39
+
40
+ /**
41
+ * @returns {boolean}
42
+ */
43
+ hasNote() { return this._hasAttribute(this.note()) }
44
+
45
+ /**
46
+ * @returns {Date | null}
47
+ */
48
+ createdAt() { return this.readAttribute("createdAt") }
49
+
50
+ /**
51
+ * @param {Date | null} newValue
52
+ * @returns {void}
53
+ */
54
+ setCreatedAt(newValue) { return this._setColumnAttribute("createdAt", newValue) }
55
+
56
+ /**
57
+ * @returns {boolean}
58
+ */
59
+ hasCreatedAt() { return this._hasAttribute(this.createdAt()) }
60
+
61
+ /**
62
+ * @returns {Date | null}
63
+ */
64
+ updatedAt() { return this.readAttribute("updatedAt") }
65
+
66
+ /**
67
+ * @param {Date | null} newValue
68
+ * @returns {void}
69
+ */
70
+ setUpdatedAt(newValue) { return this._setColumnAttribute("updatedAt", newValue) }
71
+
72
+ /**
73
+ * @returns {boolean}
74
+ */
75
+ hasUpdatedAt() { return this._hasAttribute(this.updatedAt()) }
76
+
77
+ /**
78
+ * @returns {import("../models/project.js").default}
79
+ */
80
+ project() { return this.getRelationshipByName("project").loaded() }
81
+
82
+ /**
83
+ * @abstract
84
+ * @param {Record<string, any>} attributes
85
+ * @returns {import("../models/project.js").default}
86
+ */
87
+ buildProject(attributes) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
88
+
89
+ /**
90
+ * @abstract
91
+ * @returns {Promise<void>}
92
+ */
93
+ loadProject() { throw new Error("Not implemented") }
94
+
95
+ /**
96
+ * @abstract
97
+ * @param {import("../models/project.js").default} newModel
98
+ * @returns {void}
99
+ */
100
+ setProject(newModel) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
101
+ }
@@ -0,0 +1,124 @@
1
+ import Record from "../../../../src/database/record/index.js"
2
+
3
+ export default class ProjectTranslationBase extends Record {
4
+ /**
5
+ * @returns {number}
6
+ */
7
+ id() { return this.readAttribute("id") }
8
+
9
+ /**
10
+ * @param {number} newValue
11
+ * @returns {void}
12
+ */
13
+ setId(newValue) { return this._setColumnAttribute("id", newValue) }
14
+
15
+ /**
16
+ * @returns {boolean}
17
+ */
18
+ hasId() { return this._hasAttribute(this.id()) }
19
+
20
+ /**
21
+ * @returns {number}
22
+ */
23
+ projectId() { return this.readAttribute("projectId") }
24
+
25
+ /**
26
+ * @param {number} newValue
27
+ * @returns {void}
28
+ */
29
+ setProjectId(newValue) { return this._setColumnAttribute("projectId", newValue) }
30
+
31
+ /**
32
+ * @returns {boolean}
33
+ */
34
+ hasProjectId() { return this._hasAttribute(this.projectId()) }
35
+
36
+ /**
37
+ * @returns {string}
38
+ */
39
+ locale() { return this.readAttribute("locale") }
40
+
41
+ /**
42
+ * @param {string} newValue
43
+ * @returns {void}
44
+ */
45
+ setLocale(newValue) { return this._setColumnAttribute("locale", newValue) }
46
+
47
+ /**
48
+ * @returns {boolean}
49
+ */
50
+ hasLocale() { return this._hasAttribute(this.locale()) }
51
+
52
+ /**
53
+ * @returns {string | null}
54
+ */
55
+ name() { return this.readAttribute("name") }
56
+
57
+ /**
58
+ * @param {string | null} newValue
59
+ * @returns {void}
60
+ */
61
+ setName(newValue) { return this._setColumnAttribute("name", newValue) }
62
+
63
+ /**
64
+ * @returns {boolean}
65
+ */
66
+ hasName() { return this._hasAttribute(this.name()) }
67
+
68
+ /**
69
+ * @returns {Date | null}
70
+ */
71
+ createdAt() { return this.readAttribute("createdAt") }
72
+
73
+ /**
74
+ * @param {Date | null} newValue
75
+ * @returns {void}
76
+ */
77
+ setCreatedAt(newValue) { return this._setColumnAttribute("createdAt", newValue) }
78
+
79
+ /**
80
+ * @returns {boolean}
81
+ */
82
+ hasCreatedAt() { return this._hasAttribute(this.createdAt()) }
83
+
84
+ /**
85
+ * @returns {Date | null}
86
+ */
87
+ updatedAt() { return this.readAttribute("updatedAt") }
88
+
89
+ /**
90
+ * @param {Date | null} newValue
91
+ * @returns {void}
92
+ */
93
+ setUpdatedAt(newValue) { return this._setColumnAttribute("updatedAt", newValue) }
94
+
95
+ /**
96
+ * @returns {boolean}
97
+ */
98
+ hasUpdatedAt() { return this._hasAttribute(this.updatedAt()) }
99
+
100
+ /**
101
+ * @returns {import("../models/project.js").default}
102
+ */
103
+ project() { return this.getRelationshipByName("project").loaded() }
104
+
105
+ /**
106
+ * @abstract
107
+ * @param {Record<string, any>} attributes
108
+ * @returns {import("../models/project.js").default}
109
+ */
110
+ buildProject(attributes) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
111
+
112
+ /**
113
+ * @abstract
114
+ * @returns {Promise<void>}
115
+ */
116
+ loadProject() { throw new Error("Not implemented") }
117
+
118
+ /**
119
+ * @abstract
120
+ * @param {import("../models/project.js").default} newModel
121
+ * @returns {void}
122
+ */
123
+ setProject(newModel) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
124
+ }
@@ -0,0 +1,178 @@
1
+ import Record from "../../../../src/database/record/index.js"
2
+
3
+ export default class ProjectBase extends Record {
4
+ /**
5
+ * @returns {number}
6
+ */
7
+ id() { return this.readAttribute("id") }
8
+
9
+ /**
10
+ * @param {number} newValue
11
+ * @returns {void}
12
+ */
13
+ setId(newValue) { return this._setColumnAttribute("id", newValue) }
14
+
15
+ /**
16
+ * @returns {boolean}
17
+ */
18
+ hasId() { return this._hasAttribute(this.id()) }
19
+
20
+ /**
21
+ * @returns {string | null}
22
+ */
23
+ creatingUserReference() { return this.readAttribute("creatingUserReference") }
24
+
25
+ /**
26
+ * @param {string | null} newValue
27
+ * @returns {void}
28
+ */
29
+ setCreatingUserReference(newValue) { return this._setColumnAttribute("creatingUserReference", newValue) }
30
+
31
+ /**
32
+ * @returns {boolean}
33
+ */
34
+ hasCreatingUserReference() { return this._hasAttribute(this.creatingUserReference()) }
35
+
36
+ /**
37
+ * @returns {Date | null}
38
+ */
39
+ createdAt() { return this.readAttribute("createdAt") }
40
+
41
+ /**
42
+ * @param {Date | null} newValue
43
+ * @returns {void}
44
+ */
45
+ setCreatedAt(newValue) { return this._setColumnAttribute("createdAt", newValue) }
46
+
47
+ /**
48
+ * @returns {boolean}
49
+ */
50
+ hasCreatedAt() { return this._hasAttribute(this.createdAt()) }
51
+
52
+ /**
53
+ * @returns {Date | null}
54
+ */
55
+ updatedAt() { return this.readAttribute("updatedAt") }
56
+
57
+ /**
58
+ * @param {Date | null} newValue
59
+ * @returns {void}
60
+ */
61
+ setUpdatedAt(newValue) { return this._setColumnAttribute("updatedAt", newValue) }
62
+
63
+ /**
64
+ * @returns {boolean}
65
+ */
66
+ hasUpdatedAt() { return this._hasAttribute(this.updatedAt()) }
67
+
68
+ /**
69
+ * @returns {string | null}
70
+ */
71
+ name() { return this._getTranslatedAttributeWithFallback("name", this._getConfiguration().getLocale()) }
72
+
73
+ /**
74
+ * @returns {string | null}
75
+ */
76
+ nameDe() { return this._getTranslatedAttributeWithFallback("name", "de") }
77
+
78
+ /**
79
+ * @returns {string | null}
80
+ */
81
+ nameEn() { return this._getTranslatedAttributeWithFallback("name", "en") }
82
+
83
+ /**
84
+ * @returns {import("../models/user.js").default}
85
+ */
86
+ creatingUser() { return this.getRelationshipByName("creatingUser").loaded() }
87
+
88
+ /**
89
+ * @abstract
90
+ * @param {Record<string, any>} attributes
91
+ * @returns {import("../models/user.js").default}
92
+ */
93
+ buildCreatingUser(attributes) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
94
+
95
+ /**
96
+ * @abstract
97
+ * @returns {Promise<void>}
98
+ */
99
+ loadCreatingUser() { throw new Error("Not implemented") }
100
+
101
+ /**
102
+ * @abstract
103
+ * @param {import("../models/user.js").default} newModel
104
+ * @returns {void}
105
+ */
106
+ setCreatingUser(newModel) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
107
+
108
+ /**
109
+ * @returns {import("velocious/src/database/query/index.js").default<import("../models/task.js").default>}
110
+ */
111
+ tasks() { return this.getRelationshipByName("tasks") }
112
+
113
+ /**
114
+ * @returns {Array<import("../models/task.js").default>}
115
+ */
116
+ tasksLoaded() { return this.getRelationshipByName("tasks").loaded() }
117
+
118
+ /**
119
+ * @abstract
120
+ * @returns {Promise<void>}
121
+ */
122
+ loadTasks() { throw new Error("Not implemented") }
123
+
124
+ /**
125
+ * @abstract
126
+ * @param {Array<import("../models/task.js").default>} newModels
127
+ * @returns {void}
128
+ */
129
+ setTasks(newModels) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
130
+
131
+ /**
132
+ * @returns {import("../models/project-detail.js").default}
133
+ */
134
+ projectDetail() { return this.getRelationshipByName("projectDetail").loaded() }
135
+
136
+ /**
137
+ * @abstract
138
+ * @param {Record<string, any>} attributes
139
+ * @returns {import("../models/project-detail.js").default}
140
+ */
141
+ buildProjectDetail(attributes) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
142
+
143
+ /**
144
+ * @abstract
145
+ * @returns {Promise<void>}
146
+ */
147
+ loadProjectDetail() { throw new Error("Not implemented") }
148
+
149
+ /**
150
+ * @abstract
151
+ * @param {import("../models/project-detail.js").default} newModel
152
+ * @returns {void}
153
+ */
154
+ setProjectDetail(newModel) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
155
+
156
+ /**
157
+ * @returns {import("velocious/src/database/query/index.js").default<import("velocious/src/database/record/index.js").default>}
158
+ */
159
+ translations() { return this.getRelationshipByName("translations") }
160
+
161
+ /**
162
+ * @returns {Array<import("velocious/src/database/record/index.js").default>}
163
+ */
164
+ translationsLoaded() { return this.getRelationshipByName("translations").loaded() }
165
+
166
+ /**
167
+ * @abstract
168
+ * @returns {Promise<void>}
169
+ */
170
+ loadTranslations() { throw new Error("Not implemented") }
171
+
172
+ /**
173
+ * @abstract
174
+ * @param {Array<import("velocious/src/database/record/index.js").default>} newModels
175
+ * @returns {void}
176
+ */
177
+ setTranslations(newModels) { throw new Error("Not implemented") } // eslint-disable-line no-unused-vars
178
+ }