import * as Sequelize from 'sequelize';
import { Op } from 'sequelize';
import { DataTypes, Model, Optional } from 'sequelize';
import type { EmailVerifyToken, EmailVerifyTokenId } from './EmailVerifyToken';
import type { File, FileId } from './File';
import type { AuthAuditLog, AuthAuditLogId } from './AuthAuditLog';
import type { AuthAuditLogsDefault, AuthAuditLogsDefaultId } from './AuthAuditLogsDefault';
import type { EntityChangeLog, EntityChangeLogId } from './EntityChangeLog';
import type { EntityChangeLogsDefault, EntityChangeLogsDefaultId } from './EntityChangeLogsDefault';
import type { NotificationDevice, NotificationDeviceId } from './NotificationDevice';
import type { NotificationPreference, NotificationPreferenceId } from './NotificationPreference';
import type { NotificationReceipt, NotificationReceiptId } from './NotificationReceipt';
import type { PasswordResetToken, PasswordResetTokenId } from './PasswordResetToken';
import type { Permission, PermissionId } from './Permission';
import type { RefreshTokenAuditLog, RefreshTokenAuditLogId } from './RefreshTokenAuditLog';
import type {
	RefreshTokenAuditLogsDefault,
	RefreshTokenAuditLogsDefaultId,
} from './RefreshTokenAuditLogsDefault';
import type { RolePermission, RolePermissionId } from './RolePermission';
import type { Role, RoleId } from './Role';
import type { SystemAuditLog, SystemAuditLogId } from './SystemAuditLog';
import type { SystemAuditLogsDefault, SystemAuditLogsDefaultId } from './SystemAuditLogsDefault';
import type { UserAuth, UserAuthId } from './UserAuth';
import type { UserPasswordHistory, UserPasswordHistoryId } from './UserPasswordHistory';
import type { UserRole, UserRoleId } from './UserRole';
import type { UserSession, UserSessionId } from './UserSession';
export interface UserAttributes {
	id: string;
	email: string;
	username?: string | null;
	first_name?: string | null;
	last_name?: string | null;
	phone?: string | null;
	address?: string | null;
	email_verified_at?: Date | null;
	status?: 'active' | 'inactive' | 'suspended' | 'pending_verification' | null;
	created_by?: string | null;
	updated_by?: string | null;
	created_at?: Date | null;
	updated_at?: Date | null;
	deleted_at?: Date | null;
	avatar_id?: string | null;
}
export type UserPk = 'id';
export type UserId = User[UserPk];
export type UserOptionalAttributes =
	| 'id'
	| 'username'
	| 'first_name'
	| 'last_name'
	| 'phone'
	| 'address'
	| 'email_verified_at'
	| 'status'
	| 'created_by'
	| 'updated_by'
	| 'created_at'
	| 'updated_at'
	| 'deleted_at'
	| 'avatar_id';
export type UserCreationAttributes = Optional<UserAttributes, UserOptionalAttributes>;
export class User extends Model<UserAttributes> implements UserAttributes {
	declare id: string;
	declare email: string;
	declare username?: string | null;
	declare first_name?: string | null;
	declare last_name?: string | null;
	declare phone?: string | null;
	declare address?: string | null;
	declare email_verified_at?: Date | null;
	declare status?: 'active' | 'inactive' | 'suspended' | 'pending_verification' | null;
	declare created_by?: string | null;
	declare updated_by?: string | null;
	declare created_at?: Date | null;
	declare updated_at?: Date | null;
	declare deleted_at?: Date | null;
	declare avatar_id?: string | null;
	// User belongsTo File via avatar_id
	declare avatar: File;
	declare getAvatar: Sequelize.BelongsToGetAssociationMixin<File>;
	declare setAvatar: Sequelize.BelongsToSetAssociationMixin<File, FileId>;
	declare createAvatar: Sequelize.BelongsToCreateAssociationMixin<File>;
	// User hasMany AuthAuditLog via user_id
	declare auth_audit_logs: AuthAuditLog[];
	declare getAuth_audit_logs: Sequelize.HasManyGetAssociationsMixin<AuthAuditLog>;
	declare setAuth_audit_logs: Sequelize.HasManySetAssociationsMixin<AuthAuditLog, AuthAuditLogId>;
	declare addAuth_audit_log: Sequelize.HasManyAddAssociationMixin<AuthAuditLog, AuthAuditLogId>;
	declare addAuth_audit_logs: Sequelize.HasManyAddAssociationsMixin<AuthAuditLog, AuthAuditLogId>;
	declare createAuth_audit_log: Sequelize.HasManyCreateAssociationMixin<AuthAuditLog>;
	declare removeAuth_audit_log: Sequelize.HasManyRemoveAssociationMixin<AuthAuditLog, AuthAuditLogId>;
	declare removeAuth_audit_logs: Sequelize.HasManyRemoveAssociationsMixin<AuthAuditLog, AuthAuditLogId>;
	declare hasAuth_audit_log: Sequelize.HasManyHasAssociationMixin<AuthAuditLog, AuthAuditLogId>;
	declare hasAuth_audit_logs: Sequelize.HasManyHasAssociationsMixin<AuthAuditLog, AuthAuditLogId>;
	declare countAuth_audit_logs: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany AuthAuditLogsDefault via user_id
	declare auth_audit_logs_defaults: AuthAuditLogsDefault[];
	declare getAuth_audit_logs_defaults: Sequelize.HasManyGetAssociationsMixin<AuthAuditLogsDefault>;
	declare setAuth_audit_logs_defaults: Sequelize.HasManySetAssociationsMixin<
		AuthAuditLogsDefault,
		AuthAuditLogsDefaultId
	>;
	declare addAuth_audit_logs_default: Sequelize.HasManyAddAssociationMixin<
		AuthAuditLogsDefault,
		AuthAuditLogsDefaultId
	>;
	declare addAuth_audit_logs_defaults: Sequelize.HasManyAddAssociationsMixin<
		AuthAuditLogsDefault,
		AuthAuditLogsDefaultId
	>;
	declare createAuth_audit_logs_default: Sequelize.HasManyCreateAssociationMixin<AuthAuditLogsDefault>;
	declare removeAuth_audit_logs_default: Sequelize.HasManyRemoveAssociationMixin<
		AuthAuditLogsDefault,
		AuthAuditLogsDefaultId
	>;
	declare removeAuth_audit_logs_defaults: Sequelize.HasManyRemoveAssociationsMixin<
		AuthAuditLogsDefault,
		AuthAuditLogsDefaultId
	>;
	declare hasAuth_audit_logs_default: Sequelize.HasManyHasAssociationMixin<
		AuthAuditLogsDefault,
		AuthAuditLogsDefaultId
	>;
	declare hasAuth_audit_logs_defaults: Sequelize.HasManyHasAssociationsMixin<
		AuthAuditLogsDefault,
		AuthAuditLogsDefaultId
	>;
	declare countAuth_audit_logs_defaults: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany EntityChangeLog via actor_id
	declare entity_change_logs: EntityChangeLog[];
	declare getEntity_change_logs: Sequelize.HasManyGetAssociationsMixin<EntityChangeLog>;
	declare setEntity_change_logs: Sequelize.HasManySetAssociationsMixin<EntityChangeLog, EntityChangeLogId>;
	declare addEntity_change_log: Sequelize.HasManyAddAssociationMixin<EntityChangeLog, EntityChangeLogId>;
	declare addEntity_change_logs: Sequelize.HasManyAddAssociationsMixin<EntityChangeLog, EntityChangeLogId>;
	declare createEntity_change_log: Sequelize.HasManyCreateAssociationMixin<EntityChangeLog>;
	declare removeEntity_change_log: Sequelize.HasManyRemoveAssociationMixin<EntityChangeLog, EntityChangeLogId>;
	declare removeEntity_change_logs: Sequelize.HasManyRemoveAssociationsMixin<EntityChangeLog, EntityChangeLogId>;
	declare hasEntity_change_log: Sequelize.HasManyHasAssociationMixin<EntityChangeLog, EntityChangeLogId>;
	declare hasEntity_change_logs: Sequelize.HasManyHasAssociationsMixin<EntityChangeLog, EntityChangeLogId>;
	declare countEntity_change_logs: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany EntityChangeLogsDefault via actor_id
	declare entity_change_logs_defaults: EntityChangeLogsDefault[];
	declare getEntity_change_logs_defaults: Sequelize.HasManyGetAssociationsMixin<EntityChangeLogsDefault>;
	declare setEntity_change_logs_defaults: Sequelize.HasManySetAssociationsMixin<
		EntityChangeLogsDefault,
		EntityChangeLogsDefaultId
	>;
	declare addEntity_change_logs_default: Sequelize.HasManyAddAssociationMixin<
		EntityChangeLogsDefault,
		EntityChangeLogsDefaultId
	>;
	declare addEntity_change_logs_defaults: Sequelize.HasManyAddAssociationsMixin<
		EntityChangeLogsDefault,
		EntityChangeLogsDefaultId
	>;
	declare createEntity_change_logs_default: Sequelize.HasManyCreateAssociationMixin<EntityChangeLogsDefault>;
	declare removeEntity_change_logs_default: Sequelize.HasManyRemoveAssociationMixin<
		EntityChangeLogsDefault,
		EntityChangeLogsDefaultId
	>;
	declare removeEntity_change_logs_defaults: Sequelize.HasManyRemoveAssociationsMixin<
		EntityChangeLogsDefault,
		EntityChangeLogsDefaultId
	>;
	declare hasEntity_change_logs_default: Sequelize.HasManyHasAssociationMixin<
		EntityChangeLogsDefault,
		EntityChangeLogsDefaultId
	>;
	declare hasEntity_change_logs_defaults: Sequelize.HasManyHasAssociationsMixin<
		EntityChangeLogsDefault,
		EntityChangeLogsDefaultId
	>;
	declare countEntity_change_logs_defaults: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany RefreshTokenAuditLog via user_id
	declare refresh_token_audit_logs: RefreshTokenAuditLog[];
	declare getRefresh_token_audit_logs: Sequelize.HasManyGetAssociationsMixin<RefreshTokenAuditLog>;
	declare setRefresh_token_audit_logs: Sequelize.HasManySetAssociationsMixin<
		RefreshTokenAuditLog,
		RefreshTokenAuditLogId
	>;
	declare addRefresh_token_audit_log: Sequelize.HasManyAddAssociationMixin<
		RefreshTokenAuditLog,
		RefreshTokenAuditLogId
	>;
	declare addRefresh_token_audit_logs: Sequelize.HasManyAddAssociationsMixin<
		RefreshTokenAuditLog,
		RefreshTokenAuditLogId
	>;
	declare createRefresh_token_audit_log: Sequelize.HasManyCreateAssociationMixin<RefreshTokenAuditLog>;
	declare removeRefresh_token_audit_log: Sequelize.HasManyRemoveAssociationMixin<
		RefreshTokenAuditLog,
		RefreshTokenAuditLogId
	>;
	declare removeRefresh_token_audit_logs: Sequelize.HasManyRemoveAssociationsMixin<
		RefreshTokenAuditLog,
		RefreshTokenAuditLogId
	>;
	declare hasRefresh_token_audit_log: Sequelize.HasManyHasAssociationMixin<RefreshTokenAuditLog, RefreshTokenAuditLogId>;
	declare hasRefresh_token_audit_logs: Sequelize.HasManyHasAssociationsMixin<
		RefreshTokenAuditLog,
		RefreshTokenAuditLogId
	>;
	declare countRefresh_token_audit_logs: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany RefreshTokenAuditLogsDefault via user_id
	declare refresh_token_audit_logs_defaults: RefreshTokenAuditLogsDefault[];
	declare getRefresh_token_audit_logs_defaults: Sequelize.HasManyGetAssociationsMixin<RefreshTokenAuditLogsDefault>;
	declare setRefresh_token_audit_logs_defaults: Sequelize.HasManySetAssociationsMixin<
		RefreshTokenAuditLogsDefault,
		RefreshTokenAuditLogsDefaultId
	>;
	declare addRefresh_token_audit_logs_default: Sequelize.HasManyAddAssociationMixin<
		RefreshTokenAuditLogsDefault,
		RefreshTokenAuditLogsDefaultId
	>;
	declare addRefresh_token_audit_logs_defaults: Sequelize.HasManyAddAssociationsMixin<
		RefreshTokenAuditLogsDefault,
		RefreshTokenAuditLogsDefaultId
	>;
	declare createRefresh_token_audit_logs_default: Sequelize.HasManyCreateAssociationMixin<RefreshTokenAuditLogsDefault>;
	declare removeRefresh_token_audit_logs_default: Sequelize.HasManyRemoveAssociationMixin<
		RefreshTokenAuditLogsDefault,
		RefreshTokenAuditLogsDefaultId
	>;
	declare removeRefresh_token_audit_logs_defaults: Sequelize.HasManyRemoveAssociationsMixin<
		RefreshTokenAuditLogsDefault,
		RefreshTokenAuditLogsDefaultId
	>;
	declare hasRefresh_token_audit_logs_default: Sequelize.HasManyHasAssociationMixin<
		RefreshTokenAuditLogsDefault,
		RefreshTokenAuditLogsDefaultId
	>;
	declare hasRefresh_token_audit_logs_defaults: Sequelize.HasManyHasAssociationsMixin<
		RefreshTokenAuditLogsDefault,
		RefreshTokenAuditLogsDefaultId
	>;
	declare countRefresh_token_audit_logs_defaults: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany SystemAuditLog via actor_id
	declare system_audit_logs: SystemAuditLog[];
	declare getSystem_audit_logs: Sequelize.HasManyGetAssociationsMixin<SystemAuditLog>;
	declare setSystem_audit_logs: Sequelize.HasManySetAssociationsMixin<SystemAuditLog, SystemAuditLogId>;
	declare addSystem_audit_log: Sequelize.HasManyAddAssociationMixin<SystemAuditLog, SystemAuditLogId>;
	declare addSystem_audit_logs: Sequelize.HasManyAddAssociationsMixin<SystemAuditLog, SystemAuditLogId>;
	declare createSystem_audit_log: Sequelize.HasManyCreateAssociationMixin<SystemAuditLog>;
	declare removeSystem_audit_log: Sequelize.HasManyRemoveAssociationMixin<SystemAuditLog, SystemAuditLogId>;
	declare removeSystem_audit_logs: Sequelize.HasManyRemoveAssociationsMixin<SystemAuditLog, SystemAuditLogId>;
	declare hasSystem_audit_log: Sequelize.HasManyHasAssociationMixin<SystemAuditLog, SystemAuditLogId>;
	declare hasSystem_audit_logs: Sequelize.HasManyHasAssociationsMixin<SystemAuditLog, SystemAuditLogId>;
	declare countSystem_audit_logs: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany SystemAuditLogsDefault via actor_id
	declare system_audit_logs_defaults: SystemAuditLogsDefault[];
	declare getSystem_audit_logs_defaults: Sequelize.HasManyGetAssociationsMixin<SystemAuditLogsDefault>;
	declare setSystem_audit_logs_defaults: Sequelize.HasManySetAssociationsMixin<
		SystemAuditLogsDefault,
		SystemAuditLogsDefaultId
	>;
	declare addSystem_audit_logs_default: Sequelize.HasManyAddAssociationMixin<
		SystemAuditLogsDefault,
		SystemAuditLogsDefaultId
	>;
	declare addSystem_audit_logs_defaults: Sequelize.HasManyAddAssociationsMixin<
		SystemAuditLogsDefault,
		SystemAuditLogsDefaultId
	>;
	declare createSystem_audit_logs_default: Sequelize.HasManyCreateAssociationMixin<SystemAuditLogsDefault>;
	declare removeSystem_audit_logs_default: Sequelize.HasManyRemoveAssociationMixin<
		SystemAuditLogsDefault,
		SystemAuditLogsDefaultId
	>;
	declare removeSystem_audit_logs_defaults: Sequelize.HasManyRemoveAssociationsMixin<
		SystemAuditLogsDefault,
		SystemAuditLogsDefaultId
	>;
	declare hasSystem_audit_logs_default: Sequelize.HasManyHasAssociationMixin<
		SystemAuditLogsDefault,
		SystemAuditLogsDefaultId
	>;
	declare hasSystem_audit_logs_defaults: Sequelize.HasManyHasAssociationsMixin<
		SystemAuditLogsDefault,
		SystemAuditLogsDefaultId
	>;
	declare countSystem_audit_logs_defaults: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany EmailVerifyToken via user_id
	declare email_verify_tokens: EmailVerifyToken[];
	declare getEmail_verify_tokens: Sequelize.HasManyGetAssociationsMixin<EmailVerifyToken>;
	declare setEmail_verify_tokens: Sequelize.HasManySetAssociationsMixin<EmailVerifyToken, EmailVerifyTokenId>;
	declare addEmail_verify_token: Sequelize.HasManyAddAssociationMixin<EmailVerifyToken, EmailVerifyTokenId>;
	declare addEmail_verify_tokens: Sequelize.HasManyAddAssociationsMixin<EmailVerifyToken, EmailVerifyTokenId>;
	declare createEmail_verify_token: Sequelize.HasManyCreateAssociationMixin<EmailVerifyToken>;
	declare removeEmail_verify_token: Sequelize.HasManyRemoveAssociationMixin<EmailVerifyToken, EmailVerifyTokenId>;
	declare removeEmail_verify_tokens: Sequelize.HasManyRemoveAssociationsMixin<EmailVerifyToken, EmailVerifyTokenId>;
	declare hasEmail_verify_token: Sequelize.HasManyHasAssociationMixin<EmailVerifyToken, EmailVerifyTokenId>;
	declare hasEmail_verify_tokens: Sequelize.HasManyHasAssociationsMixin<EmailVerifyToken, EmailVerifyTokenId>;
	declare countEmail_verify_tokens: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany File via created_by
	declare files: File[];
	declare getFiles: Sequelize.HasManyGetAssociationsMixin<File>;
	declare setFiles: Sequelize.HasManySetAssociationsMixin<File, FileId>;
	declare addFile: Sequelize.HasManyAddAssociationMixin<File, FileId>;
	declare addFiles: Sequelize.HasManyAddAssociationsMixin<File, FileId>;
	declare createFile: Sequelize.HasManyCreateAssociationMixin<File>;
	declare removeFile: Sequelize.HasManyRemoveAssociationMixin<File, FileId>;
	declare removeFiles: Sequelize.HasManyRemoveAssociationsMixin<File, FileId>;
	declare hasFile: Sequelize.HasManyHasAssociationMixin<File, FileId>;
	declare hasFiles: Sequelize.HasManyHasAssociationsMixin<File, FileId>;
	declare countFiles: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany File via deleted_by
	declare deleted_by_files: File[];
	declare getDeleted_by_files: Sequelize.HasManyGetAssociationsMixin<File>;
	declare setDeleted_by_files: Sequelize.HasManySetAssociationsMixin<File, FileId>;
	declare addDeleted_by_file: Sequelize.HasManyAddAssociationMixin<File, FileId>;
	declare addDeleted_by_files: Sequelize.HasManyAddAssociationsMixin<File, FileId>;
	declare createDeleted_by_file: Sequelize.HasManyCreateAssociationMixin<File>;
	declare removeDeleted_by_file: Sequelize.HasManyRemoveAssociationMixin<File, FileId>;
	declare removeDeleted_by_files: Sequelize.HasManyRemoveAssociationsMixin<File, FileId>;
	declare hasDeleted_by_file: Sequelize.HasManyHasAssociationMixin<File, FileId>;
	declare hasDeleted_by_files: Sequelize.HasManyHasAssociationsMixin<File, FileId>;
	declare countDeleted_by_files: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany File via owner_user_id
	declare owner_user_files: File[];
	declare getOwner_user_files: Sequelize.HasManyGetAssociationsMixin<File>;
	declare setOwner_user_files: Sequelize.HasManySetAssociationsMixin<File, FileId>;
	declare addOwner_user_file: Sequelize.HasManyAddAssociationMixin<File, FileId>;
	declare addOwner_user_files: Sequelize.HasManyAddAssociationsMixin<File, FileId>;
	declare createOwner_user_file: Sequelize.HasManyCreateAssociationMixin<File>;
	declare removeOwner_user_file: Sequelize.HasManyRemoveAssociationMixin<File, FileId>;
	declare removeOwner_user_files: Sequelize.HasManyRemoveAssociationsMixin<File, FileId>;
	declare hasOwner_user_file: Sequelize.HasManyHasAssociationMixin<File, FileId>;
	declare hasOwner_user_files: Sequelize.HasManyHasAssociationsMixin<File, FileId>;
	declare countOwner_user_files: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany File via updated_by
	declare updated_by_files: File[];
	declare getUpdated_by_files: Sequelize.HasManyGetAssociationsMixin<File>;
	declare setUpdated_by_files: Sequelize.HasManySetAssociationsMixin<File, FileId>;
	declare addUpdated_by_file: Sequelize.HasManyAddAssociationMixin<File, FileId>;
	declare addUpdated_by_files: Sequelize.HasManyAddAssociationsMixin<File, FileId>;
	declare createUpdated_by_file: Sequelize.HasManyCreateAssociationMixin<File>;
	declare removeUpdated_by_file: Sequelize.HasManyRemoveAssociationMixin<File, FileId>;
	declare removeUpdated_by_files: Sequelize.HasManyRemoveAssociationsMixin<File, FileId>;
	declare hasUpdated_by_file: Sequelize.HasManyHasAssociationMixin<File, FileId>;
	declare hasUpdated_by_files: Sequelize.HasManyHasAssociationsMixin<File, FileId>;
	declare countUpdated_by_files: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany NotificationDevice via user_id
	declare notification_devices: NotificationDevice[];
	declare getNotification_devices: Sequelize.HasManyGetAssociationsMixin<NotificationDevice>;
	declare setNotification_devices: Sequelize.HasManySetAssociationsMixin<NotificationDevice, NotificationDeviceId>;
	declare addNotification_device: Sequelize.HasManyAddAssociationMixin<NotificationDevice, NotificationDeviceId>;
	declare addNotification_devices: Sequelize.HasManyAddAssociationsMixin<NotificationDevice, NotificationDeviceId>;
	declare createNotification_device: Sequelize.HasManyCreateAssociationMixin<NotificationDevice>;
	declare removeNotification_device: Sequelize.HasManyRemoveAssociationMixin<NotificationDevice, NotificationDeviceId>;
	declare removeNotification_devices: Sequelize.HasManyRemoveAssociationsMixin<NotificationDevice, NotificationDeviceId>;
	declare hasNotification_device: Sequelize.HasManyHasAssociationMixin<NotificationDevice, NotificationDeviceId>;
	declare hasNotification_devices: Sequelize.HasManyHasAssociationsMixin<NotificationDevice, NotificationDeviceId>;
	declare countNotification_devices: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany NotificationPreference via user_id
	declare notification_preferences: NotificationPreference[];
	declare getNotification_preferences: Sequelize.HasManyGetAssociationsMixin<NotificationPreference>;
	declare setNotification_preferences: Sequelize.HasManySetAssociationsMixin<
		NotificationPreference,
		NotificationPreferenceId
	>;
	declare addNotification_preference: Sequelize.HasManyAddAssociationMixin<NotificationPreference, NotificationPreferenceId>;
	declare addNotification_preferences: Sequelize.HasManyAddAssociationsMixin<
		NotificationPreference,
		NotificationPreferenceId
	>;
	declare createNotification_preference: Sequelize.HasManyCreateAssociationMixin<NotificationPreference>;
	declare removeNotification_preference: Sequelize.HasManyRemoveAssociationMixin<
		NotificationPreference,
		NotificationPreferenceId
	>;
	declare removeNotification_preferences: Sequelize.HasManyRemoveAssociationsMixin<
		NotificationPreference,
		NotificationPreferenceId
	>;
	declare hasNotification_preference: Sequelize.HasManyHasAssociationMixin<NotificationPreference, NotificationPreferenceId>;
	declare hasNotification_preferences: Sequelize.HasManyHasAssociationsMixin<
		NotificationPreference,
		NotificationPreferenceId
	>;
	declare countNotification_preferences: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany NotificationReceipt via user_id
	declare notification_receipts: NotificationReceipt[];
	declare getNotification_receipts: Sequelize.HasManyGetAssociationsMixin<NotificationReceipt>;
	declare setNotification_receipts: Sequelize.HasManySetAssociationsMixin<NotificationReceipt, NotificationReceiptId>;
	declare addNotification_receipt: Sequelize.HasManyAddAssociationMixin<NotificationReceipt, NotificationReceiptId>;
	declare addNotification_receipts: Sequelize.HasManyAddAssociationsMixin<NotificationReceipt, NotificationReceiptId>;
	declare createNotification_receipt: Sequelize.HasManyCreateAssociationMixin<NotificationReceipt>;
	declare removeNotification_receipt: Sequelize.HasManyRemoveAssociationMixin<NotificationReceipt, NotificationReceiptId>;
	declare removeNotification_receipts: Sequelize.HasManyRemoveAssociationsMixin<NotificationReceipt, NotificationReceiptId>;
	declare hasNotification_receipt: Sequelize.HasManyHasAssociationMixin<NotificationReceipt, NotificationReceiptId>;
	declare hasNotification_receipts: Sequelize.HasManyHasAssociationsMixin<NotificationReceipt, NotificationReceiptId>;
	declare countNotification_receipts: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany PasswordResetToken via user_id
	declare password_reset_tokens: PasswordResetToken[];
	declare getPassword_reset_tokens: Sequelize.HasManyGetAssociationsMixin<PasswordResetToken>;
	declare setPassword_reset_tokens: Sequelize.HasManySetAssociationsMixin<PasswordResetToken, PasswordResetTokenId>;
	declare addPassword_reset_token: Sequelize.HasManyAddAssociationMixin<PasswordResetToken, PasswordResetTokenId>;
	declare addPassword_reset_tokens: Sequelize.HasManyAddAssociationsMixin<PasswordResetToken, PasswordResetTokenId>;
	declare createPassword_reset_token: Sequelize.HasManyCreateAssociationMixin<PasswordResetToken>;
	declare removePassword_reset_token: Sequelize.HasManyRemoveAssociationMixin<PasswordResetToken, PasswordResetTokenId>;
	declare removePassword_reset_tokens: Sequelize.HasManyRemoveAssociationsMixin<PasswordResetToken, PasswordResetTokenId>;
	declare hasPassword_reset_token: Sequelize.HasManyHasAssociationMixin<PasswordResetToken, PasswordResetTokenId>;
	declare hasPassword_reset_tokens: Sequelize.HasManyHasAssociationsMixin<PasswordResetToken, PasswordResetTokenId>;
	declare countPassword_reset_tokens: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany Permission via created_by
	declare permissions: Permission[];
	declare getPermissions: Sequelize.HasManyGetAssociationsMixin<Permission>;
	declare setPermissions: Sequelize.HasManySetAssociationsMixin<Permission, PermissionId>;
	declare addPermission: Sequelize.HasManyAddAssociationMixin<Permission, PermissionId>;
	declare addPermissions: Sequelize.HasManyAddAssociationsMixin<Permission, PermissionId>;
	declare createPermission: Sequelize.HasManyCreateAssociationMixin<Permission>;
	declare removePermission: Sequelize.HasManyRemoveAssociationMixin<Permission, PermissionId>;
	declare removePermissions: Sequelize.HasManyRemoveAssociationsMixin<Permission, PermissionId>;
	declare hasPermission: Sequelize.HasManyHasAssociationMixin<Permission, PermissionId>;
	declare hasPermissions: Sequelize.HasManyHasAssociationsMixin<Permission, PermissionId>;
	declare countPermissions: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany Permission via updated_by
	declare updated_by_permissions: Permission[];
	declare getUpdated_by_permissions: Sequelize.HasManyGetAssociationsMixin<Permission>;
	declare setUpdated_by_permissions: Sequelize.HasManySetAssociationsMixin<Permission, PermissionId>;
	declare addUpdated_by_permission: Sequelize.HasManyAddAssociationMixin<Permission, PermissionId>;
	declare addUpdated_by_permissions: Sequelize.HasManyAddAssociationsMixin<Permission, PermissionId>;
	declare createUpdated_by_permission: Sequelize.HasManyCreateAssociationMixin<Permission>;
	declare removeUpdated_by_permission: Sequelize.HasManyRemoveAssociationMixin<Permission, PermissionId>;
	declare removeUpdated_by_permissions: Sequelize.HasManyRemoveAssociationsMixin<Permission, PermissionId>;
	declare hasUpdated_by_permission: Sequelize.HasManyHasAssociationMixin<Permission, PermissionId>;
	declare hasUpdated_by_permissions: Sequelize.HasManyHasAssociationsMixin<Permission, PermissionId>;
	declare countUpdated_by_permissions: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany RolePermission via created_by
	declare role_permissions: RolePermission[];
	declare getRole_permissions: Sequelize.HasManyGetAssociationsMixin<RolePermission>;
	declare setRole_permissions: Sequelize.HasManySetAssociationsMixin<RolePermission, RolePermissionId>;
	declare addRole_permission: Sequelize.HasManyAddAssociationMixin<RolePermission, RolePermissionId>;
	declare addRole_permissions: Sequelize.HasManyAddAssociationsMixin<RolePermission, RolePermissionId>;
	declare createRole_permission: Sequelize.HasManyCreateAssociationMixin<RolePermission>;
	declare removeRole_permission: Sequelize.HasManyRemoveAssociationMixin<RolePermission, RolePermissionId>;
	declare removeRole_permissions: Sequelize.HasManyRemoveAssociationsMixin<RolePermission, RolePermissionId>;
	declare hasRole_permission: Sequelize.HasManyHasAssociationMixin<RolePermission, RolePermissionId>;
	declare hasRole_permissions: Sequelize.HasManyHasAssociationsMixin<RolePermission, RolePermissionId>;
	declare countRole_permissions: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany RolePermission via updated_by
	declare updated_by_role_permissions: RolePermission[];
	declare getUpdated_by_role_permissions: Sequelize.HasManyGetAssociationsMixin<RolePermission>;
	declare setUpdated_by_role_permissions: Sequelize.HasManySetAssociationsMixin<RolePermission, RolePermissionId>;
	declare addUpdated_by_role_permission: Sequelize.HasManyAddAssociationMixin<RolePermission, RolePermissionId>;
	declare addUpdated_by_role_permissions: Sequelize.HasManyAddAssociationsMixin<RolePermission, RolePermissionId>;
	declare createUpdated_by_role_permission: Sequelize.HasManyCreateAssociationMixin<RolePermission>;
	declare removeUpdated_by_role_permission: Sequelize.HasManyRemoveAssociationMixin<RolePermission, RolePermissionId>;
	declare removeUpdated_by_role_permissions: Sequelize.HasManyRemoveAssociationsMixin<RolePermission, RolePermissionId>;
	declare hasUpdated_by_role_permission: Sequelize.HasManyHasAssociationMixin<RolePermission, RolePermissionId>;
	declare hasUpdated_by_role_permissions: Sequelize.HasManyHasAssociationsMixin<RolePermission, RolePermissionId>;
	declare countUpdated_by_role_permissions: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany Role via created_by
	declare roles: Role[];
	declare getRoles: Sequelize.HasManyGetAssociationsMixin<Role>;
	declare setRoles: Sequelize.HasManySetAssociationsMixin<Role, RoleId>;
	declare addRole: Sequelize.HasManyAddAssociationMixin<Role, RoleId>;
	declare addRoles: Sequelize.HasManyAddAssociationsMixin<Role, RoleId>;
	declare createRole: Sequelize.HasManyCreateAssociationMixin<Role>;
	declare removeRole: Sequelize.HasManyRemoveAssociationMixin<Role, RoleId>;
	declare removeRoles: Sequelize.HasManyRemoveAssociationsMixin<Role, RoleId>;
	declare hasRole: Sequelize.HasManyHasAssociationMixin<Role, RoleId>;
	declare hasRoles: Sequelize.HasManyHasAssociationsMixin<Role, RoleId>;
	declare countRoles: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany Role via updated_by
	declare updated_by_roles: Role[];
	declare getUpdated_by_roles: Sequelize.HasManyGetAssociationsMixin<Role>;
	declare setUpdated_by_roles: Sequelize.HasManySetAssociationsMixin<Role, RoleId>;
	declare addUpdated_by_role: Sequelize.HasManyAddAssociationMixin<Role, RoleId>;
	declare addUpdated_by_roles: Sequelize.HasManyAddAssociationsMixin<Role, RoleId>;
	declare createUpdated_by_role: Sequelize.HasManyCreateAssociationMixin<Role>;
	declare removeUpdated_by_role: Sequelize.HasManyRemoveAssociationMixin<Role, RoleId>;
	declare removeUpdated_by_roles: Sequelize.HasManyRemoveAssociationsMixin<Role, RoleId>;
	declare hasUpdated_by_role: Sequelize.HasManyHasAssociationMixin<Role, RoleId>;
	declare hasUpdated_by_roles: Sequelize.HasManyHasAssociationsMixin<Role, RoleId>;
	declare countUpdated_by_roles: Sequelize.HasManyCountAssociationsMixin;
	// User hasOne UserAuth via user_id
	declare user_auth: UserAuth;
	declare getUser_auth: Sequelize.HasOneGetAssociationMixin<UserAuth>;
	declare setUser_auth: Sequelize.HasOneSetAssociationMixin<UserAuth, UserAuthId>;
	declare createUser_auth: Sequelize.HasOneCreateAssociationMixin<UserAuth>;
	// User hasMany UserPasswordHistory via changed_by
	declare user_password_histories: UserPasswordHistory[];
	declare getUser_password_histories: Sequelize.HasManyGetAssociationsMixin<UserPasswordHistory>;
	declare setUser_password_histories: Sequelize.HasManySetAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare addUser_password_history: Sequelize.HasManyAddAssociationMixin<UserPasswordHistory, UserPasswordHistoryId>;
	declare addUser_password_histories: Sequelize.HasManyAddAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare createUser_password_history: Sequelize.HasManyCreateAssociationMixin<UserPasswordHistory>;
	declare removeUser_password_history: Sequelize.HasManyRemoveAssociationMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare removeUser_password_histories: Sequelize.HasManyRemoveAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare hasUser_password_history: Sequelize.HasManyHasAssociationMixin<UserPasswordHistory, UserPasswordHistoryId>;
	declare hasUser_password_histories: Sequelize.HasManyHasAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare countUser_password_histories: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany UserPasswordHistory via user_id
	declare user_user_password_histories: UserPasswordHistory[];
	declare getUser_user_password_histories: Sequelize.HasManyGetAssociationsMixin<UserPasswordHistory>;
	declare setUser_user_password_histories: Sequelize.HasManySetAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare addUser_user_password_history: Sequelize.HasManyAddAssociationMixin<UserPasswordHistory, UserPasswordHistoryId>;
	declare addUser_user_password_histories: Sequelize.HasManyAddAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare createUser_user_password_history: Sequelize.HasManyCreateAssociationMixin<UserPasswordHistory>;
	declare removeUser_user_password_history: Sequelize.HasManyRemoveAssociationMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare removeUser_user_password_histories: Sequelize.HasManyRemoveAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare hasUser_user_password_history: Sequelize.HasManyHasAssociationMixin<UserPasswordHistory, UserPasswordHistoryId>;
	declare hasUser_user_password_histories: Sequelize.HasManyHasAssociationsMixin<
		UserPasswordHistory,
		UserPasswordHistoryId
	>;
	declare countUser_user_password_histories: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany UserRole via assigned_by
	declare user_roles: UserRole[];
	declare getUser_roles: Sequelize.HasManyGetAssociationsMixin<UserRole>;
	declare setUser_roles: Sequelize.HasManySetAssociationsMixin<UserRole, UserRoleId>;
	declare addUser_role: Sequelize.HasManyAddAssociationMixin<UserRole, UserRoleId>;
	declare addUser_roles: Sequelize.HasManyAddAssociationsMixin<UserRole, UserRoleId>;
	declare createUser_role: Sequelize.HasManyCreateAssociationMixin<UserRole>;
	declare removeUser_role: Sequelize.HasManyRemoveAssociationMixin<UserRole, UserRoleId>;
	declare removeUser_roles: Sequelize.HasManyRemoveAssociationsMixin<UserRole, UserRoleId>;
	declare hasUser_role: Sequelize.HasManyHasAssociationMixin<UserRole, UserRoleId>;
	declare hasUser_roles: Sequelize.HasManyHasAssociationsMixin<UserRole, UserRoleId>;
	declare countUser_roles: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany UserRole via created_by
	declare created_by_user_roles: UserRole[];
	declare getCreated_by_user_roles: Sequelize.HasManyGetAssociationsMixin<UserRole>;
	declare setCreated_by_user_roles: Sequelize.HasManySetAssociationsMixin<UserRole, UserRoleId>;
	declare addCreated_by_user_role: Sequelize.HasManyAddAssociationMixin<UserRole, UserRoleId>;
	declare addCreated_by_user_roles: Sequelize.HasManyAddAssociationsMixin<UserRole, UserRoleId>;
	declare createCreated_by_user_role: Sequelize.HasManyCreateAssociationMixin<UserRole>;
	declare removeCreated_by_user_role: Sequelize.HasManyRemoveAssociationMixin<UserRole, UserRoleId>;
	declare removeCreated_by_user_roles: Sequelize.HasManyRemoveAssociationsMixin<UserRole, UserRoleId>;
	declare hasCreated_by_user_role: Sequelize.HasManyHasAssociationMixin<UserRole, UserRoleId>;
	declare hasCreated_by_user_roles: Sequelize.HasManyHasAssociationsMixin<UserRole, UserRoleId>;
	declare countCreated_by_user_roles: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany UserRole via updated_by
	declare updated_by_user_roles: UserRole[];
	declare getUpdated_by_user_roles: Sequelize.HasManyGetAssociationsMixin<UserRole>;
	declare setUpdated_by_user_roles: Sequelize.HasManySetAssociationsMixin<UserRole, UserRoleId>;
	declare addUpdated_by_user_role: Sequelize.HasManyAddAssociationMixin<UserRole, UserRoleId>;
	declare addUpdated_by_user_roles: Sequelize.HasManyAddAssociationsMixin<UserRole, UserRoleId>;
	declare createUpdated_by_user_role: Sequelize.HasManyCreateAssociationMixin<UserRole>;
	declare removeUpdated_by_user_role: Sequelize.HasManyRemoveAssociationMixin<UserRole, UserRoleId>;
	declare removeUpdated_by_user_roles: Sequelize.HasManyRemoveAssociationsMixin<UserRole, UserRoleId>;
	declare hasUpdated_by_user_role: Sequelize.HasManyHasAssociationMixin<UserRole, UserRoleId>;
	declare hasUpdated_by_user_roles: Sequelize.HasManyHasAssociationsMixin<UserRole, UserRoleId>;
	declare countUpdated_by_user_roles: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany UserRole via user_id
	declare user_user_roles: UserRole[];
	declare getUser_user_roles: Sequelize.HasManyGetAssociationsMixin<UserRole>;
	declare setUser_user_roles: Sequelize.HasManySetAssociationsMixin<UserRole, UserRoleId>;
	declare addUser_user_role: Sequelize.HasManyAddAssociationMixin<UserRole, UserRoleId>;
	declare addUser_user_roles: Sequelize.HasManyAddAssociationsMixin<UserRole, UserRoleId>;
	declare createUser_user_role: Sequelize.HasManyCreateAssociationMixin<UserRole>;
	declare removeUser_user_role: Sequelize.HasManyRemoveAssociationMixin<UserRole, UserRoleId>;
	declare removeUser_user_roles: Sequelize.HasManyRemoveAssociationsMixin<UserRole, UserRoleId>;
	declare hasUser_user_role: Sequelize.HasManyHasAssociationMixin<UserRole, UserRoleId>;
	declare hasUser_user_roles: Sequelize.HasManyHasAssociationsMixin<UserRole, UserRoleId>;
	declare countUser_user_roles: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany UserSession via user_id
	declare user_sessions: UserSession[];
	declare getUser_sessions: Sequelize.HasManyGetAssociationsMixin<UserSession>;
	declare setUser_sessions: Sequelize.HasManySetAssociationsMixin<UserSession, UserSessionId>;
	declare addUser_session: Sequelize.HasManyAddAssociationMixin<UserSession, UserSessionId>;
	declare addUser_sessions: Sequelize.HasManyAddAssociationsMixin<UserSession, UserSessionId>;
	declare createUser_session: Sequelize.HasManyCreateAssociationMixin<UserSession>;
	declare removeUser_session: Sequelize.HasManyRemoveAssociationMixin<UserSession, UserSessionId>;
	declare removeUser_sessions: Sequelize.HasManyRemoveAssociationsMixin<UserSession, UserSessionId>;
	declare hasUser_session: Sequelize.HasManyHasAssociationMixin<UserSession, UserSessionId>;
	declare hasUser_sessions: Sequelize.HasManyHasAssociationsMixin<UserSession, UserSessionId>;
	declare countUser_sessions: Sequelize.HasManyCountAssociationsMixin;
	// User belongsTo User via created_by
	declare created_by_user: User;
	declare getCreated_by_user: Sequelize.BelongsToGetAssociationMixin<User>;
	declare setCreated_by_user: Sequelize.BelongsToSetAssociationMixin<User, UserId>;
	declare createCreated_by_user: Sequelize.BelongsToCreateAssociationMixin<User>;
	// User belongsTo User via updated_by
	declare updated_by_user: User;
	declare getUpdated_by_user: Sequelize.BelongsToGetAssociationMixin<User>;
	declare setUpdated_by_user: Sequelize.BelongsToSetAssociationMixin<User, UserId>;
	declare createUpdated_by_user: Sequelize.BelongsToCreateAssociationMixin<User>;
	// User hasMany User via created_by
	declare users: User[];
	declare getUsers: Sequelize.HasManyGetAssociationsMixin<User>;
	declare setUsers: Sequelize.HasManySetAssociationsMixin<User, UserId>;
	declare addUser: Sequelize.HasManyAddAssociationMixin<User, UserId>;
	declare addUsers: Sequelize.HasManyAddAssociationsMixin<User, UserId>;
	declare createUser: Sequelize.HasManyCreateAssociationMixin<User>;
	declare removeUser: Sequelize.HasManyRemoveAssociationMixin<User, UserId>;
	declare removeUsers: Sequelize.HasManyRemoveAssociationsMixin<User, UserId>;
	declare hasUser: Sequelize.HasManyHasAssociationMixin<User, UserId>;
	declare hasUsers: Sequelize.HasManyHasAssociationsMixin<User, UserId>;
	declare countUsers: Sequelize.HasManyCountAssociationsMixin;
	// User hasMany User via updated_by
	declare updated_by_users: User[];
	declare getUpdated_by_users: Sequelize.HasManyGetAssociationsMixin<User>;
	declare setUpdated_by_users: Sequelize.HasManySetAssociationsMixin<User, UserId>;
	declare addUpdated_by_user: Sequelize.HasManyAddAssociationMixin<User, UserId>;
	declare addUpdated_by_users: Sequelize.HasManyAddAssociationsMixin<User, UserId>;
	declare createUpdatedByUser: Sequelize.HasManyCreateAssociationMixin<User>;
	declare removeUpdated_by_user: Sequelize.HasManyRemoveAssociationMixin<User, UserId>;
	declare removeUpdated_by_users: Sequelize.HasManyRemoveAssociationsMixin<User, UserId>;
	declare hasUpdated_by_user: Sequelize.HasManyHasAssociationMixin<User, UserId>;
	declare hasUpdated_by_users: Sequelize.HasManyHasAssociationsMixin<User, UserId>;
	declare countUpdated_by_users: Sequelize.HasManyCountAssociationsMixin;
	static initModel(sequelize: Sequelize.Sequelize): typeof User {
		return User.init(
			{
				id: {
					type: DataTypes.UUID,
					allowNull: false,
					defaultValue: DataTypes.UUIDV4,
					primaryKey: true,
				},
				email: {
					type: DataTypes.TEXT,
					allowNull: false,
				},
				username: {
					type: DataTypes.TEXT,
					allowNull: true,
					unique: 'users_username_key',
				},
				first_name: {
					type: DataTypes.STRING(100),
					allowNull: true,
				},
				last_name: {
					type: DataTypes.STRING(100),
					allowNull: true,
				},
				phone: {
					type: DataTypes.STRING(20),
					allowNull: true,
				},
				address: {
					type: DataTypes.TEXT,
					allowNull: true,
				},
				email_verified_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
				status: {
					type: DataTypes.ENUM('active', 'inactive', 'suspended', 'pending_verification'),
					allowNull: true,
					defaultValue: 'pending_verification',
				},
				created_by: {
					type: DataTypes.UUID,
					allowNull: true,
					references: {
						model: 'users',
						key: 'id',
					},
				},
				updated_by: {
					type: DataTypes.UUID,
					allowNull: true,
					references: {
						model: 'users',
						key: 'id',
					},
				},
				created_at: {
					type: DataTypes.DATE,
					allowNull: true,
					defaultValue: Sequelize.Sequelize.fn('now'),
				},
				updated_at: {
					type: DataTypes.DATE,
					allowNull: true,
					defaultValue: Sequelize.Sequelize.fn('now'),
				},
				deleted_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
				avatar_id: {
					type: DataTypes.UUID,
					allowNull: true,
					references: {
						model: 'files',
						key: 'id',
					},
				},
			},
			{
				sequelize,
				tableName: 'users',
				schema: 'public',
				hasTrigger: true,
				timestamps: false,

				scopes: {
					default: {
						where: {
							deleted_at: null,
						},
					},
					withDeleted: {},
					onlyDeleted: {
						where: {
							deleted_at: { [Op.ne]: null },
						},
					},
				},
				indexes: [
					{
						name: 'idx_users_avatar_id',
						fields: [{ name: 'avatar_id' }],
					},
					{
						name: 'idx_users_created_at',
						fields: [{ name: 'created_at' }],
					},
					{
						name: 'idx_users_deleted_at',
						fields: [{ name: 'deleted_at' }],
					},
					{
						name: 'idx_users_email_verified_at',
						fields: [{ name: 'email_verified_at' }],
					},
					{
						name: 'idx_users_status',
						fields: [{ name: 'status' }],
					},
					{
						name: 'idx_users_username',
						fields: [{ name: 'username' }],
					},
					{
						name: 'users_pkey',
						unique: true,
						fields: [{ name: 'id' }],
					},
					{
						name: 'users_username_key',
						unique: true,
						fields: [{ name: 'username' }],
					},
					{
						name: 'ux_users_email_active',
						unique: true,
						fields: [{ name: 'email' }],
					},
				],
			},
		);
	}
}
