-
Notifications
You must be signed in to change notification settings - Fork 5
Db Schema
gyim1345 edited this page Nov 23, 2020
·
6 revisions

const user = new Schema(
{
authName: String,
authId: Number,
},
);const accountBook = new Schema(
{
accountBookId: Number,
accountBookName: String,
accountBookAuthorizedUsers: [String],
},
);const transactions = new Schema(
{
accountBookId: Number,
date: Date,
category: String,
paymentMethod: String,
description: String,
cost: Number,
tag: [String],
imageUrl: String,
author: String,
},
);const paymentMethod = new Schema(
{
name: String
},
);const category = new Schema(
{
name: String
},
);const tag = new Schema(
{
name: String
},
);const user = [{
"_id": 1,
"authName": "name",
"authId": 1234,
},]const accountBook = [{
"_id": 1,
"accountBookId": 1,
"accountBookName": 'Name',
"accountBookAuthorizedUsers": ['Name'],
},]const transactions = [{
"_id": 1,
"accountBookId": 1,
"date": "2020-01-15 14:20",
"category": "food",
"card": "naver card",
"description": "λΆμμ§μμ λ‘λ³Άμ΄ λ¨ΉμμΌ~",
"cost": 20000,
"tag": ["λΆμμ§", "λ‘λ³Άμ΄"],
"imageUrl": "https://www.asiatime.co.kr/news/data/20191217/p1065600532377147_587_thum.jpg",
"author": "name",
},]const account = [{
"_id": 1,
"name": "νλμΉ΄λ",
},{
"_id": 2,
"name": "λ€μ΄λ²νμ΄"
},]const category = [{
"_id": 1,
"name": "food"
}, {
"_id": 2,
"name": "transportation"
}, {
"_id": 3,
"name": "education"
},]const tag = [{
"_id": 1,
"name": "λΆμμ§"
}, {
"_id": 1,
"name": "λ‘λ³Άμ΄"
},]