mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 02:42:45 +00:00
55 lines
1.0 KiB
TypeScript
55 lines
1.0 KiB
TypeScript
import * as mongoose from "mongoose";
|
|
const { Schema } = mongoose;
|
|
|
|
const AnonymizedRepositorySchema = new Schema({
|
|
repoId: {
|
|
type: String,
|
|
index: { unique: true },
|
|
},
|
|
status: {
|
|
type: String,
|
|
default: "preparing",
|
|
},
|
|
errorMessage: String,
|
|
anonymizeDate: Date,
|
|
lastView: Date,
|
|
pageView: Number,
|
|
accessToken: String,
|
|
owner: mongoose.Schema.Types.ObjectId,
|
|
conference: String,
|
|
source: {
|
|
type: { type: String },
|
|
branch: String,
|
|
commit: String,
|
|
repositoryId: String,
|
|
repositoryName: String,
|
|
accessToken: String,
|
|
},
|
|
originalFiles: mongoose.Schema.Types.Mixed,
|
|
options: {
|
|
terms: [String],
|
|
expirationMode: { type: String },
|
|
expirationDate: Date,
|
|
update: Boolean,
|
|
image: Boolean,
|
|
pdf: Boolean,
|
|
notebook: Boolean,
|
|
link: Boolean,
|
|
page: Boolean,
|
|
pageSource: {
|
|
branch: String,
|
|
path: String,
|
|
},
|
|
},
|
|
dateOfEntry: {
|
|
type: Date,
|
|
default: new Date(),
|
|
},
|
|
size: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
});
|
|
|
|
export default AnonymizedRepositorySchema;
|