트렐로 서비스를 참고하여 칸반 보드 시스템을 구현하게 되었다.
내가 맡은 부분은 유저(로그인, 회원가입, 회원정보수정, 회원탈퇴) 부분과 카드 체크리스트 구현이다.
우리는 백엔드 과정이라 와이어프레임은 기능 구현에 참고가 될 정도로만 짜는 편이다.
그 뒤로는 api 명세서를 작성하고, git 셋팅을 하고, 각자 맡은 부분에 대한 entity 파일을 작성해서 관계 설정을 위해 dev 폴더에서 합치는 중이다.
import {
Column,
CreateDateColumn,
DeleteDateColumn,
Entity,
Index,
OneToMany,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm';
import { Role } from '../types/userRole.type';
import { IsEmail, IsEnum, IsString } from 'class-validator';
@Index('email', ['email'], { unique: true })
@Entity({
name: 'users',
})
export class User {
@PrimaryGeneratedColumn()
id: number;
@IsEmail({}, { message: '이메일 형식에 맞지 않습니다.' })
@Column({ type: 'varchar', unique: true, nullable: false })
email: string;
@IsString()
@Column({ type: 'varchar', select: false, nullable: false })
password: string;
@IsString()
@Column({ type: 'varchar', unique: false, nullable: false })
name: string;
@IsString()
@Column({ type: 'varchar', unique: false, nullable: true })
company: string;
@IsEnum(Role)
@Column({ type: 'enum', enum: Role, default: Role.User })
role: Role;
@CreateDateColumn()
createdAt: Date;
@UpdateDateColumn()
updatedAt: Date;
@DeleteDateColumn({ nullable: true })
deletedAt: Date;
// @OneToMany
// 작성 예정
}
관계 정리까지 끝나면 수정된 entity 코드까지 업로드할 예정이다.
'💻 > 프로젝트' 카테고리의 다른 글
팀프로젝트: 칸반(Kanban) 보드_3 (0) | 2024.03.21 |
---|---|
팀프로젝트: 칸반(Kanban) 보드 _2 (0) | 2024.03.20 |
티켓 예매 서비스_2 (0) | 2024.03.18 |
티켓 예매 서비스 (0) | 2024.03.12 |
팀플 회고 (0) | 2024.03.02 |