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.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 店铺员工 实体类。
 *
 * @author Administrator
 * @since 2025-02-10
 */
@Data

@NoArgsConstructor
@AllArgsConstructor
@Table("tb_shop_staff")
public class ShopStaff implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 使用系统用户 sys_user id
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 员工编号
     */
    private String code;

    /**
     * 员工名称
     */
    private String name;

    /**
     * 最大优惠金额
     */
    private BigDecimal maxDiscountAmount;

    /**
     * 优惠类型 1 折扣 0 金额
     */
    private String discountType;

    /**
     * 1启用0不启用
     */
    private Integer status;

    /**
     * shopId
     */
    private Long shopId;

    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

    /**
     * master商户账号staff员工
     */
    private String type;

    /**
     * 是否允许管理端登录 0：不允许；1：允许
     */
    private Integer isManage;

    /**
     * 是否允许pc端登录 0：不允许；1：允许
     */
    private Integer isPc;

    @Column(ignore = true)
    private Long roleId;
    @Column(ignore = true)
    private String roleName;
    @Column(ignore = true)
    private String accountName;
    @Column(ignore = true)
    private String accountPwd;
    @Column(ignore = true)
    private String phone;

    @Column(isLogicDelete = true)
    private Integer isDeleted;


}
