parent
18d42a36e6
commit
6c47e0c59e
@ -0,0 +1,15 @@
|
||||
package cn.teammodel.dao;
|
||||
|
||||
import cn.teammodel.model.entity.school.ClassInfo;
|
||||
import com.azure.spring.data.cosmos.repository.CosmosRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author winter
|
||||
* @create 2023-12-01 16:37
|
||||
*/
|
||||
@Repository
|
||||
public interface ClassRepository extends CosmosRepository<ClassInfo, String> {
|
||||
|
||||
ClassInfo findClassByIdAndCode(String targetId, String format);
|
||||
}
|
@ -1,11 +1,10 @@
|
||||
package cn.teammodel.dao;
|
||||
|
||||
import cn.teammodel.model.entity.Student;
|
||||
import cn.teammodel.model.entity.school.Student;
|
||||
import com.azure.spring.data.cosmos.repository.CosmosRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface StudentRepository extends CosmosRepository<Student, String> {
|
||||
|
||||
//Flux<Student> findById(String id);
|
||||
Student findStudentByIdAndCode(String id, String code);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package cn.teammodel.model.entity.school;
|
||||
|
||||
import cn.teammodel.model.entity.BaseItem;
|
||||
import com.azure.spring.data.cosmos.core.mapping.Container;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Container(containerName = "School")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ClassInfo extends BaseItem {
|
||||
private String no;
|
||||
private String name;
|
||||
private Teacher teacher;
|
||||
private String periodId;
|
||||
private Integer year;
|
||||
private String room;
|
||||
private String school;
|
||||
private Integer graduate;
|
||||
private String pk;
|
||||
private Integer ttl;
|
||||
|
||||
@Data
|
||||
public static class Teacher {
|
||||
private String id;
|
||||
private String name;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue