mirror of
				https://github.com/suyiiyii/SIMS.git
				synced 2025-11-04 07:24:53 +08:00 
			
		
		
		
	feat(user): 为用户表添加唯一索引 (#23)
This commit is contained in:
		
							parent
							
								
									6e3ffa092b
								
							
						
					
					
						commit
						2c51b04381
					
				@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Column;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.ColumnId;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.Table;
 | 
			
		||||
import com.tangzc.mpe.autotable.annotation.UniqueIndex;
 | 
			
		||||
import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
@ -23,16 +24,21 @@ import lombok.NoArgsConstructor;
 | 
			
		||||
public class User {
 | 
			
		||||
    @ColumnId(mode = IdType.AUTO, comment = "id主键")
 | 
			
		||||
    private Integer id;
 | 
			
		||||
    @UniqueIndex
 | 
			
		||||
    @Column(comment = "学生id", notNull = true)
 | 
			
		||||
    private Integer studentId;
 | 
			
		||||
    @UniqueIndex
 | 
			
		||||
    @Column(comment = "用户名", notNull = true)
 | 
			
		||||
    private String username;
 | 
			
		||||
    @Column(comment = "密码", notNull = true)
 | 
			
		||||
    private String password;
 | 
			
		||||
    @UniqueIndex
 | 
			
		||||
    @Column(comment = "邮箱", notNull = true)
 | 
			
		||||
    private String email;
 | 
			
		||||
    @UniqueIndex
 | 
			
		||||
    @Column(comment = "年级", notNull = true)
 | 
			
		||||
    private String grade;
 | 
			
		||||
    @UniqueIndex
 | 
			
		||||
    @Column(comment = "用户所属团队", notNull = true)
 | 
			
		||||
    private String userGroup;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user