Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4기 한승원] URL Shortener 과제 PR입니다. #48

Open
wants to merge 20 commits into
base: seungwon
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style : 포맷 수정
  • Loading branch information
SW-H committed Oct 9, 2023
commit a821e9a2e0de649ec84caa77b2ba321f2a2178a8
Original file line number Diff line number Diff line change
@@ -17,14 +17,17 @@
@Getter
public class Url {

private static final int KEY_MAX_LENGTH = 7;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String originalUrl;

@Column(unique = true)
private String shortUrlKey;

private static final int KEY_MAX_LENGTH = 7;

public Url(String originalUrl) {
if (!isValid(originalUrl)) {
throw new InvalidUrlException();