parent
610c6d4e81
commit
edc79455cc
@ -0,0 +1,36 @@
|
||||
package cn.teammodel.model.entity;
|
||||
|
||||
import com.azure.spring.data.cosmos.core.mapping.Container;
|
||||
import com.azure.spring.data.cosmos.core.mapping.GeneratedValue;
|
||||
import com.azure.spring.data.cosmos.core.mapping.PartitionKey;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
/**
|
||||
* @author winter
|
||||
* @create 2023-11-27 11:02
|
||||
*/
|
||||
@Container(containerName = "Student")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class AppraiseRecord {
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private String id;
|
||||
/**
|
||||
* 分区键: AppraiseRecord-{schoolId}
|
||||
*/
|
||||
@PartitionKey
|
||||
private String code;
|
||||
/**
|
||||
* 学校 Id
|
||||
*/
|
||||
private String schoolId;
|
||||
/**
|
||||
* 学段 id
|
||||
*/
|
||||
private String periodId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package cn.teammodel.model.entity;
|
||||
|
||||
import com.azure.spring.data.cosmos.core.mapping.GeneratedValue;
|
||||
import com.azure.spring.data.cosmos.core.mapping.PartitionKey;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
/**
|
||||
* @author winter
|
||||
* @create 2023-11-27 11:05
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class BaseItem {
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private String id;
|
||||
/**
|
||||
* 分区键
|
||||
*/
|
||||
@PartitionKey
|
||||
private String code;
|
||||
}
|
Loading…
Reference in new issue