package org.dbflute.intro.app.web.alter;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import org.dbflute.intro.dbflute.allcommon.CDef;
import org.lastaflute.web.validation.Required;

/**
 * @author cabos
 */
public class AlterSQLResult {

    /**
     * Alter Check Result
     * e.g. alter-NG
     */
    @Required
    public CDef.NgMark ngMark;

    /** list of editing sql files in dbflute_client/playsql/migration/alter directory */
    @Valid
    public List<AlterDirFilePart> editingFiles;

    /** checked sql zip file */
    @Valid
    public CheckedZipPart checkedZip;

    /** unreleased sql dir */
    @Valid
    public UnreleasedDirPart unreleasedDir;

    public static class CheckedZipPart {

        /** zip file name e.g. 20190831_2249/checked-alter-to-20190422-2332.zip */
        @NotNull
        public String fileName;

        /** list of checked sql files */
        @Valid
        public List<AlterDirFilePart> checkedFiles;
    }

    public static class UnreleasedDirPart {

        /** list of checked sql files */
        @Valid
        public List<AlterDirFilePart> checkedFiles;
    }

    public static class AlterDirFilePart {

        /** file name e.g. alter-sql-SAMPLE.sql */
        @NotNull
        public String fileName;

        /** file content e.g. ALTER TABLE MEMBER ADD MAIHAMA_VISITED VARCHAR(3); */
        @NotNull
        public String content;
    }
}

@@ -188,55 +188,8 @@
 Def;
-%0Aimport org.lastaflute.web.validation.Required;
 %0A%0A/*
@@ -275,16 +275,30 @@
 k Result
+ (Enable Null)
 %0A     * 
@@ -323,22 +323,8 @@
  */%0A
-    @Required%0A
     

remove notnull