<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
package ${pub.getPKGCodeName()}.${item.getPSSystemModule().codeName?lower_case}.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.sql.Timestamp;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;

/**
 * 实体[${item.codeName}] 数据对象
 */
@TableName(value = "${item.getTableName()}",resultMap = "${item.codeName}ResultMap")
@Data
public class ${item.codeName}{

<#comment>输出当前实体1:N主实体</#comment>
<#if item.getMinorPSDERs?? && item.getMinorPSDERs()??>
    <#list item.getMinorPSDERs() as MinorPSDER>
        <#assign MajorEntity = MinorPSDER.getMajorPSDataEntity()>
    @TableField(exist = false)//关系主表数据
    private ${MajorEntity.getCodeName()} ${MinorPSDER.getCodeName()?lower_case};
    </#list>
</#if>
<#comment>输出当前实体1:N子实体</#comment>
<#if item.getMajorPSDERs?? && item.getMajorPSDERs()??>
    <#list item.getMajorPSDERs() as MajorPSDER>
        <#assign MinorEntity = MajorPSDER.getMinorPSDataEntity()>
    @TableField(exist = false)//关系子表数据
    private List <${MinorEntity.getCodeName()}> ${MajorPSDER.getMinorCodeName()?lower_case};
    </#list>
</#if>
<#comment>输出当前实体属性</#comment>
<#list item.getPSDEFields() as defield>
    <#if defield.isKeyDEField()>
    @TableId(value= "${defield.getName()?lower_case}",type=IdType.UUID)//指定主键生成策略
    </#if>
    private ${srfjavatype(defield.stdDataType)} ${defield.codeName?lower_case};
</#list>

}
