개발 진행하면서 업데이트 예정
userId: 회원가입 시 아이디
teamMemberId: 팀 내부에서의 아이디
유데미 강의 API

강의 더미 데이터 (분야별로 5개정도..?) crud
퍼블리싱 ⇒ crud ⇒ 프론트 연결, 기능
유저 + 매칭(api + action or routehandler) ⇒ 프론트 연동
스터디 관련
강의 관련
마이페이지 관련 (팔로우, 팔로잉, 평가태그, 스터디 평가 , 관심목록 (강의, 스터디) 프로필 수정
api 형태 / 다음 미팅 전까지
user = {
_id: string; // userId로
authProviderId:string;
profileImageUrl?:string;
name:string;
nickname:string;
email:string; // 카카오 로그인된 이메일
age?: {age:number; isVisible: boolean;},
gender?:{gender:string; isVisible: boolean;},
location?{location:string; isVisible: boolean;},
favorite: [
{
field: string;
career: string;
}
]
progressWay: "ONLINE" | "OFFLINE" | "BOTH"
mood: string[];
}
// 스터디 평가, 역할 태그, 팔로잉, 팔로워 우짬? 매칭 정보 따로
// 현재
user = {
accessToken: { type: String }, // 없어도 될 것 같은데 일단 저장해놓음
name: { type: String, required: true }, //github
nickname: { type: String, required: true }, //github
email: { type: String, default: "" }, //github
profileImageUrl: String, //github
age: { type: String, default: "" },
ageIsVisible: { type: Boolean, default: false }, // 이건.... age로 묶어서 어떻게 인풋 네임을 정해야하나...~ 싶어서 각자 씀요
gender: { type: String, default: "" },
genderIsVisible: { type: Boolean, default: false },
authProvider: { type: String, enum: ["github"], default: "github" },
}
import mongoose from "mongoose";
const matchingSchema = new mongoose.Schema(
{
userEmail: { type: String }, // 유저별 관리하기 위해서 임시로 이메일을 추가했습니다.
levels: { type: String },
progressWay: { type: String, enum: ["online", "offline", "irrelevant"] },
locations: { type: String },
locationIsVisible: { type: Boolean, default: "false" },
moods: { type: String },
},
{ timestamps: true },
);
export const Matching = mongoose.models?.Matching || mongoose.model("Matching", matchingSchema);