feat: add me
This commit is contained in:
@@ -25,6 +25,7 @@ export class User extends Model {
|
||||
declare owner: string;
|
||||
declare orgId: string;
|
||||
declare email: string;
|
||||
declare avatar: string;
|
||||
async createToken(uid?: string) {
|
||||
const { id, username, type } = this;
|
||||
const expireTime = 60 * 60 * 24 * 7; // 7 days
|
||||
@@ -85,6 +86,7 @@ export class User extends Model {
|
||||
description: this.description,
|
||||
needChangePassword: this.needChangePassword,
|
||||
type: this.type,
|
||||
avatar: this.avatar,
|
||||
orgs,
|
||||
};
|
||||
}
|
||||
@@ -131,6 +133,10 @@ User.init(
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
avatar: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
salt: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
|
||||
Reference in New Issue
Block a user