mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 08:33:09 +02:00
2470afaa2e
* wip * Update CHANGELOG.md * wip * wip * wip * Update create.ts * wip * wip * Update CHANGELOG.md * wip * wip * wip * wip * wip * wip * wip * Update CHANGELOG.md * wip * wip * Update delete.ts * Update delete.ts * wip * wip * wip * Update account-info.vue * wip * wip * Update settings.vue * Update user-info.vue * wip * Update show-file.ts * Update show-user.ts * wip * wip * Update delete.ts * wip * wip * Update overview.moderators.vue * Create 1673500412259-Role.js * wip * wip * Update roles.vue * 色 * Update roles.vue * integrate silence * wip * wip
66 lines
1.2 KiB
TypeScript
66 lines
1.2 KiB
TypeScript
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
|
import { id } from '../id.js';
|
|
|
|
@Entity()
|
|
export class Role {
|
|
@PrimaryColumn(id())
|
|
public id: string;
|
|
|
|
@Column('timestamp with time zone', {
|
|
comment: 'The created date of the Role.',
|
|
})
|
|
public createdAt: Date;
|
|
|
|
@Column('timestamp with time zone', {
|
|
comment: 'The updated date of the Role.',
|
|
})
|
|
public updatedAt: Date;
|
|
|
|
@Column('timestamp with time zone', {
|
|
comment: 'The last used date of the Role.',
|
|
})
|
|
public lastUsedAt: Date;
|
|
|
|
@Column('varchar', {
|
|
length: 256,
|
|
})
|
|
public name: string;
|
|
|
|
@Column('varchar', {
|
|
length: 1024,
|
|
})
|
|
public description: string;
|
|
|
|
@Column('varchar', {
|
|
length: 256, nullable: true,
|
|
})
|
|
public color: string | null;
|
|
|
|
@Column('boolean', {
|
|
default: false,
|
|
})
|
|
public isPublic: boolean;
|
|
|
|
@Column('boolean', {
|
|
default: false,
|
|
})
|
|
public isModerator: boolean;
|
|
|
|
@Column('boolean', {
|
|
default: false,
|
|
})
|
|
public isAdministrator: boolean;
|
|
|
|
@Column('boolean', {
|
|
default: false,
|
|
})
|
|
public canEditMembersByModerator: boolean;
|
|
|
|
@Column('jsonb', {
|
|
default: { },
|
|
})
|
|
public options: Record<string, {
|
|
useDefault: boolean;
|
|
value: any;
|
|
}>;
|
|
}
|