-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(resources): get file md5& bunble module
- Loading branch information
Showing
16 changed files
with
755 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
enum AttachmentType { | ||
image | ||
video | ||
udio | ||
audio | ||
file | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { BaseError } from '../common/error/base-error'; | ||
|
||
export class BundleNotFoundError extends BaseError { | ||
constructor(bundleId: number) { | ||
super('BundleNotFoundError', `Bundle ${bundleId} Not Found`, 404); | ||
} | ||
} | ||
|
||
export class UpdateBundleDeniedError extends BaseError { | ||
constructor(bundleId: number) { | ||
super('UpdateBundleDeniedError', `Can Not Update Bundle ${bundleId}`, 403); | ||
} | ||
} | ||
|
||
export class DeleteBundleDeniedError extends BaseError { | ||
constructor(bundleId: number) { | ||
super('DeleteBundleDeniedError', `Can Not Delete Bundle ${bundleId}`, 403); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import { user } from "../users/users.legacy" | ||
import { material } from "../materials/materials" | ||
import { material }from "../materials/materials" | ||
|
||
model materialBundle { | ||
id Int @id @default(autoincrement()) | ||
id Int @id @default(autoincrement()) | ||
title String | ||
content String | ||
creator user @relation(fields: [creatorId], references: [id]) | ||
creator user @relation(fields: [creatorId], references: [id]) | ||
creatorId Int | ||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6) | ||
updatedAt DateTime @updatedAt() @map("updated_at") @db.Timestamptz(6) | ||
rating Float @default(0) | ||
ratingCount Int @map("rating_count")@default(0) | ||
myRating Float? @map("my_rating") | ||
commentsCount Int @map("comments_count") @default(0) | ||
materials material[] | ||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6) | ||
updatedAt DateTime @updatedAt() @map("updated_at") @db.Timestamptz(6) | ||
rating Float @default(0) | ||
ratingCount Int @default(0) @map("rating_count") | ||
myRating Float? @map("my_rating") | ||
commentsCount Int @default(0) @map("comments_count") | ||
materials materialbundlesRelation[] | ||
@@map("material_bundle") | ||
} |
Oops, something went wrong.