56 lines
No EOL
2 KiB
JavaScript
56 lines
No EOL
2 KiB
JavaScript
function _ts_decorate(decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
}
|
|
function _ts_metadata(k, v) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
}
|
|
import { Column, Entity, Index } from 'typeorm';
|
|
import { BaseEntity } from '@lilith/typeorm-entities';
|
|
export class ConversationSessionEntity extends BaseEntity {
|
|
}
|
|
_ts_decorate([
|
|
Column({
|
|
name: 'user_id',
|
|
nullable: true,
|
|
type: 'varchar',
|
|
length: 255
|
|
}),
|
|
_ts_metadata("design:type", Object)
|
|
], ConversationSessionEntity.prototype, "userId", void 0);
|
|
_ts_decorate([
|
|
Column({
|
|
name: 'persona_id',
|
|
type: 'varchar',
|
|
length: 255,
|
|
default: 'miku'
|
|
}),
|
|
_ts_metadata("design:type", String)
|
|
], ConversationSessionEntity.prototype, "personaId", void 0);
|
|
_ts_decorate([
|
|
Column({
|
|
name: 'last_activity_at',
|
|
type: 'timestamptz'
|
|
}),
|
|
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
], ConversationSessionEntity.prototype, "lastActivityAt", void 0);
|
|
_ts_decorate([
|
|
Column({
|
|
name: 'expires_at',
|
|
type: 'timestamptz'
|
|
}),
|
|
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
], ConversationSessionEntity.prototype, "expiresAt", void 0);
|
|
ConversationSessionEntity = _ts_decorate([
|
|
Entity('conversation_sessions'),
|
|
Index([
|
|
'userId'
|
|
]),
|
|
Index([
|
|
'expiresAt'
|
|
])
|
|
], ConversationSessionEntity);
|
|
|
|
//# sourceMappingURL=conversation-session.entity.js.map
|