forked from Gustavo/FrontFocusAgenda
Piroca doce
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package com.agendaestudantil.entidade;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
||||
import org.springframework.data.mongodb.core.index.CompoundIndexes;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Document(collection = "tarefas")
|
||||
@CompoundIndexes({
|
||||
@CompoundIndex(name = "estudante_data_entrega_idx", def = "{estudanteId: 1, dataEntrega: 1}"),
|
||||
@CompoundIndex(name = "estudante_status_idx", def = "{estudanteId: 1, status: 1}")
|
||||
})
|
||||
public class Tarefa extends EntidadeAuditoria {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
private String titulo;
|
||||
private String descricao;
|
||||
private Prioridade prioridade;
|
||||
private StatusTarefa status;
|
||||
private LocalDate dataEntrega;
|
||||
private String disciplinaId;
|
||||
private String estudanteId;
|
||||
|
||||
public enum Prioridade {
|
||||
BAIXA, MEDIA, ALTA, URGENTE
|
||||
}
|
||||
|
||||
public enum StatusTarefa {
|
||||
PENDENTE, EM_ANDAMENTO, CONCLUIDA, ATRASADA
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user