---
# System prepended metadata

title: 後端架構
tags: [UniCourse]

---

---
tags: UniCourse
---

# 後端架構

[ToC]

## Req

- Auth
- Account
- Profile
- Course
- Post
- Comment

## (Maybe) Not MVP

- Email
- Badge
- Permission

## API

- Auth
- Account
- Profile
- Course
- Post
- Comment

## Model / Service

- User
    - id
    - username
    - display
    - email
    - std_email
    - school
    - department
    - courses
    - avatar
    - verified
    - exp
    - (badges)
    - (perm)
    - created_at
    - updated_at
- Course
    - year
    - term
    - name
    - teachers
    - department
    - credit
    - code
    - serial
    - group
    - quota
    - schedule
    - programs
    - featured
    - tags
    - description
    - hours
    - goals
    - syllabus
    - methodologies
    - ...
- Post
- Comment
- Email / Notification

## 分工

- Post
- Comment
- Course
- User (Model)
    - Auth
    - Account
    - Profile
- *Email (Service)*

## Database Schema

### CourseMeta

| Column     | Type       | Comment  |
| ---------- | ---------- | -------- |
| course_id  | NUMBER     | Primary* |
| year       | NUMBER     | Primary  |
| term       | NUMBER     | Primary  |
| serial     | NUMBER     | Primary  |
| name       | STRING     |          |
| teachers   | \[STRING\] |          |
| department | STRING     |          |
| credit     | NUMBER     |          |
| code       | STRING     |          |
| group      | STRING     |          |
| programs   | \[STRING\] |          |
| limit      | NUMBER     |          |
| additional | NUMBER     |          |


### CourseInfo

| Column         | Type       | Comment  |
| -------------- | ---------- | -------- |
| course_info_id | NUMBER     | Primary* |
| year           | NUMBER     | Primary  |
| term           | NUMBER     | Primary  |
| serial         | NUMBER     | Primary  |
| description    | STRING     |          |
| hours          | NUMBER     |          |
| goals          | \[STRING\] |          |
| syllabus       | STRING     |          |
| prerequisite   | STRING     |          |
|                |            |          |
|                |            |          |

1. CourseTag + 課程代碼
2. CourseTag + 課程代碼 + 單位開課老師
3. CourseTag + 課程代碼 + 開課老師
4. CourseTag + 課程代碼 + 開課老師 + 開課學期 <-