package com.czg.account.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 数据字典 实体类。
 *
 * @author zs
 * @since 2025-02-28
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table("sys_dict")
public class SysDict implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 父id
     */
    private Integer releId;

    /**
     * name
     */
    private String dictName;

    /**
     * 字典名称
     */
    private String name;

    /**
     * 值
     */
    private String value;

    /**
     * 类型：通用-common；首页-home；热销-hot；
     */
    private String type;

    /**
     * 是否展示 0否 1是
     */
    private Integer status;

    /**
     * 是否有子类 0否1是
     */
    private Integer isChild;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 创建日期
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

    /**
     * 排序
     */
    private Integer sort;

    @Column(ignore = true)
    private List<SysDict> detail;


}
