package com.sunyard.chsm.dto;

import com.sunyard.chsm.model.PageQuery;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author liulu
 * @since 2024/11/22
 */
public abstract class IpWhitelistDTO {

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class Query extends PageQuery {

        private String ipAddress;
        private LocalDate startDate;
        private LocalDate endDate;
        private Integer status;
    }


    @Data
    public static class IpView {
        private Long id;
        private String ipAddress;
        private String creator;
        private Integer status;
        private String memo;
        private LocalDateTime createTime;
    }


    @Data
    public static class IpSave {
        private Long id;
        /**
         * IP地址
         */
        private String ipAddress;
        /**
         * 备注
         */
        @Size(max = 500, message = "备注长度在1-500之间")
        private String memo;

        private Integer status;
    }



}
