package com.ningdatech.carapi.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ningdatech.carapi.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 运营商
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-10-09
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("nd_operator_info")
@ApiModel(value = "Operator", description = "运营商")
@AllArgsConstructor
@Builder
public class Operator extends BaseEntity {

    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    private static final long serialVersionUID = 1L;

    /**
     * 运营商名称
     */
    @ApiModelProperty(value = "运营商名称")
    @NotEmpty(message = "运营商名称不能为空")
    @Size(max = 50, message = "运营商名称长度不能超过50")
    @TableField(value = "name", condition = LIKE)
    private String name;

    /**
     * 运营商备注
     */
    @ApiModelProperty(value = "备注")
    @Size(max = 250, message = "备注长度不能超过250")
    @TableField(value = "remark", condition = LIKE)
    private String remark;
}
