mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-26 01:32:30 +08:00
35 lines
611 B
TypeScript
35 lines
611 B
TypeScript
//============== 用户会话 ========================
|
|
//Copyright 2018 何镇汐
|
|
//Licensed under the MIT license
|
|
//================================================
|
|
import { Injectable } from '@angular/core';
|
|
import { uuid } from '../common/helper';
|
|
|
|
/**
|
|
* 用户会话
|
|
*/
|
|
@Injectable()
|
|
export class Session {
|
|
/**
|
|
* 初始化
|
|
*/
|
|
constructor() {
|
|
this.sessionId = uuid();
|
|
}
|
|
/**
|
|
* 会话标识
|
|
*/
|
|
sessionId;
|
|
/**
|
|
* 是否认证
|
|
*/
|
|
isAuthenticated;
|
|
/**
|
|
* 用户标识
|
|
*/
|
|
userId;
|
|
/**
|
|
* 用户名称
|
|
*/
|
|
name;
|
|
} |