Skip to content

Commit

Permalink
[Feat ✏️] 타입 모듈 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Whoknow77 committed Feb 14, 2024
1 parent 7881b6a commit 2964318
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/ErrorPage/ErrorPage.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { useNavigate } from "react-router-dom"

import { Button, Center, Img, Text } from "@chakra-ui/react"
import { User } from "api-models"

import errorgif from "@assets/images/error.gif"

const ErrorPage = () => {
const s: User = 1
console.log(s)

const navigate = useNavigate()
const goHome = () => {
navigate("/")
Expand Down
112 changes: 112 additions & 0 deletions src/types/domain/apiDomain.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
declare module "api-models" {
export interface User {
id: number
nickname: string
provider: string
email: string
password?: string
profile_image_url?: string
introduction?: string
job?: string
career?: string
github_url?: string
blog_url?: string
created_at: string
updated_at: string
deleted_at?: string
is_deleted: boolean
}

export interface UserSkills {
id: number
user_id: number
skill_id: number
}

export interface Authorization {
id: number
refresh_token: string
}

export interface Files {
id: number
type: string
url: string
}

export interface Project {
id: number
name: string
sub_name?: string
overview: string
start_date?: string
end_date?: string
description: string
// 일단 정해진 형식이 없으므로 string
troubleshooting?: string
service_url?: string
source_url?: string
created_at: string
updated_at: string
deleted_at?: string
is_deleted: boolean
view_count: number
like_count: number
}

export interface ProjectTags {
id: number
project_id: number
tag_id: number
}

export interface ProjectSkills {
id: number
project_id: number
skill_id: number
}

export interface ProjectFiles {
id: number
project_id: number
file_id: number
}

export interface ProjectMembers {
id: number
project_id: number
member_id?: number
authority: string
role: string
nickname: string
}

export interface Comment {
id: number
user_id: number
project_id: number
is_anonymous: boolean
content: string
created_at: string
updated_at: string
}

export interface Likes {
id: number
user_id: number
project_id: number
created_at: string
updated_at: string
}

export interface Skill {
id: number
name: string
icon_url?: string
}

export interface Tag {
id: number
name: string
}
}

0 comments on commit 2964318

Please sign in to comment.