import * as Sequelize from 'sequelize';
import { DataTypes, Model, Optional } from 'sequelize';
export interface ResidentCurrentLocationAttributes {
	stay_id?: string | null;
	resident_id?: string | null;
	resident_name?: string | null;
	bed_id?: string | null;
	bed_name?: string | null;
	bed_code?: string | null;
	bed_status?: 'active' | 'inactive' | null;
	room_id?: string | null;
	room_name?: string | null;
	room_code?: string | null;
	room_status?: 'active' | 'inactive' | null;
	apartment_id?: string | null;
	apartment_name?: string | null;
	apartment_code?: string | null;
	apartment_floor?: number | null;
	apartment_status?: 'active' | 'inactive' | null;
	building_id?: string | null;
	building_name?: string | null;
	building_code?: string | null;
	building_status?: 'active' | 'inactive' | null;
	move_in_at?: Date | null;
	occupancy_period?: string[] | null;
}
export type ResidentCurrentLocationOptionalAttributes =
	| 'stay_id'
	| 'resident_id'
	| 'resident_name'
	| 'bed_id'
	| 'bed_name'
	| 'bed_code'
	| 'bed_status'
	| 'room_id'
	| 'room_name'
	| 'room_code'
	| 'room_status'
	| 'apartment_id'
	| 'apartment_name'
	| 'apartment_code'
	| 'apartment_floor'
	| 'apartment_status'
	| 'building_id'
	| 'building_name'
	| 'building_code'
	| 'building_status'
	| 'move_in_at'
	| 'occupancy_period';
export type ResidentCurrentLocationCreationAttributes = Optional<
	ResidentCurrentLocationAttributes,
	ResidentCurrentLocationOptionalAttributes
>;
export class ResidentCurrentLocation
	extends Model<ResidentCurrentLocationAttributes>
	implements ResidentCurrentLocationAttributes
{
	stay_id?: string;
	declare resident_id?: string | null;
	declare resident_name?: string | null;
	declare bed_id?: string | null;
	declare bed_name?: string | null;
	declare bed_code?: string | null;
	declare bed_status?: 'active' | 'inactive' | null;
	declare room_id?: string | null;
	declare room_name?: string | null;
	declare room_code?: string | null;
	declare room_status?: 'active' | 'inactive' | null;
	declare apartment_id?: string | null;
	declare apartment_name?: string | null;
	declare apartment_code?: string | null;
	declare apartment_floor?: number | null;
	declare apartment_status?: 'active' | 'inactive' | null;
	declare building_id?: string | null;
	declare building_name?: string | null;
	declare building_code?: string | null;
	declare building_status?: 'active' | 'inactive' | null;
	declare move_in_at?: Date | null;
	declare occupancy_period?: string[] | null;
	static initModel(sequelize: Sequelize.Sequelize): typeof ResidentCurrentLocation {
		return ResidentCurrentLocation.init(
			{
				stay_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				resident_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				resident_name: {
					type: DataTypes.STRING(200),
					allowNull: true,
				},
				bed_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				bed_name: {
					type: DataTypes.STRING(200),
					allowNull: true,
				},
				bed_code: {
					type: DataTypes.STRING(50),
					allowNull: true,
				},
				bed_status: {
					type: DataTypes.ENUM('active', 'inactive'),
					allowNull: true,
				},
				room_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				room_name: {
					type: DataTypes.STRING(200),
					allowNull: true,
				},
				room_code: {
					type: DataTypes.STRING(50),
					allowNull: true,
				},
				room_status: {
					type: DataTypes.ENUM('active', 'inactive'),
					allowNull: true,
				},
				apartment_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				apartment_name: {
					type: DataTypes.STRING(200),
					allowNull: true,
				},
				apartment_code: {
					type: DataTypes.STRING(50),
					allowNull: true,
				},
				apartment_floor: {
					type: DataTypes.INTEGER,
					allowNull: true,
				},
				apartment_status: {
					type: DataTypes.ENUM('active', 'inactive'),
					allowNull: true,
				},
				building_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				building_name: {
					type: DataTypes.STRING(200),
					allowNull: true,
				},
				building_code: {
					type: DataTypes.STRING(50),
					allowNull: true,
				},
				building_status: {
					type: DataTypes.ENUM('active', 'inactive'),
					allowNull: true,
				},
				move_in_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
				occupancy_period: {
					type: DataTypes.RANGE(DataTypes.DATE),
					allowNull: true,
				},
			},
			{
				sequelize,
				tableName: 'resident_current_locations',
				schema: 'public',
				timestamps: false,
			},
		);
	}
}
