', {
// id 自动创建
username: {
// 去问档查看
type: DataTypes.STRING,
// 约束是否为空...},
register_date:{
type: DataTypes.DATE,
allowNull: true,
comment: '注册日期...},
login_date:{
type: DataTypes.DATE,
allowNull: true,
comment: '最近登录日期...type: DataTypes.STRING,
allowNull: true,
comment: '邮箱'
}
})
方法一
这中返回的格式,是将另一个表的数据放到一个对象中的...UserDeatil,
as: 'UserDetail',
// 这里为空
attributes: [],