package com.example.springbootmpdemo.domain;

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 lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("student")   //指定类为哪个表的实体类
public class Student {

    @TableId(value = "id",type = IdType.AUTO)   //指定实体类的属性为主键
    private Integer id;
    @TableField("name")     //在属性和列名不同的情况下，指定映射关系
    private String name;
    private String email;
    private String gender;
    private Integer age;

}
