Skip to content

Commit bd4f391

Browse files
committed
Finalizando primeira demanda!
1 parent 0c168a2 commit bd4f391

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
package com.helper.vavahelper.Models;
22

3+
import jakarta.persistence.*;
4+
import lombok.*;
5+
6+
@Entity
7+
@Table(name = "Agents")
8+
@Data
9+
@NoArgsConstructor
10+
@AllArgsConstructor
311
public class Agents {
412

13+
@Id
14+
@GeneratedValue(strategy = GenerationType.IDENTITY)
15+
private Integer id;
16+
17+
@Column(name = "name", unique = true, nullable = false, length = 50)
18+
private String name;
19+
20+
@Column(name = "ult_points", nullable = false)
21+
private int ultPoints;
22+
23+
@Column(name = "description", columnDefinition = "TEXT")
24+
private String description;
525
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package com.helper.vavahelper.Repositories;
22

3-
public interface AgentsRepository {
3+
import org.springframework.data.jpa.repository.JpaRepository;
4+
5+
import com.helper.vavahelper.Models.Agents;
6+
7+
public interface AgentsRepository extends JpaRepository<Agents, Integer>{
48

59
}

0 commit comments

Comments
 (0)