Files
team-planner/backend/src/ideas/entities/idea.entity.ts
vigdorov 85c4a36e17
Some checks reported errors
continuous-integration/drone/push Build was killed
add deploy
2025-12-31 09:50:51 +03:00

81 lines
1.5 KiB
TypeScript

import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from 'typeorm';
export enum IdeaStatus {
BACKLOG = 'backlog',
TODO = 'todo',
IN_PROGRESS = 'in_progress',
DONE = 'done',
CANCELLED = 'cancelled',
}
export enum IdeaPriority {
LOW = 'low',
MEDIUM = 'medium',
HIGH = 'high',
CRITICAL = 'critical',
}
@Entity('ideas')
export class Idea {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
title: string;
@Column({ type: 'text', nullable: true })
description: string | null;
@Column({
type: 'enum',
enum: IdeaStatus,
default: IdeaStatus.BACKLOG,
})
status: IdeaStatus;
@Column({
type: 'enum',
enum: IdeaPriority,
default: IdeaPriority.MEDIUM,
})
priority: IdeaPriority;
@Column({ type: 'varchar', length: 100, nullable: true })
module: string | null;
@Column({
name: 'target_audience',
type: 'varchar',
length: 255,
nullable: true,
})
targetAudience: string | null;
@Column({ type: 'text', nullable: true })
pain: string | null;
@Column({ name: 'ai_role', type: 'text', nullable: true })
aiRole: string | null;
@Column({ name: 'verification_method', type: 'text', nullable: true })
verificationMethod: string | null;
@Column({ type: 'varchar', length: 20, nullable: true })
color: string | null;
@Column({ type: 'int', default: 0 })
order: number;
@CreateDateColumn({ name: 'created_at' })
createdAt: Date;
@UpdateDateColumn({ name: 'updated_at' })
updatedAt: Date;
}