import { Roles } from "../../../entities/User/model/Roles";
import { Brand } from "../../../models/Brand";

export type UserId = Brand<string, "UserId">;
export const createUserId = (id: string): UserId => id as UserId;

export type UserName = Brand<string, "UserName">;
export const createUserName = (name: string): UserName => name as UserName;

export type AccessToken = Brand<string, "AccessToken">;
export const createAccessToken = (token: string): AccessToken =>
	token as AccessToken;

export interface User {
	id: UserId;
	username: UserName;
	role: Roles;
	accessToken: AccessToken;
}
