package com.cool.modules.dingtalk.entity;

import com.cool.core.base.BaseEntity;
import com.mybatisflex.annotation.Table;
import com.cool.core.annotation.ColumnDefine;
import lombok.Getter;
import lombok.Setter;

/**
 * 钉钉配置实体
 * 用于存储钉钉企业内部应用的配置信息
 */
@Getter
@Setter
@Table(value = "dingtalk_config", comment = "钉钉配置表")
public class DingtalkConfigEntity extends BaseEntity<DingtalkConfigEntity> {

    @ColumnDefine(comment = "钉钉应用AppKey", notNull = true, length = 100)
    private String appKey;

    @ColumnDefine(comment = "钉钉应用AppSecret（加密存储）", notNull = true, length = 200)
    private String appSecret;

    @ColumnDefine(comment = "企业ID（corpId）", notNull = true, length = 100)
    private String corpId;

    @ColumnDefine(comment = "定时同步Cron表达式", defaultValue = "0 0 2 * * ?", length = 50)
    private String syncCron;

    @ColumnDefine(comment = "是否启用自动同步 0-否 1-是", defaultValue = "1")
    private Integer autoSync;

    @ColumnDefine(comment = "同步状态 0-空闲 1-同步中", defaultValue = "0")
    private Integer syncStatus;

    @ColumnDefine(comment = "配置状态 0-禁用 1-启用", defaultValue = "1")
    private Integer status;
}
