package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 律所表
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("law_firm")
@ApiModel(value = "LawFirm对象", description = "律所表")
public class LawFirm extends Model<LawFirm> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "律所名称")
    @TableField("firm_name")
    private String firmName;

    @ApiModelProperty(value = "统一社会信用代码")
    @TableField("credit_code")
    private String creditCode;

    @ApiModelProperty(value = "律所简称")
    @TableField("short_name")
    private String shortName;

    @ApiModelProperty(value = "律所英文名称")
    @TableField("english_name")
    private String englishName;

    @ApiModelProperty(value = "成立日期")
    @TableField("establishment_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date establishmentDate;

    @ApiModelProperty(value = "律所类型, 1:合伙制, 2:个人制, 3:国资制")
    @TableField("firm_type")
    private Integer firmType;

    @ApiModelProperty(value = "律所规模, 1:小型(1-10人), 2:中型(11-50人), 3:大型(51-200人), 4:超大型(200人以上)")
    @TableField("firm_scale")
    private Integer firmScale;

    @ApiModelProperty(value = "联系电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "传真")
    @TableField("fax")
    private String fax;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "官网地址")
    @TableField("website")
    private String website;

    @ApiModelProperty(value = "律所简介")
    @TableField("introduction")
    private String introduction;

    @ApiModelProperty(value = "律所logo")
    @TableField("logo")
    private String logo;

    @ApiModelProperty(value = "营业执照照片")
    @TableField("business_license_image")
    private String businessLicenseImage;

    @ApiModelProperty(value = "执业许可证号")
    @TableField("practice_license_no")
    private String practiceLicenseNo;

    @ApiModelProperty(value = "执业许可证照片")
    @TableField("practice_license_image")
    private String practiceLicenseImage;

    @ApiModelProperty(value = "负责人姓名")
    @TableField("director_name")
    private String directorName;

    @ApiModelProperty(value = "负责人电话")
    @TableField("director_phone")
    private String directorPhone;

    @ApiModelProperty(value = "负责人邮箱")
    @TableField("director_email")
    private String directorEmail;

    @ApiModelProperty(value = "律师总数")
    @TableField("lawyer_count")
    private Integer lawyerCount;

    @ApiModelProperty(value = "合伙人数量")
    @TableField("partner_count")
    private Integer partnerCount;

    @ApiModelProperty(value = "律所状态, 0:禁用, 1:启用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "认证状态, 0:未认证, 1:认证中, 2:已认证, 3:认证失败")
    @TableField("certification_status")
    private Integer certificationStatus;

    @ApiModelProperty(value = "认证失败原因")
    @TableField("certification_fail_reason")
    private String certificationFailReason;

    @ApiModelProperty(value = "认证时间")
    @TableField("certification_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date certificationTime;

    @ApiModelProperty(value = "认证审核人ID")
    @TableField("certification_reviewer_id")
    private Integer certificationReviewerId;

    @ApiModelProperty(value = "是否推荐, 0:不推荐, 1:推荐")
    @TableField("is_recommended")
    private Integer isRecommended;

    @ApiModelProperty(value = "推荐排序")
    @TableField("recommend_sort")
    private Integer recommendSort;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updatedUserId;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "平台佣金比例（百分比）")
    @TableField("platform_commission_ratio")
    private Integer platformCommissionRatio;

    @ApiModelProperty(value = "律师子表（临时字段，不映射到数据库）")
    @TableField(exist = false)
    private List<LawFirmPayment> paymentList;
}

