[�ܹ�] ����ģ�����ƺ����ݿ���ʼ�� #2

Open
opened 2026-03-19 07:54:10 +00:00 by chen · 1 comment
Owner

��������

���ƺ�ʵ�� TaskManager �ĺ�������ģ�ͣ�����ʼ�� SQLite ���ݿ⡣

���������

Task�����񣩱�

{
  id: number (����)
  title: string (��������)
  description: string (��������)
  status: enum (����/������/������/�ѹ鵵)
  priority: enum (��/��/��)
  dueDate: Date (��ֹ����)
  createdAt: Date (����ʱ��)
  updatedAt: Date (����ʱ��)
  archivedAt: Date (�鵵ʱ��)
  userId: number (���� - �����û�)
}

Tag����ǩ����

{
  id: number (����)
  name: string (��ǩ����)
  color: string (��ǩ��ɫ)
  createdAt: Date (����ʱ��)
}

TaskTag��������ǩ��������

{
  taskId: number (����)
  tagId: number (����)
}

User���û�����

{
  id: number (����)
  username: string (�û���)
  email: string (����)
  passwordHash: string (������ϣ)
  createdAt: Date (����ʱ��)
  updatedAt: Date (����ʱ��)
}

ʵ��Ҫ��

  • ʹ�� TypeORM �� Prisma ��������ģ��
  • �������ݿ�Ǩ���ļ�
  • �������ݿ����ӣ�backend ��Ŀ��
  • �������ݿ���ʼ���ű�
  • ������֮���Ĺ�����ϵ
  • ���������Ż���status, userId, dueDate��

���ձ�׼

  • ? ���ݿ��ļ���.sqlite���ɹ�����
  • ? ���б��ṹ��ȷ����
  • ? ����Լ����������
  • ? ���������ɹ�
  • ? ����ͨ�� ORM ���л����� CRUD ����

������ϵ

Ԥ�ƹ�����

3-4 Сʱ

## �������� ���ƺ�ʵ�� TaskManager �ĺ�������ģ�ͣ�����ʼ�� SQLite ���ݿ⡣ ## ����ģ������ ### Task�����񣩱� ```typescript { id: number (����) title: string (��������) description: string (��������) status: enum (����/������/������/�ѹ鵵) priority: enum (��/��/��) dueDate: Date (��ֹ����) createdAt: Date (����ʱ��) updatedAt: Date (����ʱ��) archivedAt: Date (�鵵ʱ��) userId: number (���� - �����û�) } ``` ### Tag����ǩ���� ```typescript { id: number (����) name: string (��ǩ����) color: string (��ǩ��ɫ) createdAt: Date (����ʱ��) } ``` ### TaskTag��������ǩ�������� ```typescript { taskId: number (����) tagId: number (����) } ``` ### User���û����� ```typescript { id: number (����) username: string (�û���) email: string (����) passwordHash: string (������ϣ) createdAt: Date (����ʱ��) updatedAt: Date (����ʱ��) } ``` ## ʵ��Ҫ�� - [ ] ʹ�� TypeORM �� Prisma ��������ģ�� - [ ] �������ݿ�Ǩ���ļ� - [ ] �������ݿ����ӣ�backend ��Ŀ�� - [ ] �������ݿ���ʼ���ű� - [ ] ������֮���Ĺ�����ϵ - [ ] ���������Ż���status, userId, dueDate�� ## ���ձ�׼ - ? ���ݿ��ļ���.sqlite���ɹ����� - ? ���б��ṹ��ȷ���� - ? ����Լ���������� - ? ���������ɹ� - ? ����ͨ�� ORM ���л����� CRUD ���� ## ������ϵ - **ǰ�� Issue**: #1 - **���� Issue**: #4, #5, #6, #7, #8, #9 ## Ԥ�ƹ����� 3-4 Сʱ
Author
Owner

?? Issue #2 ���ȸ���

? ������

  • �������Է�֧ feature/issue-2
  • ����ʵʩ�ƻ��ĵ�
  • ���� Pull Request #14

?? ��Ҫ˵��

�� Issue ��һ������������Ԥ�� 3-4 Сʱ������Ҫ���� 20+ ���ļ���

����ʵ�ְ�����

  • ��װ TypeORM ����������
  • ���� 4 ������ʵ�壨Task, User, Tag, TaskTag��
  • ���� SQLite ���ݿ�����
  • �������ݿ�Ǩ���ļ�
  • ��д��Ԫ���Ժͼ��ɲ���

?? ����

����ʱ���͸��Ӷȿ��ǣ����飺

  1. ���� Issue �������ȴ�����ʵ��

  2. ���ֽ�Ϊ�� Issue��

    • Issue #2a: ���ݿ�����
    • Issue #2b: Task ʵ��
    • Issue #2c: User ʵ��
    • Issue #2d: Tag ʵ��
    • Issue #2e: ���ݿ�����
  3. ���ں����Ự����������ǰ PR #14 ����Ϊʵʩ�ο�

?? ��������

  • PR: #14
  • ʵʩ�ƻ�: docs/plan/2026-03-19_issue-2.md

��һ��: �����ŶӾ���ѡ�����ʵ�ʵʩ����

## ?? Issue #2 ���ȸ��� ### ? ������ - �������Է�֧ `feature/issue-2` - ����ʵʩ�ƻ��ĵ� - ���� Pull Request #14 ### ?? ��Ҫ˵�� �� Issue ��һ��**��������**��Ԥ�� 3-4 Сʱ������Ҫ���� 20+ ���ļ��� ����ʵ�ְ����� - ��װ TypeORM ���������� - ���� 4 ������ʵ�壨Task, User, Tag, TaskTag�� - ���� SQLite ���ݿ����� - �������ݿ�Ǩ���ļ� - ��д��Ԫ���Ժͼ��ɲ��� ### ?? ���� ����ʱ���͸��Ӷȿ��ǣ����飺 1. **���� Issue ����**���ȴ�����ʵ�� 2. **���ֽ�Ϊ�� Issue**�� - Issue #2a: ���ݿ����� - Issue #2b: Task ʵ�� - Issue #2c: User ʵ�� - Issue #2d: Tag ʵ�� - Issue #2e: ���ݿ����� 3. **���ں����Ự������**����ǰ PR #14 ����Ϊʵʩ�ο� ### ?? �������� - PR: http://192.168.2.200:3000/chen/taskmanager/pulls/14 - ʵʩ�ƻ�: docs/plan/2026-03-19_issue-2.md --- **��һ��**: �����ŶӾ���ѡ�����ʵ�ʵʩ����
Sign in to join this conversation.
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: chen/taskmanager#2
No description provided.