fotd ERD
Tables (8)
Chat
- chatIdx — INT — Primary key — NOT NULL
- chatRoomIdx — INT — Foreign key → ChatRoom.chatRoomIdx — NOT NULL
- userIdx — INT — Foreign key → User.userIdx — NOT NULL
- chatContent — VARCHAR(100) — NOT NULL
- createdAt — DATETIME — NOT NULL
ChatMember
- userIdx — INT — Foreign key → User.userIdx — NOT NULL
- chatRoomIdx — INT — Foreign key → ChatRoom.chatRoomIdx — NOT NULL
ChatRoom
- chatRoomIdx — INT — Primary key — NOT NULL
- userIdx — INT — Foreign key → User.userIdx — NOT NULL
- chatRoomTitle — VARCH(20) — NOT NULL
- chatRoomStatus — boolean — NOT NULL
- createdAt — DATETIME — NOT NULL
ChatRoomAlarmMember
- chatRoomIdx — VARCHAR(255) — Foreign key → ChatRoom.chatRoomIdx — NOT NULL
Comment
- commentIdx — INT — Primary key — NOT NULL
- postIdx — INT — Foreign key → Post.postIdx — NOT NULL
- userIdx — INT — Foreign key → User.userIdx — NOT NULL
- comment — VARCH(100)
- commentLike — INT — NOT NULL
- createdAt — DATETIME — NOT NULL
- updatedAt — DATETIME — NOT NULL
Post
- postIdx — INT — Primary key — NOT NULL
- userIdx — INT — Foreign key → User.userIdx — NOT NULL
- postContent — VARCH(300) — NOT NULL
- postImage — TEXT
- postLike — INT — NOT NULL
- createdAt — DATETIME — NOT NULL
- updatedAt — DATETIME — NOT NULL
PostLike
- postLikeIdx — INT — Primary key — NOT NULL
- userIdx — INT — Foreign key → User.userIdx — NOT NULL
- postIdx — INT — Foreign key → Post.postIdx — NOT NULL
User
- userIdx — INT — Primary key — NOT NULL
- email — VARCH(30) — NOT NULL
- password — VARCH(30) — NOT NULL
- nickName — VARCH(30) — NOT NULL
- longitude — DECIMAL(10, 7)
- latitude — DECIMAL(10, 7)
- profileImage — TEXT
- createdAt — DATETIME — NOT NULL
- updatedAt — DATETIME — NOT NULL