/
Frexto
/
frexto-orm
Обзор
Документация
Войти
/
Frexto
/
frexto-orm
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
ModelAttributes.cs
20 строк
896 B
Maksim Fomin
orm
07 окт 2025, 10:58
07 окт 2025, 10:58
f4c0f72
Код
Авторство
О чём код?
namespace FrextoORM; [AttributeUsage(AttributeTargets.Property)] class MaxLengthAttribute(int maxLength = 256) : Attribute { public int MaxLength { get; } = maxLength; } [AttributeUsage(AttributeTargets.Property)] class ForeignKeyAttribute(string name) : Attribute { public string Name { get; } = name; } [AttributeUsage(AttributeTargets.Property)] class DateAttribute : Attribute {} [AttributeUsage(AttributeTargets.Property)] class DateTimeAttribute : Attribute {} [AttributeUsage(AttributeTargets.Property)] class TimeAttribute : Attribute {} [AttributeUsage(AttributeTargets.Property)] class OneToOneAttribute(string name) : ForeignKeyAttribute(name) {} [AttributeUsage(AttributeTargets.Property)] class OneToManyAttribute(string name) : ForeignKeyAttribute(name) {} [AttributeUsage(AttributeTargets.Property)] class ManyToManyAttribute(string name) : ForeignKeyAttribute(name) {}