package cn.lihongjie.coal.jobPost.entity;

import cn.lihongjie.coal.base.entity.OrgCommonEntity;

import io.hypersistence.utils.hibernate.type.array.ListArrayType;

import jakarta.persistence.Entity;

import lombok.Data;

import org.hibernate.annotations.Formula;
import org.hibernate.annotations.Type;

import java.util.List;

@Data
@Entity
public class JobPostEntity extends OrgCommonEntity {




    @Type(ListArrayType.class)
    @Formula("(select array_agg(e.id) from t_employee e where e.job_post_id = id)")
    private List<String> selfEmpIds;
}
