import { BaseEntity } from '../../meta/entity/base-entity.entity'; import { ENTITYTYPE_ROLE } from '../../../constant/global.constant'; import { Column, Entity } from 'typeorm'; import { Exclude } from 'class-transformer'; @Entity({ name: 'sso_role' }) export class Role extends BaseEntity { constructor() { super(); this.entity_type = ENTITYTYPE_ROLE; } @Column({ type: 'int', nullable: true }) is_system: number; @Column({ type: 'varchar', length: 250, nullable: true }) description: string; @Column({ type: 'int', nullable: true }) organization_id: number; @Exclude() copy_from_role_id: number; @Column({ type: 'int', nullable: true }) is_factory: number; @Column({ type: 'varchar', length: 250, nullable: true }) parent_type: string; @Column({ type: 'int', nullable: true }) parent_id: number; }