import * as Sequelize from 'sequelize';
import { DataTypes, Model, Optional } from 'sequelize';
export interface ActiveBuildingAttributes {
	id?: string | null;
	name?: string | null;
	code?: string | null;
	address?: string | null;
	description?: string | 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 ActiveBuildingPk = 'id';
export type ActiveBuildingId = ActiveBuilding[ActiveBuildingPk];
export type ActiveBuildingOptionalAttributes =
	| 'id'
	| 'name'
	| 'code'
	| 'address'
	| 'description'
	| 'status'
	| 'deleted_at'
	| 'deleted_by'
	| 'created_by'
	| 'updated_by'
	| 'created_at'
	| 'updated_at';
export type ActiveBuildingCreationAttributes = Optional<ActiveBuildingAttributes, ActiveBuildingOptionalAttributes>;
export class ActiveBuilding extends Model<ActiveBuildingAttributes> implements ActiveBuildingAttributes {
	id?: string;
	declare name?: string | null;
	declare code?: string | null;
	declare address?: string | null;
	declare description?: string | 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 ActiveBuilding {
		return ActiveBuilding.init(
			{
				id: {
					type: DataTypes.UUID,
					allowNull: true,
					primaryKey: true,
				},
				name: {
					type: DataTypes.STRING(200),
					allowNull: true,
				},
				code: {
					type: DataTypes.STRING(50),
					allowNull: true,
				},
				address: {
					type: DataTypes.TEXT,
					allowNull: true,
				},
				description: {
					type: DataTypes.TEXT,
					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_buildings',
				schema: 'public',
				timestamps: false,
			},
		);
	}
}
