chore: complete learning module
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { Column, Entity, ManyToOne } from "typeorm";
|
||||
|
||||
import { Learning } from "./learning.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { User } from "../../users/entities/user.entity";
|
||||
|
||||
@Entity()
|
||||
export class LearningProgress extends BaseEntity {
|
||||
@ManyToOne(() => User, (user) => user.learningProgress)
|
||||
user: User;
|
||||
|
||||
@ManyToOne(() => Learning, (learning) => learning.learningProgress)
|
||||
learning: Learning;
|
||||
|
||||
@Column({ type: "timestamp", default: () => "CURRENT_TIMESTAMP" })
|
||||
watchedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user