29 lines
791 B
Java
29 lines
791 B
Java
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.mapping.Document;
|
|
|
|
@Data
|
|
@Builder
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@EqualsAndHashCode(callSuper = false)
|
|
@Document(collection = "disciplinas")
|
|
@CompoundIndex(name = "estudante_nome_idx", def = "{estudanteId: 1, nome: 1}")
|
|
public class Disciplina extends EntidadeAuditoria {
|
|
|
|
@Id
|
|
private String id;
|
|
private String estudanteId;
|
|
private String nome;
|
|
private String professor;
|
|
private String sala;
|
|
private String cor;
|
|
}
|