@shisyamo4131/air-guard-v2-schemas 2.2.2 → 2.2.3-dev.1
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.
- package/package.json +2 -2
- package/src/Company.js +6 -3
- package/src/User.js +14 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shisyamo4131/air-guard-v2-schemas",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3-dev.1",
|
|
4
4
|
"description": "Schemas for AirGuard V2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"release:major": "npm version major && npm publish"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@shisyamo4131/air-firebase-v2": "^2.
|
|
42
|
+
"@shisyamo4131/air-firebase-v2": "^2.1.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@holiday-jp/holiday_jp": "^2.5.1"
|
package/src/Company.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* Company Model
|
|
1
|
+
/**
|
|
2
|
+
* Company Model
|
|
3
|
+
* @version 1.1.0
|
|
3
4
|
* @author shisyamo4131
|
|
4
|
-
|
|
5
|
+
* @update 2025-11-23 Set `usePrefix` to false.
|
|
6
|
+
*/
|
|
5
7
|
import FireModel from "@shisyamo4131/air-firebase-v2";
|
|
6
8
|
import { defField } from "./parts/fieldDefinitions.js";
|
|
7
9
|
import { defAccessor } from "./parts/accessorDefinitions.js";
|
|
@@ -70,6 +72,7 @@ const classProps = {
|
|
|
70
72
|
export default class Company extends FireModel {
|
|
71
73
|
static className = "会社";
|
|
72
74
|
static collectionPath = "Companies";
|
|
75
|
+
static usePrefix = false;
|
|
73
76
|
static useAutonumber = false;
|
|
74
77
|
static logicalDelete = false;
|
|
75
78
|
static classProps = classProps;
|
package/src/User.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
* User Model
|
|
1
|
+
/**
|
|
2
|
+
* User Model
|
|
3
|
+
* @version 1.1.0
|
|
3
4
|
* @author shisyamo4131
|
|
4
|
-
|
|
5
|
+
* @update 2025-11-23 Set `usePrefix` to false and added `companyId` property.
|
|
6
|
+
*
|
|
7
|
+
* @prop {string} email - User's email address.
|
|
8
|
+
* @prop {string} displayName - User's display name.
|
|
9
|
+
* @prop {string} [employeeId] - Employee ID (not required as some users may not be employees).
|
|
10
|
+
* @prop {Array<string>} roles - User roles/permissions.
|
|
11
|
+
* @prop {boolean} disabled - Indicates if the user is disabled.
|
|
12
|
+
* @prop {string} companyId - ID of the associated company.
|
|
13
|
+
*/
|
|
5
14
|
import FireModel from "@shisyamo4131/air-firebase-v2";
|
|
6
15
|
import { defField } from "./parts/fieldDefinitions.js";
|
|
7
16
|
|
|
8
17
|
const classProps = {
|
|
9
18
|
email: defField("email", { required: true }),
|
|
10
19
|
displayName: defField("displayName", { required: true }),
|
|
11
|
-
/**
|
|
12
|
-
* employee-id
|
|
13
|
-
* - 従業員には該当しないユーザーが存在する可能性もあるため、必須にはしない。
|
|
14
|
-
*/
|
|
15
20
|
employeeId: defField("oneLine", { label: "従業員ID", hidden: true }),
|
|
16
21
|
roles: {
|
|
17
22
|
type: Array,
|
|
@@ -26,11 +31,13 @@ const classProps = {
|
|
|
26
31
|
required: false,
|
|
27
32
|
hidden: true,
|
|
28
33
|
}),
|
|
34
|
+
companyId: defField("oneLine", { hidden: true, required: true }),
|
|
29
35
|
};
|
|
30
36
|
|
|
31
37
|
export default class User extends FireModel {
|
|
32
38
|
static className = "ユーザー";
|
|
33
39
|
static collectionPath = "Users";
|
|
40
|
+
static usePrefix = false;
|
|
34
41
|
static classProps = classProps;
|
|
35
42
|
|
|
36
43
|
static headers = [
|