forked from mtusi2026/mtusi2026lab3
feat(api): implement persistent messaging and graceful draining
Add shared sessions, cached message history and transactional idempotency backed by PostgreSQL. Return readiness 503 during draining and finish in-flight requests before closing dependencies.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class CreateUserDto {
|
||||
@ApiProperty({ example: 'alice', pattern: '^[a-z0-9_]{3,32}$' })
|
||||
username!: string;
|
||||
|
||||
@ApiProperty({ example: 'Алиса', maxLength: 100 })
|
||||
display_name!: string;
|
||||
|
||||
@ApiProperty({
|
||||
writeOnly: true,
|
||||
minLength: 12,
|
||||
maxLength: 128,
|
||||
example: 'Example-only-not-a-real-secret-123',
|
||||
})
|
||||
password!: string;
|
||||
}
|
||||
|
||||
export class User {
|
||||
@ApiProperty({ format: 'uuid' })
|
||||
id!: string;
|
||||
@ApiProperty({ pattern: '^[a-z0-9_]{3,32}$' })
|
||||
username!: string;
|
||||
@ApiProperty({ minLength: 1, maxLength: 100 })
|
||||
display_name!: string;
|
||||
@ApiProperty({ format: 'date-time' })
|
||||
created_at!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user