package com.ruoyi.bst.app.domain;

import javax.validation.constraints.NotBlank;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.interfaces.LogBizParam;
import com.ruoyi.common.core.validate.ValidGroup;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * APP信息对象 ss_app
 *
 * @author ruoyi
 * @date 2025-01-08
 */
@Data
public class App extends BaseEntity implements LogBizParam
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "应用名称")
    @ApiModelProperty("应用名称")
    @NotBlank(message = "应用名称不能为空", groups = {ValidGroup.Create.class})
    private String name;

    @Excel(name = "应用类型", readConverterExp = "1=微信小程序,2=支付宝小程序")
    @ApiModelProperty("应用类型")
    @NotBlank(message = "应用类型不能为空", groups = {ValidGroup.Create.class})
    private String type;

    @Excel(name = "应用配置")
    @ApiModelProperty("应用配置")
    private AppConfig config;

    @Override
    public Object logBizId() {
        return id;
    }
}
