アイコンデコレーションのカテゴリ
This commit is contained in:
parent
1c108927ea
commit
4cdf048a7c
7 changed files with 228 additions and 49 deletions
|
|
@ -31,6 +31,11 @@ export class MiAvatarDecoration {
|
|||
})
|
||||
public description: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256,
|
||||
})
|
||||
public category: string;
|
||||
|
||||
// TODO: 定期ジョブで存在しなくなったロールIDを除去するようにする
|
||||
@Column('varchar', {
|
||||
array: true, length: 128, default: '{}',
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export const paramDef = {
|
|||
roleIdsThatCanBeUsedThisDecoration: { type: 'array', items: {
|
||||
type: 'string',
|
||||
} },
|
||||
category: { type: 'string', nullable: true },
|
||||
},
|
||||
required: ['id'],
|
||||
} as const;
|
||||
|
|
@ -45,6 +46,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
description: ps.description,
|
||||
url: ps.url,
|
||||
roleIdsThatCanBeUsedThisDecoration: ps.roleIdsThatCanBeUsedThisDecoration,
|
||||
category: ps.category ?? '',
|
||||
}, me);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
name: decoration.name,
|
||||
description: decoration.description,
|
||||
url: decoration.url,
|
||||
category: decoration.category,
|
||||
roleIdsThatCanBeUsedThisDecoration: decoration.roleIdsThatCanBeUsedThisDecoration.filter(roleId => allRoles.some(role => role.id === roleId)),
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue