dasdasdasdasda

This commit is contained in:
2026-05-31 18:06:40 +03:30
parent f8b74cb5ef
commit 608fee2ba0
7 changed files with 36 additions and 33 deletions

View File

@@ -22,8 +22,10 @@ export interface IdentityAttributes {
updatedAt?: Date;
}
export interface IdentityCreationAttributes
extends Optional<IdentityAttributes, "id" | "profilePhotoId"> {}
export interface IdentityCreationAttributes extends Optional<
IdentityAttributes,
"id" | "profilePhotoId"
> {}
export class Identity
extends Model<IdentityAttributes, IdentityCreationAttributes>
@@ -55,63 +57,64 @@ export class Identity
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
primaryKey: true
primaryKey: true,
},
applicantId: {
type: DataTypes.UUID,
allowNull: false
allowNull: false,
},
firstName: {
type: DataTypes.STRING,
allowNull: false
allowNull: false,
},
lastName: {
type: DataTypes.STRING,
allowNull: false
allowNull: false,
},
fatherName: {
type: DataTypes.STRING
type: DataTypes.STRING,
},
nationalCode: {
type: DataTypes.STRING(10),
allowNull: false
allowNull: false,
},
birthDate: {
type: DataTypes.DATEONLY
type: DataTypes.DATEONLY,
},
birthPlace: {
type: DataTypes.STRING
type: DataTypes.STRING,
},
gender: {
type: DataTypes.STRING
type: DataTypes.ENUM("male", "female", "other"),
allowNull: true,
},
religion: {
type: DataTypes.STRING
type: DataTypes.STRING,
},
nationality: {
type: DataTypes.STRING
type: DataTypes.STRING,
},
profilePhotoId: {
type: DataTypes.UUID,
allowNull: true
}
allowNull: true,
},
},
{
sequelize,
tableName: "identities",
timestamps: true
}
timestamps: true,
},
);
return Identity;