import * as Sequelize from 'sequelize';
import { DataTypes, Model, Optional } from 'sequelize';
export interface ActiveResidentStayAttributes {
	id?: string | null;
	resident_id?: string | null;
	bed_id?: string | null;
	move_in_at?: Date | null;
	move_out_at?: Date | null;
	occupancy_period?: string[] | null;
	move_out_reason?: string | null;
	move_out_notes?: string | null;
	stay_type?: 'permanent' | 'temporary' | 'maintenance' | 'quarantine' | 'guest' | null;
	created_by?: string | null;
	updated_by?: string | null;
	created_at?: Date | null;
	updated_at?: Date | null;
}
export type ActiveResidentStayPk = 'id';
export type ActiveResidentStayId = ActiveResidentStay[ActiveResidentStayPk];
export type ActiveResidentStayOptionalAttributes =
	| 'id'
	| 'resident_id'
	| 'bed_id'
	| 'move_in_at'
	| 'move_out_at'
	| 'occupancy_period'
	| 'move_out_reason'
	| 'move_out_notes'
	| 'stay_type'
	| 'created_by'
	| 'updated_by'
	| 'created_at'
	| 'updated_at';
export type ActiveResidentStayCreationAttributes = Optional<
	ActiveResidentStayAttributes,
	ActiveResidentStayOptionalAttributes
>;
export class ActiveResidentStay extends Model<ActiveResidentStayAttributes> implements ActiveResidentStayAttributes {
	id?: string;
	declare resident_id?: string | null;
	declare bed_id?: string | null;
	declare move_in_at?: Date | null;
	declare move_out_at?: Date | null;
	declare occupancy_period?: string[] | null;
	declare move_out_reason?: string | null;
	declare move_out_notes?: string | null;
	declare stay_type?: 'permanent' | 'temporary' | 'maintenance' | 'quarantine' | 'guest' | null;
	declare created_by?: string | null;
	declare updated_by?: string | null;
	declare created_at?: Date | null;
	declare updated_at?: Date | null;
	static initModel(sequelize: Sequelize.Sequelize): typeof ActiveResidentStay {
		return ActiveResidentStay.init(
			{
				id: {
					type: DataTypes.UUID,
					allowNull: true,
					primaryKey: true,
				},
				resident_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				bed_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				move_in_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
				move_out_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
				occupancy_period: {
					type: DataTypes.RANGE(DataTypes.DATE),
					allowNull: true,
				},
				move_out_reason: {
					type: DataTypes.STRING(255),
					allowNull: true,
				},
				move_out_notes: {
					type: DataTypes.TEXT,
					allowNull: true,
				},
				stay_type: {
					type: DataTypes.ENUM('permanent', 'temporary', 'maintenance', 'quarantine', 'guest'),
					allowNull: true,
				},
				created_by: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				updated_by: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				created_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
				updated_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
			},
			{
				sequelize,
				tableName: 'active_resident_stays',
				schema: 'public',
				timestamps: false,
			},
		);
	}
}
