This commit is contained in:
2024-11-23 21:13:05 +08:00
parent 6693de3f35
commit 82e2c29937
29 changed files with 1819 additions and 27 deletions

32
src/app/repo/resource.ts Normal file
View File

@ -0,0 +1,32 @@
import { DAO, db } from "./dao";
export type ResourceType = "require" | "require-css" | "resource";
export interface Resource {
id: number;
url: string;
content: string;
base64: string;
hash: ResourceHash;
type: ResourceType;
contentType: string;
createtime: number;
updatetime?: number;
}
export interface ResourceHash {
md5: string;
sha1: string;
sha256: string;
sha384: string;
sha512: string;
}
export class ResourceDAO extends DAO<Resource> {
public tableName = "resource";
constructor() {
super();
this.table = db.table(this.tableName);
}
}