{
"_id": "5ca4bbc7a2dd94ee5816238c",
"createdAt": "2023-11-18 17:31:00",
"updatedAt" : "2023-11-18 17:31:00",
"deletedAt": null,
"problems": {
"3": {
"status": "solved",
"logs": [
"git add",
"git asdf",
],
"containerId": "5ca4bbc7a2dd94ee5816238e"
},
"4": {
"status": "wrong",
"logs": [
"git add",
"git asdf",
],
"containerId": "5ca4bbc7a2dd94ee58162390"
}
}
}
session.problems[”3”]?.containerId
{
"_id": {
"$oid": "6571dbbd2a0d610feaa41520"
},
"problems": {
"3": {
"status": "solved",
"logs": [
{
"mode": "command",
"message": "git status",
"_id": {
"$oid": "6571dc132a0d610feaa41676"
}
},
{
"mode": "command",
"message": "git add README.md",
"_id": {
"$oid": "6571dc192a0d610feaa4167c"
}
},
{
"mode": "command",
"message": "git add docs/plan.md",
"_id": {
"$oid": "6571dc202a0d610feaa4168d"
}
}
],
"containerId": "43d45126-737c-4110-b425-46ed394e40cf",
"graph": "410b79bff71d5e6ab7ae2d9a94e204c0f83a961e\\n\\ndocs: plan.md\\nHEAD -> main",
"_id": {
"$oid": "6571dc132a0d610feaa41675"
}
},
"4": {
"status": "solving",
"logs": [],
"containerId": "b25d181c-3beb-49c2-a6f2-4be74ba8b20e",
"graph": "",
"_id": {
"$oid": "6571dbe82a0d610feaa415e4"
}
},
"5": {
"status": "solving",
"logs": [],
"containerId": "",
"graph": "",
"_id": {
"$oid": "6571dc082a0d610feaa41659"
}
},
"9": {
"status": "solving",
"logs": [
{
"mode": "command",
"message": "git commit -m '1'",
"_id": {
"$oid": "6571dbdf2a0d610feaa415c5"
}
}
],
"containerId": "0151d7d6-40ca-467c-b3eb-3137ad39461d",
"graph": "0ee6f38e438211833c46d42b6acf087ba63d2cf0\\n7f0f87852fa8225bfa5862b440e48480c339d2aa\\n회원가입 테스트 코드 작성\\nHEAD -> feat/somethingB\\n7f0f87852fa8225bfa5862b440e48480c339d2aa\\n55f7aab2f31287f6bb159731e5824566c02b582b\\n회원가입 기능 구현\\n\\n55f7aab2f31287f6bb159731e5824566c02b582b\\n9bd1b91fba0c4b644e673a85cefbbf52b51b03e4\\nA 기능 구현\\nmain, feat/somethingA\\n9bd1b91fba0c4b644e673a85cefbbf52b51b03e4\\n\\nInitial commit",
"_id": {
"$oid": "6571dbdf2a0d610feaa415c4"
}
},
"12": {
"status": "solving",
"logs": [
{
"mode": "command",
"message": "git log",
"_id": {
"$oid": "6571dbbd2a0d610feaa41527"
}
}
],
"containerId": "7b650d33-dc7e-42ca-9502-363cc8747186",
"graph": "38bafc899bb9257644ac616ac0075431d8481e83\\nc01511a8d88b4355d754406ef6ec20aa49d69c5b\\n버그 수정\\nHEAD -> feat/somethingB\\nc01511a8d88b4355d754406ef6ec20aa49d69c5b\\nee0765a0f4bd5df20a595100b62c041100d64096\\n회원가입 테스트 코드 작성\\n\\nee0765a0f4bd5df20a595100b62c041100d64096\\nd342b2a90ea54333b8e04899c25b7847241a3e8f\\n회원가입 기능 구현\\n\\nd342b2a90ea54333b8e04899c25b7847241a3e8f\\ndbf627f91961b1704755be952190b29210fc8f95\\nA 기능 구현\\nmain, hotfix/fixA, feat/somethingA\\ndbf627f91961b1704755be952190b29210fc8f95\\n\\nInitial commit",
"_id": {
"$oid": "6571dbbd2a0d610feaa41522"
}
}
},
"createdAt": {
"$date": {
"$numberLong": "1701960637159"
}
},
"updatedAt": {
"$date": {
"$numberLong": "1701960741171"
}
},
"__v": {
"$numberInt": "4"
}
}
@Schema({ timestamps: true })
export class Session extends Document {
@Prop()
deletedAt: Date | null;
@Prop({
required: true,
type: Map,
of: {
status: { type: String, required: true },
logs: {
type: [
{
mode: { type: String, enum: Object.values(Action), required: true },
message: { type: String, required: true },
},
],
required: true,
},
containerId: { type: String, default: '' },
graph: { type: String, default: '' },
},
})
problems: Map<
number,
{
status: string;
logs: {
mode: ActionType;
message: string;
}[];
containerId: string;
graph: string;
}
>;
}
영속성
데이터로 저장되어야 함serving
되어야 할 정보들이다classDiagram
direction BT
class category {
varchar name
integer id
}
class keyword {
varchar keyword
integer id
}
class quiz {
varchar title
varchar description
integer categoryId
integer id
}
class quiz_keywords_keyword {
integer quizId
integer keywordId
}
quiz --> category : categoryId id
quiz_keywords_keyword --> keyword : keywordId id
quiz_keywords_keyword --> quiz : quizId id