package com.yunzhupaas.base.model.form;
import lombok.Data;

import java.util.Date;

/**
 *
 * @author 云筑产品开发平台组
 * @version V3.1.0
 * @copyright 深圳市乐程软件有限公司
 * @date 2024-09-14
 */
@Data
public class ModuleFormModel {
    private String id;
    private String fullName;
    private String parentId;
    private String enCode;
    private String moduleId;
    private String icon;
    private String systemId;
    private Long sortCode=999999L;
    private Long creatorTime;
    private Date creatorTimes;

    public Long getCreatorTime() {
        if (this.creatorTimes != null && this.creatorTime == null) {
            return this.getCreatorTimes().getTime();
        } else if (this.creatorTime != null){
            return this.creatorTime;
        }
        return 0L;
    }

    public void setCreatorTimes(Date creatorTimes) {
        this.creatorTimes = creatorTimes;
        if(creatorTimes != null && this.creatorTime == null){
            this.creatorTime = creatorTimes.getTime();
        }
    }

    public void setCreatorTime(Long creatorTime) {
        this.creatorTime = creatorTime;
        if(creatorTime != null && this.creatorTimes == null){
            this.creatorTimes = new Date(creatorTime);
        }
    }
}

