Files
evrak/backend/src/projects/project.entity.ts
gitmuhammedalbayrak 9918a7556a
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
feat: add wiki, metadata, and task management
2025-11-30 16:44:38 +03:00

40 lines
933 B
TypeScript

import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, ManyToOne, JoinColumn } from 'typeorm';
import { Tenant } from '../tenants/tenant.entity';
@Entity('projects')
export class Project {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column({ type: 'uuid' })
tenant_id: string;
@ManyToOne(() => Tenant)
@JoinColumn({ name: 'tenant_id' })
tenant: Tenant;
@Column()
name: string;
@Column({ type: 'text', nullable: true })
description: string;
@Column({ type: 'text', nullable: true })
wiki_content: string;
@Column({ type: 'ltree' })
path: string;
@Column({ type: 'uuid', nullable: true })
parent_id: string;
@Column({ type: 'jsonb', default: {} })
attributes: Record<string, any>;
@CreateDateColumn({ name: 'created_at' })
createdAt: Date;
@UpdateDateColumn({ name: 'updated_at' })
updatedAt: Date;
}