import * as Sequelize from 'sequelize';
import { DataTypes, Model, Optional } from 'sequelize';
export interface ActiveRoomAttributes {
	id?: string | null;
	apartment_id?: string | null;
	name?: string | null;
	code?: string | null;
	floor?: number | null;
	status?: 'active' | 'inactive' | null;
	deleted_at?: Date | null;
	deleted_by?: string | null;
	created_by?: string | null;
	updated_by?: string | null;
	created_at?: Date | null;
	updated_at?: Date | null;
}
export type ActiveRoomPk = 'id';
export type ActiveRoomId = ActiveRoom[ActiveRoomPk];
export type ActiveRoomOptionalAttributes =
	| 'id'
	| 'apartment_id'
	| 'name'
	| 'code'
	| 'floor'
	| 'status'
	| 'deleted_at'
	| 'deleted_by'
	| 'created_by'
	| 'updated_by'
	| 'created_at'
	| 'updated_at';
export type ActiveRoomCreationAttributes = Optional<ActiveRoomAttributes, ActiveRoomOptionalAttributes>;
export class ActiveRoom extends Model<ActiveRoomAttributes> implements ActiveRoomAttributes {
	id?: string;
	declare apartment_id?: string | null;
	declare name?: string | null;
	declare code?: string | null;
	declare floor?: number | null;
	declare status?: 'active' | 'inactive' | null;
	declare deleted_at?: Date | null;
	declare deleted_by?: string | 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 ActiveRoom {
		return ActiveRoom.init(
			{
				id: {
					type: DataTypes.UUID,
					allowNull: true,
					primaryKey: true,
				},
				apartment_id: {
					type: DataTypes.UUID,
					allowNull: true,
				},
				name: {
					type: DataTypes.STRING(200),
					allowNull: true,
				},
				code: {
					type: DataTypes.STRING(50),
					allowNull: true,
				},
				floor: {
					type: DataTypes.INTEGER,
					allowNull: true,
				},
				status: {
					type: DataTypes.ENUM('active', 'inactive'),
					allowNull: true,
				},
				deleted_at: {
					type: DataTypes.DATE,
					allowNull: true,
				},
				deleted_by: {
					type: DataTypes.UUID,
					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_rooms',
				schema: 'public',
				timestamps: false,
			},
		);
	}
}
