17 lines
396 B
TypeScript
17 lines
396 B
TypeScript
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
|
|
@Entity({ name: 'permissions' })
|
|
export class Permission {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id!: string;
|
|
|
|
@Column({ type: 'varchar', length: 120 })
|
|
code!: string;
|
|
|
|
@Column({ type: 'text' })
|
|
description!: string;
|
|
|
|
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
createdAt!: Date;
|
|
}
|