package com.zhongshu.card.client.model.form;

import com.github.microservice.types.payment.PayFieldType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 组件的表单
 *
 * @author TRX
 * @date 2025/2/11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ComponentFormModel {

    @Schema(description = "对应的后端字段，如：name、appId")
    private String key;

    @Schema(description = "字段名称，如：名称，名称")
    private String name;

    @Schema(description = "字段类型，如：Str, File")
    private PayFieldType type;

    @Schema(description = "是否必填")
    private Boolean isMust = Boolean.TRUE;

    @Schema(description = "是否显示")
    private Boolean isShow = Boolean.TRUE;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "最大长度")
    private Integer maxLength = 500;

    @Schema(description = "是否禁用")
    private Boolean disabled = Boolean.FALSE;
}
