/**
 * 人脸特征
 */
@skipFakeData
entity PersonFace {
    name String /** 姓名 */
    uniqueId String /** 外部ID */
    cardNo String /** 身份证号码 */
    feature Blob /** 人脸特征 */
}

entity CompareLog {
    createAt ZonedDateTime /** 对比时间 */
    success Boolean /** 是否成功 */
}

/**
 * Many to one relationship.
 */
relationship ManyToOne {
    /** 原始照片 */
    PersonFace{originalImage(url)}
     to
    UploadImage

    /** 部门 */
    PersonFace{department(name)}
    to
    Department

    /** 标注照片 */
    PersonFace{signImage(url)}
     to
    UploadImage

    /** 原始照片 */
    CompareLog{originalImage(url)}
     to
    UploadImage

    /** 标注照片 */
    CompareLog{signImage(url)}
     to
    UploadImage

    /** 识别结果 */
    CompareLog{personFace(name)}
     to
    PersonFace

    /** 部门 */
    CompareLog{department(name)}
    to
    Department
}
service all with serviceClass
filter *
dto PersonFace, CompareLog with mapstruct
paginate PersonFace, CompareLog with pagination
clientRootFolder PersonFace, CompareLog with face
