23 lines
505 B
TypeScript
23 lines
505 B
TypeScript
// 公会权限
|
|
import { readJsonFile, parseNumberList } from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
|
|
export interface DicGuildAuth {
|
|
|
|
// id
|
|
readonly id: number;
|
|
// 权限 TODO 策划字段未定
|
|
readonly auths: number[];
|
|
|
|
}
|
|
|
|
const str = readJsonFile(FILENAME.DIC_GUILD_AUTH);
|
|
let arr = JSON.parse(str);
|
|
|
|
export const dicGuildAuth = new Map<number, number[]>();
|
|
|
|
arr.forEach(o => {
|
|
let auths = parseNumberList(o.auths)
|
|
dicGuildAuth.set(o.id, auths);
|
|
});
|
|
arr = undefined; |