Comments (6)
이것도 나쁘지 않은것 같습니다! 이대로 진행하겠습니다
사용자(참여자)의 프로필 사진도 필요로 합니다..!!
주시는김에 그냥 User관련 정보 다 주시면 감사하겠습니다~! (GET /users 처럼)
-> 그러면 Json -> 객체 생성이 더 직관적으로 가능해집니다!! (지금은 쓰레기값으로 초기화 중)
ㅋㅋ 좀 무섭네요 하하
from studygroup.
요청하신 형식으로 response 수정해서 배포했습니다 확인해주세요!
- 프로필 이미지도 추가했습니다
from studygroup.
해당 부분 구현 완료해서 다음과 같이 response 오도록 반영했습니다.
from studygroup.
재우님 질문있습니다
현재는 GROUP 선배치, PERSONAL 후배치하고 각각의 task 생성 순으로 정렬해서 response 해주는 중입니다.
flutter 단에서는 어떤 식으로 GROUP과 PERSONAL을 구분해서 아래 사진과 같이 보여주는지 궁금합니다.
제가 GROUP 선배치, PERSONAL 후배치 하는 의미가 딱히 없는 걸까요?
(현재 todomate 처럼 완료처리 된 task는 맨 뒤로 보내도록 정렬 구현할까 고민 중이어서 여쭤봤습니다.)
from studygroup.
response시 taskType에 따른 정렬 여부는 상관없을 것 같습니다.
지금의 제 프로그램 구조를 설명드리는게 더 좋을것 같네요
// task.dart
class Task {
int taskId;
String detail;
bool isDone;
}
// task_gourp.dart
class TaskGroup {
int roundParticipantId;
String taskType;
List<Task> tasks;
// add, remove, update에 관한 함수 호출하며 Tasks 관리
}
Json 데이터로 부터 객체를 만들 때에는
- taskType에 따라 Map 자료구조로 List를 만들고
- 완성된 Map을 기준으로 TaskGroup 객체를 만드는 형식을 생각해 두었습니다.
아래 모습은 3개의 TaskGroup이 있는 모습입니다
(각각 tasktype이 { "GROUP", "PERSONAL", "OTHER TASKTYPE" } => 새로운 taskType 추가 가능)
안그래도 이것을 주제로 이슈 드릴까 했었는데요,
다음과 같은 형식으로 리턴해주시면 더 좋긴합니다..! (Map을 만들 필요가 없기 때문에)
(근데 그러면 데이터베이스 형식이랑 불일치해지는 것 같길래 별도로 요청은 안드리고 제 선에서 가공해서 사용하려 했습니다)
"tasks": [
{
"roundParticipantId": 1,
"statusTag": "NONE",
"userId": 1,
"nickName": "규규",
"taskProgress": 0.7,
"taskGroups": [
{
"taskType" : "GROUP",
"tasks": [
{
"taskId": 16,
"doneYn": "Y",
"detail": "그룹태.."
}
...
]
},
{
"TaskType" : "PERSONAL",
"tasks": [
{
...
}
]
}
]
}
혹시 이 방법은 어떠신가요 하하
(taskType을 기준으로 묶어서 task들을 return)
이렇게 하면 완료된 task들에 대해서 정렬을 해도 위반되지 않고 좋을 것 같습니다 하하
이해 안되시거나 하시면 추가로 설명 드리겠습니다~
from studygroup.
혹시 이 방법은 어떠신가요 하하
약간 변형해서 다음과 같이 만들었습니다. 배포해서 반영까지 완료했는데 괜찮으신가요?
{
"success": true,
"statusCode": 200,
"message": "Success",
"data": {
"tasks": [
{
"roundParticipantId": 1,
"statusTag": "NONE",
"userId": 1,
"nickName": "규규",
"taskProgress": 0.7,
"groupTasks": [
{
"taskId": 20,
"doneYn": "N",
"taskType": "GROUP",
"detail": "string"
},
{
"taskId": 16,
"doneYn": "Y",
"taskType": "GROUP",
"detail": "그룹태스크 생성 테스트22222222222"
}
],
"personalTasks": [
{
"taskId": 18,
"doneYn": "N",
"taskType": "PERSONAL",
"detail": "string"
},
{
"taskId": 19,
"doneYn": "N",
"taskType": "PERSONAL",
"detail": "야호"
},
{
"taskId": 22,
"doneYn": "Y",
"taskType": "PERSONAL",
"detail": "test"
}
]
},
{
"roundParticipantId": 2,
"statusTag": "NONE",
"userId": 2,
"nickName": "arkady",
"taskProgress": 0.7,
"groupTasks": [
{
"taskId": 15,
"doneYn": "N",
"taskType": "GROUP",
"detail": "그룹태스크 생성 테스트"
},
{
"taskId": 35,
"doneYn": "N",
"taskType": "GROUP",
"detail": "엥 리턴값이 null이야"
}
],
"personalTasks": []
}
]
}
}
정렬 기준 => (완료하지 않은 task 선배치, 완료한 task 후배치) AND task 생성 기준 오름차순
모든 회차 참여자는 groupTasks와 personalTasks를 갖고 값이 없는 경우 빈 list를 반환
from studygroup.
Related Issues (20)
- [F] feat : 사용자 활동 날짜 갱신 API 연동 요청 HOT 1
- .
- 🔥전체 이슈 관리🔥
- 알림 전송 시 스터디의 프로필 페이지가 노출되도록 기능 구현 HOT 3
- BE 코드 리팩토링 대상 정리
- [B] refactor : 디렉토리 구조 변경 및 Converter 적용
- [Deploy] 2024/06/11 ~
- [BE] 일부 테이블에 시스템 칼럼 추가
- [BE] 각 Entity의 pk 값을 숫자가 아닌 ULID로 변경
- [BE] 인증 필터 리팩토링 및 유저 정보 캐싱
- [BE] 알림 전송 리팩토링 및 비동기 처리 확인
- [FE] 상호작용 Lazy Update 개선 HOT 8
- [FE] 프로필 이미지 편집 클릭 영역 개선
- [FE] 공지사항 생성 시간 에러 수정 요청 HOT 2
- [BE] 레이어 별로 사용할 객체 정의 및 적용 HOT 1
- [FE] 사용자 관련 API 3개 스펙 변경 요청 HOT 4
- [BE] 프로필 수정 시에 닉네임, 상태메세지 변경 안되는 버그 수정
- [BE] 회원 탈퇴 시에 모든 스터디 탈퇴하도록 로직 추가 HOT 2
- [BE] 과제 관련 레이어 전체 리팩토링
- [BE] 스터디 초대 시 500 ERROR 디버깅 및 수정 배포
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from studygroup.