---
# System prepended metadata

title: Aksorn DB

---

# Aksorn DB

## Course

```typescript=
{
  courseId: string // Primary, UUID
  nameTh: string
  nameEn: string
  visibility: 'public' | 'special'
  status: 'active' | 'inactive'
  slug: string
  descriptionTh: string
  descriptionEn: string
  objectiveTh: string // or
  objectiveEn: string
  price: decimal(10,2)
  specialPrice: decimal(10,2)
  language: string // 'en' | 'th'
  thumbnailUrl: string
  previewVideoUrl: string
  userType: 'student' | 'teacher'
  certificateId: string // UUID
  updateBy: string // Fk: User.userId
  createdAt: Date
  updatedAt: Date
  deletedAt: Date
}
```

## Certificate

## CourseLog // pending

```typescript=
{
  courseLogId: string // Primary, UUID
  courseId: string
  nameTh: string
  nameEn: string
  visibility: string // 'public' | 'special'
  status: string // 'active' | 'inactive'
  descriptionTh: string
  descriptionEn: string
  objectiveTh: string // or
  objectiveEn: string
  language: string // 'en' | 'th'
  thumbnailUrl: string
  updateBy: string // Fk: User.userId
  createdAt: Date
  updatedAt: Date
}
```

## GradeLevel

```typescript=
{
  gradeLevelId: string // Primary, UUID
  nameTh: string
  nameEn: string
  createdAt: Date
  updatedAt: Date
}
```

## CourseGradeLevel

```typescript=
{
  courseId: string // Primary, Fk
  gradeLevelId: string  // Primary, Fk
  createdAt: Date
  updatedAt: Date
}
```

## Subject

```typescript=
{
  subjectId: string // Primary, UUID
  nameTh: string
  nameEn: string
  createdAt: Date
  updatedAt: Date
}
```

## CourseSubject

```typescript=
{
  courseId: string // Primary, Fk
  subjectId: string // Primary, Fk
  createdAt: Date
  updatedAt: Date
}
```

## Category

```typescript=
{
  categoryId: string // Primary, UUID
  nameTh: string
  nameEn: string
  createdAt: Date
  updatedAt: Date
}
```

## SubCategory

```typescript=
{
  subCategoryId: string // Primary, UUID
  categoryId: string // Fk:Category.id
  nameTh: string
  nameEn: string
  createdAt: Date
  updatedAt: Date
}
```

## CourseSubCategory

```typescript=
  courseId: string // Primary, Fk
  subCategoryId: string // Primary, Fk
  createdAt: Date
  updatedAt: Date
```

 ---
 
 # Next Sprint
 
## CourseInstructor

```typescript=
{
  courseId: string // Primary, UUID
  instructorId: string // Primary, UUID
  createdAt: Date
  updatedAt: Date
}
```


## Instructor

```typescript=
{
  instructorId: string // Primary, UUID
  nameTh: string
  nameEn: string
  createdAt: Date
  updatedAt: Date
}
```

## CourseSession

```typescript=
{
  courseSessionId: string // Primary, UUID
  courseId: string // Fk: Course.id
  createdAt: Date
  updatedAt: Date
}
```

## CourseSection

```typescript=
{
  courseSectionId: string // Primary, UUID
  courseId: string // Fk: CourseSession.id
  createdAt: Date
  updatedAt: Date
}
```

## CourseSectionContent

```typescript=
{
  courseSectionContentId: string // Primary, UUID
  courseSectionId: string // Fk: CourseSession.id
  createdAt: Date
  updatedAt: Date
}
```
