mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
Adjusted
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const excludeAttributes = [
|
||||
// Add here
|
||||
"description"
|
||||
];
|
||||
|
||||
const jsonbSchemas = {
|
||||
@@ -19,4 +19,19 @@ const userExclude = [
|
||||
"deleted_at",
|
||||
];
|
||||
|
||||
module.exports = { excludeAttributes, adminExclude, userExclude, jsonbSchemas };
|
||||
const computedAttributes = [
|
||||
{
|
||||
key: "memberCount",
|
||||
label: "Members",
|
||||
type: "number",
|
||||
order: 5,
|
||||
literal: `(
|
||||
SELECT CAST(COUNT(*) AS INTEGER)
|
||||
FROM "user_group_members"
|
||||
WHERE "user_group_members"."group_id" = "UserGroup"."group_id"
|
||||
AND "user_group_members"."deletedAt" IS NULL
|
||||
)`,
|
||||
},
|
||||
];
|
||||
|
||||
module.exports = { excludeAttributes, adminExclude, userExclude, jsonbSchemas, computedAttributes };
|
||||
Reference in New Issue
Block a user