import { ENTITYTYPE_USRROLMAP } from 'src/constant/global.constant'; import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; @Entity({ name: 'sso_user_role_mapping' }) export class UserRoleMapping { constructor(user_id: number, role_id: number) { this.user_id = user_id; this.role_id = role_id; this.entity_type = ENTITYTYPE_USRROLMAP; } @PrimaryGeneratedColumn() id: number; @Column({ type: 'varchar', nullable: true }) entity_type: string; @Column({ type: 'bigint', nullable: true }) user_id: number; @Column({ type: 'bigint', nullable: true }) role_id: number; @Column({ type: 'int', nullable: true }) organization_id: number; @Column({ type: 'int', nullable: true }) is_default: number; @Column({ type: 'varchar', nullable: true }) appcode: string; @Column({ name: 'level_id', type: 'varchar', length: 100, nullable: true }) level_id: string; @Column({ name: 'level_type', type: 'varchar', length: 100, nullable: true }) level_type: string; }