Entities added from erp-construccion: - role.entity.ts - permission.entity.ts - user-role.entity.ts - session.entity.ts - api-key.entity.ts - password-reset.entity.ts - company.entity.ts - group.entity.ts - index.ts (new) Build: Clean (0 TypeScript errors) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
654 B
TypeScript
35 lines
654 B
TypeScript
/**
|
|
* Permission Entity
|
|
* Permisos granulares del sistema
|
|
*
|
|
* @module Auth
|
|
*/
|
|
|
|
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity({ schema: 'auth', name: 'permissions' })
|
|
export class Permission {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column({ type: 'varchar', length: 100, unique: true })
|
|
code: string;
|
|
|
|
@Column({ type: 'varchar', length: 200 })
|
|
name: string;
|
|
|
|
@Column({ type: 'text', nullable: true })
|
|
description: string;
|
|
|
|
@Column({ type: 'varchar', length: 50 })
|
|
module: string;
|
|
|
|
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
createdAt: Date;
|
|
}
|