mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-19 04:18:52 +00:00
chore: admin - created_at, update_at
This commit is contained in:
parent
9a00d053bd
commit
a5982a3231
2 changed files with 6 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ pub struct Model {
|
|||
#[sea_orm(column_type = "Text")]
|
||||
pub private_key_hash: String,
|
||||
pub password_hash: String,
|
||||
pub created_at: DateTime,
|
||||
pub updated_at: DateTime,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ impl MigrationTrait for Migration {
|
|||
.col(ColumnDef::new(Admin::PublicKey).string().not_null())
|
||||
.col(ColumnDef::new(Admin::PrivateKeyHash).text().not_null())
|
||||
.col(ColumnDef::new(Admin::PasswordHash).string().not_null())
|
||||
.col(ColumnDef::new(Admin::CreatedAt).date_time().not_null())
|
||||
.col(ColumnDef::new(Admin::UpdatedAt).date_time().not_null())
|
||||
.to_owned(),
|
||||
)
|
||||
.await
|
||||
|
|
@ -43,4 +45,6 @@ enum Admin {
|
|||
PublicKey,
|
||||
PrivateKeyHash,
|
||||
PasswordHash,
|
||||
CreatedAt,
|
||||
UpdatedAt,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue