import * as Sequelize from 'sequelize';
import { DataTypes, Model, Optional } from 'sequelize';
export interface ActiveApartmentAttributes {
	id?: string | null;
	building_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 ActiveApartmentPk = 'id';
export type ActiveApartmentId = ActiveApartment[ActiveApartmentPk];
export type ActiveApartmentOptionalAttributes =
	| 'id'
	| 'building_id'
	| 'name'
	| 'code'
	| 'floor'
	| 'status'
	| 'deleted_at'
	| 'deleted_by'
	| 'created_by'
	| 'updated_by'
	| 'created_at'
	| 'updated_at';
export type ActiveApartmentCreationAttributes = Optional<ActiveApartmentAttributes, ActiveApartmentOptionalAttributes>;
export class ActiveApartment extends Model<ActiveApartmentAttributes> implements ActiveApartmentAttributes {
	id?: string;
	declare building_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 ActiveApartment {
		return ActiveApartment.init(
			{
				id: {
					type: DataTypes.UUID,
					allowNull: true,
					primaryKey: true,
				},
				building_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_apartments',
				schema: 'public',
				timestamps: false,
			},
		);
	}
}
