Skip to content

Commit

Permalink
add url entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Azeend committed May 24, 2023
1 parent 8e3f6d0 commit fa78f8a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions app/src/main/java/hexlet/code/domain/Url.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package hexlet.code.domain;

import io.ebean.Model;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.time.Instant;
import io.ebean.annotation.WhenCreated;

@Entity
public final class Url extends Model {
@Id
private long id;

private String name;

@WhenCreated
private Instant createdAt;
public Url() {
}
public Url(String name) {
this.name = name;
}
public long getId() {
return this.id;
}

public String getName() {
return this.name;
}
public Instant getCreatedAt() {
return this.createdAt;
}
}

0 comments on commit fa78f8a

Please sign in to comment.